$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Murali Kishore (bmuralikishore_at_[hidden])
Date: 2024-12-20 17:15:33
Hi,
Want to check is std::variant allocating memory from shared memory using
boost interprocess allocators.
EX: std::variant<int, float> v, w;
// Define types A and B that we will store in the variant
struct A {
int x;
A(int val) : x(val) {}
};
struct B {
std::string str;
B(const std::string& s) : str(s) {}
};
// Define the variant type
using MyVariant = std::variant<A, B>;
guide me for the above examples to create custom allocators.
-- Regards, Murali Kishore