#5265 closed Patches (fixed)
unordered_set and unordered_map serialization
Reported by: | Owned by: | Robert Ramey | |
---|---|---|---|
Milestone: | Boost 1.47.0 | Component: | serialization |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | unordered unordered_set unordered_multiset unordered_map unordered_multimap | Cc: | jim@… |
Description
This patch provides serialization for std::tr1 containers unordered_set, unordered_multiset, unordered_map, and unordered_multimap.
Code using boost::unordered_... must instead use std::tr1. The interface is identical.
It includes boost TR1 header files for portability (<boost/tr1/unordered_set.hpp> or <boost/tr1/unordered_map.hpp>). See <http://lists.boost.org/boost-users/2011/02/66535.php>
The patch file adapts the serialization tests test_map.cpp and test_set.cpp to include unordered variants. This patch requires changeset 69520 (see Ticket #5254).
This has been verified on MinGW-32/gcc-4.4 and MSVC-8. It should produce no spurious warnings on compile.
Attachments (6)
Change History (14)
by , 12 years ago
Attachment: | unordered_set.hpp added |
---|
by , 12 years ago
Attachment: | unordered_collections_load_imp.hpp added |
---|
boost/serialization/unordered_collections_load_imp.hpp
by , 12 years ago
Attachment: | unordered_collections_save_imp.hpp added |
---|
boost/serialization/unordered_collections_save_imp.hpp
by , 12 years ago
Attachment: | test_unordered.patch added |
---|
Patch for libs/serialization/test (test_map.cpp and test_set.cpp)
comment:1 by , 12 years ago
'boost/serialization/detail/stack_constructor.hpp' seems to be missing from the includes in 'boost/serialization/unordered_collections_load_imp.hpp'
gcc version 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC), fedora 14
by , 12 years ago
Attachment: | unordered_collections_load_imp.2.hpp added |
---|
boost/serialization/unordered_collections_load_imp.hpp (v2 -- supercedes previous)
comment:2 by , 12 years ago
jsd: thanks for the feedback.
I merged into unordered_collections_load_imp.hpp the same headers that collections_load_imp.hpp includes, boost/serialization/detail/stack_constructor.hpp being one. I checked unordered_collections_save_imp.hpp and it seemed ok.
Passes all tests against MinGW-gcc-4.4 and MSVC-8.
comment:3 by , 10 years ago
what about boost own containers? how can they provide serialization for stl containers and not for boost::own containers, damn
follow-up: 5 comment:4 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I've added this to the library. I made changes to be compatible with c++11 rather than TR1. Will show up in the development branch shortly.
Robert Ramey
comment:5 by , 8 years ago
Replying to ramey:
I've added this to the library. I made changes to be compatible with c++11 rather than TR1. Will show up in the development branch shortly.
Robert Ramey
How shortly is "shortly"? I can't find it yet and it's at least 3 years now.
Thanks for a beautiful library
comment:6 by , 8 years ago
I just hit this issue today, when these patches will be integrated into boost please?
comment:7 by , 8 years ago
Could this please be merged? I'm copying the file for local use, but I'd really like this to be distributed with boost.
comment:8 by , 8 years ago
my records show:
commit to develop commit 2140063
include/boost/serialization/stack.hpp include/boost/serialization/unordered_collections_load_imp.hpp include/boost/serialization/unordered_collections_save_imp.hpp include/boost/serialization/unordered_map.hpp include/boost/serialization/unordered_set.hpp include/boost/serialization/void_cast.hpp test/Jamfile.v2 test/test_array.cpp test/test_deque.cpp test/test_list.cpp test/test_map.cpp test/test_pimpl.cpp test/test_priority_queue.cpp test/test_private_base.cpp test/test_queue.cpp test/test_set.cpp test/test_stack.cpp test/test_vector.cpp
and merge to master commit 484874f
....
Does this not address this ticket?
boost/serialization/unordered_set.hpp