Re: [boost] Making friend with boost::interprocess

Oncaphillis wrote:
Of course somewhere deep in the guts of boost I get an error since the Foo constructor is private. Who do I have to befriend in order to make this scheme work ?
At this moment you have no possibility of constructing non-constructible objects in shared memory.
Thank you
O.
Best, Ion

Oncaphillis wrote:
Of course somewhere deep in the guts of boost I get an error since the Foo constructor is private. Who do I have to befriend in order to make this scheme work ?
At this moment you have no possibility of constructing non-constructible objects in shared memory. Don't know if I get that right. My real world objects constructs just fine when I make the constructor
Hi Ion thanks for the reply public. The only problem I have is that: <snip> segment.find_or_construct<Foo>("FooObject")(alloc); </snip> complains that my constructor is private: within this context: <snip> # if BOOST_PP_LOCAL_C(1) BOOST_PP_LOCAL_MACRO(1) # endif </snip> which isn't very helpful. I already tried to make class managed_shared_memory a friend. But since managed_shared_memory is just a typedef from basic_shared_memory<...> that doesn't work either. Thanks again O.
participants (2)
-
Ion Gaztañaga
-
Oncaphillis