|
Boost : |
From: SCleary_at_[hidden]
Date: 2004-05-06 13:58:32
Your declaration looks correct to me.
hash_map is part of SGI's STL/STLPort. It will support Standard C++
Allocators IF the underlying compiler is capable of it (requires member
template support). Otherwise, it has a nice fallback mechanism that uses its
own form of STLPort Allocator.
pool_alloc provides a Standard C++ Allocator; it does not support the
STLPort Allocator interface. So, it sounds like you're using a compiler that
is not capable of supporting Standard C++ Allocators properly.
-Steve
-----Original Message-----
From: Thomas [mailto:hazard_at_[hidden]]
Sent: Wednesday, May 05, 2004 4:45 PM
To: boost_at_[hidden]
Subject: [boost] pool_alloc with Pair Associative Container?
Can someone give me an example of how to use the boost pool_alloc
allocator interface with a Pair Associative Container, like hash_map?
I tried doing something like
typedef hash_map<long long,double,longLongHasher,boost::pool_allocator<
pair<const long long,double> > > tLongLongToDoubleHashMap;
,,,but I get errors when I try to compile code that actually uses
tLongLongToDoubleHashMap.
Thanks!
Thomas
-- Thomas <hazard_at_[hidden]> _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk