Hi,
trying to use fast_pool_allocator in Boost 1.35 fails with MSVC 9.0; it
worked well with MSVC 8.0. The following code fragment shows the error:
#include
#include
#include
#include
#include
using namespace boost;
using namespace boost::multi_index;
typedef multi_index_container >,
fast_pool_allocator<int> > IntSet;
IntSet s;
Below you can see the compiler error message. Am I doing something wrong?
(From what I've seen digging through the code, it seems to me that the
allocator gets rebound from int to void, which does not work for
fast_pool_allocator.)
Thanks,
Filip
C:\lib\Boost-1_35_0\include\boost-1_35\boost/pool/pool_alloc.hpp(130) :
error C2182: 'reference' : illegal use of type 'void'
C:\lib\Boost-1_35_0\include\boost-1_35\boost/detail/allocator_utilities.hpp(149)
: see reference to class template instantiation
'boost::fast_pool_allocator' being compiled
with
[
T=void,
UserAllocator=boost::default_user_allocator_new_delete,
Mutex=boost::details::pool::default_mutex,
NextSize=32
]
C:\lib\Boost-1_35_0\include\boost-1_35\boost/detail/allocator_utilities.hpp(158)
: see reference to class template instantiation
'boost::detail::allocator::rebinder<Allocator>::result<Type>' being compiled
with
[
Allocator=boost::fast_pool_allocator,
Type=boost::multi_index::detail::sequenced_index_node_impl>
]
C:\lib\Boost-1_35_0\include\boost-1_35\boost/mpl/eval_if.hpp(63) : see
reference to class template instantiation
'boost::detail::allocator::compliant_allocator_rebind_to'
being compiled
with
[
Allocator=boost::fast_pool_allocator,
Type=boost::multi_index::detail::sequenced_index_node_impl>
]
C:\lib\Boost-1_35_0\include\boost-1_35\boost/detail/allocator_utilities.hpp(170)
: see reference to class template instantiation
'boost::mpl::eval_if_c' being compiled
with
[
C=false,
F1=boost::detail::allocator::partial_std_allocator_rebind_to,boost::multi_index::detail::sequenced_index_node_impl>>,
F2=boost::detail::allocator::compliant_allocator_rebind_to,boost::multi_index::detail::sequenced_index_node_impl>>
]
C:\lib\Boost-1_35_0\include\boost-1_35\boost/multi_index/detail/seq_index_node.hpp(36)
: see reference to class template instantiation
'boost::detail::allocator::rebind_to' being compiled
with
[
Allocator=boost::fast_pool_allocator,
Type=boost::multi_index::detail::sequenced_index_node_impl>
]
C:\lib\Boost-1_35_0\include\boost-1_35\boost/multi_index/detail/seq_index_node.hpp(148)
: see reference to class template instantiation
'boost::multi_index::detail::sequenced_index_node_impl<Allocator>' being
compiled
with
[
Allocator=boost::fast_pool_allocator
]
C:\lib\Boost-1_35_0\include\boost-1_35\boost/multi_index/detail/seq_index_node.hpp(162)
: see reference to class template instantiation
'boost::multi_index::detail::sequenced_index_node_trampoline<Super>'
being compiled
with
[
Super=boost::multi_index::detail::index_node_base
]
C:\lib\Boost-1_35_0\include\boost-1_35\boost/multi_index/sequenced_index.hpp(95)
: see reference to class template instantiation
'boost::multi_index::detail::sequenced_index_node<Super>' being compiled
with
[
Super=boost::multi_index::detail::index_node_base
]
C:\lib\Boost-1_35_0\include\boost-1_35\boost/multi_index_container.hpp(86)
: see reference to class template instantiation
'boost::multi_index::detail::sequenced_index' being
compiled
with
[
SuperMeta=boost::multi_index::detail::nth_layer<1,int,boost::multi_index::indexed_by>,boost::fast_pool_allocator<int>>,
TagList=boost::mpl::vector0boost::mpl::na
]
.\relink.cpp(97) : see reference to class template
instantiation
'boost::multi_index::multi_index_container'
being compiled
with
[
Value=int,
IndexSpecifierList=boost::multi_index::indexed_by>,
Allocator=boost::fast_pool_allocator<int>
]