Using subscript operator with interprocess map
El 03/09/2010 9:18, Michi Mutsuzaki escribió:
char_string needs an allocator in its constructor (not tested code):
(*mymap)[char_string("key", alloc_inst)] = 1;
Thanks Ion, that fixed the compilation error. Now I'm trying create a map
from char_string to char_string, and that's failing. Here is the code and
the error message I'm getting (I'm really sorry I keep posting about compilation
errors, but I'm having hard time parsing the error message):
#include <functional>
#include <iostream>
#include <algorithm>
#include
::allocator()' /usr/local/include/boost/interprocess/allocators/allocator.hpp:135: note: candidates are: boost::interprocess::allocator
::allocator(const boost::interprocess::allocator &) [with T = char, SegmentManager = boost::interprocess::segment_manager , boost::interprocess::iset_index>] /usr/local/include/boost/interprocess/allocators/allocator.hpp:130: note: boost::interprocess::allocator ::allocator(SegmentManager*) [with T = char, SegmentManager = boost::interprocess::segment_manager , boost::interprocess::iset_index>]
participants (1)
-
Michi Mutsuzaki