[multi-index] partial_std_allocator_wrapper constructor

Hi, I'm using the multi-index allocator utilities for the unordered associative containers implementation. Because partial_std_allocator_wrapper can't be constructed from the standard allocator, I get an error when I use a standard allocator as a constructor parameter. I believe it also prevents this with the multi-index library. Would it be possible to apply the attached patch to fix this? (Or is there another way?) I added an implicit constructor, although an explicit one would be fine for my use. thanks, Daniel Index: allocator_utilities.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/detail/allocator_utilities.hpp,v retrieving revision 1.5 diff -u -r1.5 allocator_utilities.hpp --- allocator_utilities.hpp 13 Dec 2004 07:17:17 -0000 1.5 +++ allocator_utilities.hpp 22 Jan 2005 18:03:44 -0000 @@ -42,6 +42,11 @@ template<typename Other> partial_std_allocator_wrapper(const partial_std_allocator_wrapper<Other>&){} + partial_std_allocator_wrapper(std::allocator<Type> const& x) + : std::allocator<Type>(x) + { + }; + #if defined(BOOST_DINKUMWARE_STDLIB) /* Dinkumware guys didn't provide a means to call allocate() without * supplying a hint, in disagreement with the standard.

Daniel James ha escrito:
Hi,
I'm using the multi-index allocator utilities for the unordered associative containers implementation. Because partial_std_allocator_wrapper can't be constructed from the standard allocator, I get an error when I use a standard allocator as a constructor parameter. I believe it also prevents this with the multi-index library.
Would it be possible to apply the attached patch to fix this? (Or is there another way?) I added an implicit constructor, although an explicit one would be fine for my use.
Applied, thank you, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
participants (2)
-
Daniel James
-
Joaquín Mª López Muñoz