[serialization] hash_map declaration problem
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
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"
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
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"
wrote in message news:6b4335640712170254m3e93b390o3b39d7e7a50749c8@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
should be BOOST_STD_EXTENSION_NAMESPACE::hash_map
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@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
I have the same problem. I am using the implementation of hash_map
that is default in Gentoo Linux (libstdc++ i think).
On Sun, Dec 23, 2007 at 1:21 PM, Robert Ramey
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 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"
wrote in message news:6b4335640712170254m3e93b390o3b39d7e7a50749c8@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
should be BOOST_STD_EXTENSION_NAMESPACE::hash_map
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@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Academic: http://www-etud.iro.umontreal.ca/~turian/ Business: http://www.metaoptimize.com/
I also had to use the following #defines to compile:
-D__GLIBCPP__ -DBOOST_HAS_HASH -DBOOST_STD_EXTENSION_NAMESPACE=__gnu_cxx
(And I had to patch hash_map.hpp)
On Fri, Jan 25, 2008 at 8:22 PM, Joseph Turian
I have the same problem. I am using the implementation of hash_map that is default in Gentoo Linux (libstdc++ i think).
On Sun, Dec 23, 2007 at 1:21 PM, Robert Ramey
wrote: 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 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"
wrote in message news:6b4335640712170254m3e93b390o3b39d7e7a50749c8@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
should be BOOST_STD_EXTENSION_NAMESPACE::hash_map
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@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Academic: http://www-etud.iro.umontreal.ca/~turian/ Business: http://www.metaoptimize.com/
-- Academic: http://www-etud.iro.umontreal.ca/~turian/ Business: http://www.metaoptimize.com/
participants (3)
-
Jan Boehme
-
Joseph Turian
-
Robert Ramey