
Hi, I need to store in the shared memory structure for Quadtree. It is a class with 4 pointers for tree regions and vector of points: class CNode4 { ... CNode4* node0; CNode4* node1; CNode4* node2; CNode4* node3; vector<vec2> pointArray; }; I have tried with class CNode4 { ... offset_ptr<CSNode4> node0; ... }; and using as: typedef allocator<void, managed_shared_memory::segment_manager> void_allocator; const void_allocator alloc_void(segment.get_segment_manager()); CSNode4* rootNode = segment.construct<CSNode4> (_RootNode) (alloc_void); rootNode->node0 = new CSNode4(alloc_void,...); this works until I try to static_cast node0 offset_ptr<CSNode4> N1 = static_cast<CSNode4*>(rootNode->node0); I get: (MSVC 2010, boost 1.42) error C2440: 'static_cast' : cannot convert from 'boost::interprocess::offset_ptr<PointedType>' to 'CSNode4 *' what am I doing wrong? Thanks, Ivan