boostorg / multi_index

Boost.org multi_index module
http://boost.org/libs/multi_index
45 stars 59 forks source link

Using allocator's size_type to control sizeof unordered containers so that it is fixed in a 32/64 shd mem context #18

Closed CerosDev closed 5 years ago

CerosDev commented 5 years ago

Modified type of member variable, will now use the allocator traits's size_type. This is useful when used in a 32/64bits Boost interprocess shared memory context. Using the previous std::size_t makes the container size different in both architecture, therefore impossible to store in a shared memory.

In most case, this makes no difference because the default allocator's size_type is std::size_t

joaquintides commented 5 years ago

Changes already done to the main repository as explained at https://github.com/boostorg/multi_index/issues/17#issuecomment-450554048