Create a shared-memory vector of strings
问题 I am trying to create a class managing a shared-memory vector of (std)strings. typedef boost::interprocess::allocator<std::string, boost::interprocess::managed_shared_memory::segment_manager> shmem_allocator; typedef boost::interprocess::vector<std::string, shmem_allocator> shmem_vector; shmem_mgr::shmem_mgr() : shmem_(create_only, SHMEM_KEY, SHMEM_SIZE), allocator_(shmem_.get_segment_manager()) { mutex_ = shmem_.find_or_construct<interprocess_mutex>(SHMEM_MUTEX)(); condition_ = shmem_.find