Boost logo

Boost Users :

Subject: Re: [Boost-users] Help with custom classes PLEASE!!
From: Daniel Veneros (dann.vd_at_[hidden])
Date: 2010-02-01 17:17:43


And what about the class?
Do i just need to create allocators for the map and the string(the map's
key)??

     typedef allocator<basic_string, managed_shared_memory::segment_manager>
StrAllocator;
typedef Employee Value;
typedef std::pair<StrAllocator, Employee> ValueType;
typedef allocator<ValueType, managed_shared_memory::segment_manager>
ShMemAllocator; typedef map<StrAllocator, Value, std::less<StrAllocator>,
ShMemAllocator> MyMap;

Is this correct?
Thank you very much again...

Dann

On Mon, Feb 1, 2010 at 5:59 PM, Steven Watanabe <watanabesj_at_[hidden]>wrote:

> AMDG
>
>
> Daniel Veneros wrote:
>
>> I got one othr question, what if I want to share a MAP type between both
>> processes? a map that has a string as a key and a custom class as a value?
>>
>>
>
> The map and the string both need to have allocators.
>
>
> In Christ,
> Steven Watanabe
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



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