Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost::interprocess::string problems
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2010-07-26 14:00:54


On 26/07/2010 18:41, this_thread wrote:

> I'm still having a little trouble. The allocator they use in
> string_test.cpp is one totally implemented there for that project; I'm not
> going to have to do / copy that am I? I've tried:
>
> typedef boost::interprocess::basic_string<char, std::char_traits<char>,
> boost::interprocess::allocation_type> BoostString;

allocation_type does not exist, it must be any shared memory allocator
of type char.

> AND:
>
>
> typedef boost::interprocess::allocator<char,
> boost::interprocess::managed_shared_memory::segment_manager> CharAllocator;
> typedef boost::interprocess::basic_string<char, std::char_traits<char>,
> boost::interprocess::CharAllocator> BoostString;

-> boost::interprocess::CharAllocator is not anything declared in
namespace boost::interprocess. Try with just tCharAllocator.

In short: it's the same as vector<char>, but with an extra second
parameter with type std::char_traits<char>.

Best,

Ion


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net