id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 6711,"with unordered_map using interprocess basic_string in shared memory, find and [] are annoying",jdy@…,,"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 See sister ticked for boost::containers https://svn.boost.org/trac/boost/ticket/6710 Joel",Feature Requests,closed,To Be Determined,None,Boost 1.49.0,Problem,wontfix,"interprocess, unordered_map, container",jdy@… igaztanaga@…