
Hi, can you please send a small but complete sample code of what you are trying (a bunch of includes and a main function, not more than a few lines)? Regards, Roland manish4gupta wrote:
I have tried both but i am getting the following error message
In constructor ‘boost::interprocess_container::basic_string<CharT, Traits, Alloc>::basic_string(const CharT*, const A&) [with CharT = char, Traits = std::char_traits<char>, A = boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void>, 0u>, boost::interprocess::iset_index>
]’: run.cpp:63: error: no matching function for call to ‘boost::interprocess::allocator<char, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void>, 0u>, boost::interprocess::iset_index> ::allocator()’ /usr/include/boost/interprocess/allocators/allocator.hpp:129: note: candidates are: boost::interprocess::allocator<T, SegmentManager>::allocator(const boost::interprocess::allocator<T, SegmentManager>&) [with T = char, SegmentManager = boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void>, 0u>, boost::interprocess::iset_index>] /usr/include/boost/interprocess/allocators/allocator.hpp:124: note: boost::interprocess::allocator<T, SegmentManager>::allocator(SegmentManager*) [with T = char, SegmentManager = boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void>, 0u>, boost::interprocess::iset_index>]
Igor R wrote:
This is ok but i have to convert string into boost string. You mean Boost.Interprocess string.
std::string s1("test");
char_string s2(s1.begin(), s1.end()); or: char_string s2(s1.c_str()); _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users