id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 6710,Boost Containers Using interprocess Basic_strings Need external temporaries,jdy@…,Ion Gaztañaga,"When using an interprocess basic string such as: typedef boost::interprocess::allocator< char, boost::interprocess::managed_mapped_file::segment_manager > char_allocator_t; typedef boost::interprocess::basic_string< char, std::char_traits, char_allocator_t > key_type; map, flat_map (and unordered_map) all require that one have an externally created temporary of that type (key_type) created that can temporarily hold the results of a std::string or char*. This requires code of the form: // A temporary string that allocates from the mapped file struct shm_clean { // cleanup shared memory on stack-unwind shm_clean() { boost::interprocess::shared_memory_object::remove(""StupidSharedMemory""); } ~shm_clean() { boost::interprocess::shared_memory_object::remove(""StupidSharedMemory""); } } cleaner; boost::interprocess::managed_shared_memory stupid(boost::interprocess::create_only ,""StupidSharedMemory"" ,500); key_type key_val(stupid.get_segment_manager()); mymap_in_shared_memory[key_val = mystring.c_str()] = junk; This is barely ok when we are working with mutable memory regions, but when I am working in a read-only memory map, it is annoying. Please see this thread: http://thread.gmane.org/gmane.comp.lib.boost.devel/228874 Bug posted at request of Ion Gaztañaga Joel",Feature Requests,new,To Be Determined,container,Boost 1.49.0,Problem,,"interprocess, container, map, flat_map, unordered_map",igaztanaga@… jdy@…