Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2007-12-23 13:21:12


When I look at the boost page
http://www.boost.org/doc/html/boost_tr1/unsupported.html

I see the

// [6.3.4.4] Class template unordered_map
template <class Key,
         class T,
         class Hash = hash<Key>,
         class Pred = std::equal_to<Key>,
         class Alloc = std::allocator<std::pair<const Key, T> > >
class unordered_map;

which matches the current definition.

So it would be interesting to know which version of the standard
library you're using. It it is widely used, I would be interested
in making changes to maintain backward compatibility, but then
I would need to know how to select which prototype to use.

Robert Ramey

Robert Ramey wrote:
> Hmmm,
>
> When I look into my MSVC 7.1 library I see the class declaration as
> it is in the serialization library.
>
> When I look into SGI documentation, I see the declaration you've used.
>
> So I'll guess this will be a little more work as the hash_map test
> will also need to be tweaked.
>
> Just So I don't forget, how about opening a Trac Ticket on this.
>
> Robert Ramey
> "Jan Boehme" <jan.boehme_at_[hidden]> wrote in message
> news:6b4335640712170254m3e93b390o3b39d7e7a50749c8_at_mail.gmail.com...
> Hi,
> I encountered problems while trying to serialize hash_maps which use
> pool allocators ( gcc: no member 'serialize' ). I had a look into
> "boost/serialization/hash_map.hpp" and realized a problem in the
> declaration of hash_map in here:
>
> BOOST_STD_EXTENSION_NAMESPACE::hash_map<Key, HashFcn, EqualKey,
> Allocator>
> should be
>
> BOOST_STD_EXTENSION_NAMESPACE::hash_map<Key, Value, HashFcn, EqualKey,
> Allocator>
>
> It seems that nobody used the hash_map with more than 4 template
> parameters together with boost::serialization before.
>
> It would be nice, if the following changes for
> "boost/serialization/hash_map.hpp" would be adopted into the repos.
>
> Cheers, Jan.
>
> --- /boost-trunk/boost/serialization/hash_map.hpp 2007-08-01 09:03:
> 26.000000000 +0200
> +++ /boost/serialization/hash_map.hpp 2007-12-17
> 11:36:27.000000000 +0100 @@ -33,3 +33,4 @@
> class Archive,
> - class Key,
> + class Key,
> + class Value,
> class HashFcn,
> @@ -41,3 +42,3 @@
> const BOOST_STD_EXTENSION_NAMESPACE::hash_map<
> - Key, HashFcn, EqualKey, Allocator
> + Key, Value, HashFcn, EqualKey, Allocator
> > &t,
> @@ -48,3 +49,3 @@
> BOOST_STD_EXTENSION_NAMESPACE::hash_map<
> - Key, HashFcn, EqualKey, Allocator
> + Key, Value, HashFcn, EqualKey, Allocator
> >
> @@ -55,3 +56,4 @@
> class Archive,
> - class Key,
> + class Key,
> + class Value,
> class HashFcn,
> @@ -63,3 +65,3 @@
> BOOST_STD_EXTENSION_NAMESPACE::hash_map<
> - Key, HashFcn, EqualKey, Allocator
> + Key, Value, HashFcn, EqualKey, Allocator
> > &t,
> @@ -70,3 +72,3 @@
> BOOST_STD_EXTENSION_NAMESPACE::hash_map<
> - Key, HashFcn, EqualKey, Allocator
> + Key, Value, HashFcn, EqualKey, Allocator
> >,
> @@ -75,3 +77,3 @@
> BOOST_STD_EXTENSION_NAMESPACE::hash_map<
> - Key, HashFcn, EqualKey, Allocator
> + Key, Value, HashFcn, EqualKey, Allocator
> >
> @@ -85,3 +87,4 @@
> class Archive,
> - class Key,
> + class Key,
> + class Value,
> class HashFcn,
> @@ -93,3 +96,3 @@
> BOOST_STD_EXTENSION_NAMESPACE::hash_map<
> - Key, HashFcn, EqualKey, Allocator
> + Key, Value, HashFcn, EqualKey, Allocator
> > &t,
>
>
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


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