|
Boost Users : |
From: Jeff Epler (jepler_at_[hidden])
Date: 2006-10-05 10:04:46
Please send me a copy of any replies to this message.
The patch below (against the RC_1_34_0 version from CVS) adds the test
program for the "struct load" bug to the serialization library's test
suite.
This program fails with post-1_31 versions of boost on all the
gcc systems I have access to, including gcc 3.2.2, gcc 4.0.2, and gcc
4.0.3.
However, the program did work with boost 1_31 on gcc 3.2.2, so from my
viewpoint it's a regression in boost.
Index: libs/serialization/test/Jamfile
===================================================================
RCS file: /cvsroot/boost/boost/libs/serialization/test/Jamfile,v
retrieving revision 1.34.2.1
diff -u -p -u -r1.34.2.1 Jamfile
--- libs/serialization/test/Jamfile 5 Apr 2006 04:56:10 -0000 1.34.2.1
+++ libs/serialization/test/Jamfile 4 Oct 2006 21:32:00 -0000
@@ -246,6 +246,7 @@ test-suite "serialization" :
[ test-bsl-run_files test_shared_ptr ]
[ test-bsl-run_files test_shared_ptr_132 ]
[ test-bsl-run_polymorphic_archive test_polymorphic : test_polymorphic_A ]
+ [ compile test_struct_load.cpp ]
;
if $(BOOST_SERIALIZATION_TEST) {
Index: libs/serialization/test/Jamfile.v2
===================================================================
RCS file: /cvsroot/boost/boost/libs/serialization/test/Jamfile.v2,v
retrieving revision 1.3
diff -u -p -u -r1.3 Jamfile.v2
--- libs/serialization/test/Jamfile.v2 17 Mar 2006 07:36:47 -0000 1.3
+++ libs/serialization/test/Jamfile.v2 4 Oct 2006 21:32:00 -0000
@@ -263,6 +263,7 @@ test-suite "serialization" :
[ test-bsl-run_files test_shared_ptr ]
[ test-bsl-run_files test_shared_ptr_132 ]
[ test-bsl-run_polymorphic_archive test_polymorphic : test_polymorphic_A ]
+ [ compile test_struct_load.cpp ]
;
if $(BOOST_SERIALIZATION_TEST) {
--- /dev/null 2006-09-22 07:23:40.969060500 -0500
+++ libs/serialization/test/test_struct_load.cpp 2006-10-04 09:17:21.000000000 -0500
@@ -0,0 +1,25 @@
+#include <boost/archive/xml_iarchive.hpp>
+#include <boost/serialization/vector.hpp>
+#include <boost/serialization/split_member.hpp>
+#include <iostream>
+
+struct K {
+ friend class boost::serialization::access;
+ template<class Archive>
+ void save(Archive &ar, const unsigned int version) const
+ {}
+ template<class Archive>
+ void load(Archive &ar, const unsigned int version)
+ {}
+ BOOST_SERIALIZATION_SPLIT_MEMBER()
+};
+
+struct load { int x; };
+
+int main(void) {
+ std::vector<K> v;
+ boost::archive::xml_iarchive ia( std::cin );
+ ia & boost::serialization::make_nvp("v", v);
+ return EXIT_SUCCESS;
+}
+
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