Boost logo

Boost Users :

From: Scott (cheesy4poofs_at_[hidden])
Date: 2007-09-28 14:43:36


I have a std::map that I'd like to use the fast_pool_allocator with. But
when I declare it, I get errors with rebind.

typedef std::pair<IndexVariant, Hints> IndexMapType;
typedef boost::fast_pool_allocator<IndexMapType> IndexPoolAllocator;
typedef std::map<IndexVariant, Hints, std::less< IndexVariant >,
IndexPoolAllocator> ValueHints;

1>C:\Program Files\Microsoft Visual Studio 8\VC\include\map(28) : error
C2903: 'rebind' : symbol is neither a class template nor a function template
1> C:\Program Files\Microsoft Visual Studio 8\VC\include\xtree(26) :
see reference to class template instantiation
'std::_Tmap_traits<_Kty,_Ty,_Pr,_Alloc,_Mfl>' being compiled
1> with
1> [
1> _Kty=nw::IndexVariant,
1> _Ty=nw::Hints,
1> _Pr=std::less<nw::IndexVariant>,
1> _Alloc=nw::IndexPoolAllocator,
1> _Mfl=false
1> ]

However, if I substitute:

typedef std::allocator<IndexMapType> IndexPoolAllocator;

it all compiles fine.

I'd appreciate any help with my problem! :)

Thanks,
Scott


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