From 19fcec84d8d7d21e796c7624e521b60d28ee21ed Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:45:59 +0200 Subject: Adding upstream version 16.2.11+ds. Signed-off-by: Daniel Baumann --- src/boost/libs/serialization/CMake/CMakeLists.txt | 464 ++++ src/boost/libs/serialization/build/Jamfile.v2 | 139 ++ src/boost/libs/serialization/example/Jamfile.v2 | 42 + src/boost/libs/serialization/example/demo.cpp | 377 +++ .../libs/serialization/example/demo_auto_ptr.cpp | 135 + .../libs/serialization/example/demo_dll_a.hpp | 318 +++ .../libs/serialization/example/demo_dll_a.ipp | 317 +++ .../libs/serialization/example/demo_dll_b.hpp | 113 + .../libs/serialization/example/demo_dll_b.ipp | 112 + .../libs/serialization/example/demo_exception.cpp | 258 ++ .../serialization/example/demo_fast_archive.cpp | 180 ++ src/boost/libs/serialization/example/demo_gps.hpp | 284 +++ src/boost/libs/serialization/example/demo_log.cpp | 76 + .../libs/serialization/example/demo_output.txt | 51 + .../libs/serialization/example/demo_pimpl.cpp | 34 + .../libs/serialization/example/demo_pimpl_A.cpp | 45 + .../libs/serialization/example/demo_pimpl_A.hpp | 24 + .../serialization/example/demo_polymorphic.cpp | 65 + .../serialization/example/demo_polymorphic_A.cpp | 26 + .../serialization/example/demo_polymorphic_A.hpp | 39 + .../example/demo_portable_archive.cpp | 104 + src/boost/libs/serialization/example/demo_save.xml | 129 + .../libs/serialization/example/demo_shared_ptr.cpp | 164 ++ .../libs/serialization/example/demo_simple_log.cpp | 75 + .../serialization/example/demo_trivial_archive.cpp | 94 + src/boost/libs/serialization/example/demo_xml.cpp | 127 + src/boost/libs/serialization/example/demo_xml.hpp | 284 +++ .../libs/serialization/example/demo_xml_load.cpp | 45 + .../libs/serialization/example/demo_xml_save.cpp | 91 + src/boost/libs/serialization/example/demofile.txt | 13 + src/boost/libs/serialization/example/fix_six.cpp | 37 + .../libs/serialization/example/log_archive.cpp | 32 + .../libs/serialization/example/log_archive.hpp | 81 + .../polymorphic_portable_binary_iarchive.cpp | 34 + .../polymorphic_portable_binary_iarchive.hpp | 35 + .../polymorphic_portable_binary_oarchive.cpp | 35 + .../polymorphic_portable_binary_oarchive.hpp | 34 + .../example/portable_binary_archive.hpp | 46 + .../example/portable_binary_iarchive.cpp | 131 + .../example/portable_binary_iarchive.hpp | 204 ++ .../example/portable_binary_oarchive.cpp | 98 + .../example/portable_binary_oarchive.hpp | 191 ++ .../serialization/example/simple_log_archive.hpp | 167 ++ src/boost/libs/serialization/index.html | 15 + src/boost/libs/serialization/meta/libraries.json | 14 + .../libs/serialization/performance/Jamfile.v2 | 48 + .../serialization/performance/binary_archive.hpp | 22 + .../serialization/performance/binary_warchive.hpp | 14 + .../serialization/performance/peformance_array.cpp | 118 + .../performance/performance_binary.cpp | 96 + .../performance/performance_codecvt_null.cpp | 136 ++ .../performance/performance_iterators.cpp | 213 ++ .../performance/performance_iterators_base64.cpp | 100 + .../performance/performance_no_rtti.cpp | 222 ++ .../performance/performance_polymorphic.cpp | 104 + .../performance/performance_simple_class.cpp | 55 + .../performance/performance_utf8_codecvt.cpp | 248 ++ .../performance/performance_vector.cpp | 70 + .../polymorphic_array_binary_archive.hpp | 13 + .../performance/polymorphic_binary_archive.hpp | 13 + .../performance/polymorphic_text_archive.hpp | 13 + .../performance/polymorphic_text_warchive.hpp | 18 + .../performance/polymorphic_xml_archive.hpp | 13 + .../performance/polymorphic_xml_warchive.hpp | 13 + .../performance/portable_binary_archive.hpp | 22 + .../libs/serialization/performance/profile.sh | 39 + .../serialization/performance/text_archive.hpp | 14 + .../serialization/performance/text_warchive.hpp | 19 + .../libs/serialization/performance/xml/Jamfile.v2 | 35 + .../libs/serialization/performance/xml/harness.hpp | 188 ++ .../performance/xml/high_resolution_timer.hpp | 489 ++++ .../performance/xml/int16_results.xml | 1291 ++++++++++ .../serialization/performance/xml/int16_test.cpp | 20 + .../performance/xml/int256_results.xml | 1291 ++++++++++ .../serialization/performance/xml/int256_test.cpp | 20 + .../serialization/performance/xml/int4_results.xml | 1291 ++++++++++ .../serialization/performance/xml/int4_test.cpp | 20 + .../performance/xml/int64_results.xml | 1291 ++++++++++ .../serialization/performance/xml/int64_test.cpp | 20 + .../libs/serialization/performance/xml/macro.hpp | 229 ++ .../libs/serialization/performance/xml/node.hpp | 63 + .../performance/xml/string16_results.xml | 1291 ++++++++++ .../performance/xml/string16_test.cpp | 24 + .../performance/xml/string256_results.xml | 1291 ++++++++++ .../performance/xml/string256_test.cpp | 24 + .../performance/xml/string4_results.xml | 1291 ++++++++++ .../serialization/performance/xml/string4_test.cpp | 24 + .../performance/xml/string64_results.xml | 1291 ++++++++++ .../performance/xml/string64_test.cpp | 24 + .../libs/serialization/performance/xml_archive.hpp | 16 + .../serialization/performance/xml_warchive.hpp | 16 + .../libs/serialization/src/archive_exception.cpp | 154 ++ src/boost/libs/serialization/src/basic_archive.cpp | 93 + .../libs/serialization/src/basic_iarchive.cpp | 601 +++++ .../libs/serialization/src/basic_iserializer.cpp | 34 + .../libs/serialization/src/basic_oarchive.cpp | 470 ++++ .../libs/serialization/src/basic_oserializer.cpp | 34 + .../src/basic_pointer_iserializer.cpp | 31 + .../src/basic_pointer_oserializer.cpp | 31 + .../serialization/src/basic_serializer_map.cpp | 112 + .../serialization/src/basic_text_iprimitive.cpp | 29 + .../serialization/src/basic_text_oprimitive.cpp | 29 + .../serialization/src/basic_text_wiprimitive.cpp | 36 + .../serialization/src/basic_text_woprimitive.cpp | 36 + .../libs/serialization/src/basic_xml_archive.cpp | 52 + .../libs/serialization/src/basic_xml_grammar.ipp | 468 ++++ .../libs/serialization/src/binary_iarchive.cpp | 40 + .../libs/serialization/src/binary_oarchive.cpp | 40 + .../libs/serialization/src/binary_wiarchive.cpp | 47 + .../libs/serialization/src/binary_woarchive.cpp | 44 + src/boost/libs/serialization/src/codecvt_null.cpp | 84 + .../libs/serialization/src/extended_type_info.cpp | 196 ++ .../src/extended_type_info_no_rtti.cpp | 89 + .../src/extended_type_info_typeid.cpp | 167 ++ .../src/polymorphic_binary_iarchive.cpp | 30 + .../src/polymorphic_binary_oarchive.cpp | 30 + .../serialization/src/polymorphic_iarchive.cpp | 30 + .../serialization/src/polymorphic_oarchive.cpp | 30 + .../src/polymorphic_text_iarchive.cpp | 30 + .../src/polymorphic_text_oarchive.cpp | 30 + .../src/polymorphic_text_wiarchive.cpp | 30 + .../src/polymorphic_text_woarchive.cpp | 30 + .../serialization/src/polymorphic_xml_iarchive.cpp | 30 + .../serialization/src/polymorphic_xml_oarchive.cpp | 30 + .../src/polymorphic_xml_wiarchive.cpp | 30 + .../src/polymorphic_xml_woarchive.cpp | 30 + src/boost/libs/serialization/src/stl_port.cpp | 42 + src/boost/libs/serialization/src/text_iarchive.cpp | 33 + src/boost/libs/serialization/src/text_oarchive.cpp | 34 + .../libs/serialization/src/text_wiarchive.cpp | 38 + .../libs/serialization/src/text_woarchive.cpp | 36 + .../libs/serialization/src/utf8_codecvt_facet.cpp | 22 + src/boost/libs/serialization/src/void_cast.cpp | 382 +++ .../serialization/src/xml_archive_exception.cpp | 68 + src/boost/libs/serialization/src/xml_grammar.cpp | 74 + src/boost/libs/serialization/src/xml_iarchive.cpp | 33 + src/boost/libs/serialization/src/xml_oarchive.cpp | 33 + src/boost/libs/serialization/src/xml_wgrammar.cpp | 157 ++ src/boost/libs/serialization/src/xml_wiarchive.cpp | 40 + src/boost/libs/serialization/src/xml_woarchive.cpp | 40 + src/boost/libs/serialization/test/A.cpp | 218 ++ src/boost/libs/serialization/test/A.hpp | 95 + src/boost/libs/serialization/test/A.ipp | 60 + src/boost/libs/serialization/test/B.hpp | 115 + src/boost/libs/serialization/test/C.hpp | 68 + src/boost/libs/serialization/test/D.hpp | 88 + src/boost/libs/serialization/test/J.hpp | 51 + src/boost/libs/serialization/test/Jamfile.v2 | 190 ++ src/boost/libs/serialization/test/b2.log | 2571 ++++++++++++++++++++ src/boost/libs/serialization/test/base.hpp | 46 + .../libs/serialization/test/binary_archive.hpp | 24 + .../libs/serialization/test/binary_warchive.hpp | 14 + src/boost/libs/serialization/test/config_test.cpp | 17 + src/boost/libs/serialization/test/config_test.o | Bin 0 -> 344 bytes src/boost/libs/serialization/test/derived2.hpp | 50 + src/boost/libs/serialization/test/dll_a.cpp | 49 + src/boost/libs/serialization/test/dll_base.cpp | 55 + src/boost/libs/serialization/test/dll_derived2.cpp | 56 + .../serialization/test/dll_polymorphic_base.cpp | 12 + .../test/dll_polymorphic_derived2.cpp | 13 + .../libs/serialization/test/library_status.html | 369 +++ src/boost/libs/serialization/test/links.html | 748 ++++++ .../libs/serialization/test/multi_shared1.cpp | 23 + .../libs/serialization/test/multi_shared2.cpp | 22 + .../test/polymorphic_array_binary_archive.hpp | 13 + .../libs/serialization/test/polymorphic_base.cpp | 38 + .../libs/serialization/test/polymorphic_base.hpp | 66 + .../test/polymorphic_binary_archive.hpp | 13 + .../serialization/test/polymorphic_derived1.cpp | 37 + .../serialization/test/polymorphic_derived1.hpp | 45 + .../serialization/test/polymorphic_derived2.cpp | 52 + .../serialization/test/polymorphic_derived2.hpp | 71 + .../test/polymorphic_text_archive.hpp | 12 + .../test/polymorphic_text_warchive.hpp | 17 + .../serialization/test/polymorphic_xml_archive.hpp | 12 + .../test/polymorphic_xml_warchive.hpp | 12 + .../serialization/test/portable_binary_archive.hpp | 31 + src/boost/libs/serialization/test/test3.dat | 1 + src/boost/libs/serialization/test/test__helper.cpp | 160 ++ src/boost/libs/serialization/test/test_array.cpp | 92 + src/boost/libs/serialization/test/test_binary.cpp | 167 ++ src/boost/libs/serialization/test/test_bitset.cpp | 64 + .../libs/serialization/test/test_boost_array.cpp | 93 + src/boost/libs/serialization/test/test_check.cpp | 145 ++ .../serialization/test/test_class_info_load.cpp | 92 + .../serialization/test/test_class_info_save.cpp | 100 + .../libs/serialization/test/test_codecvt_null.cpp | 124 + src/boost/libs/serialization/test/test_complex.cpp | 82 + .../serialization/test/test_const_load_fail1.cpp | 23 + .../test/test_const_load_fail1_nvp.cpp | 24 + .../serialization/test/test_const_load_fail2.cpp | 23 + .../test/test_const_load_fail2_nvp.cpp | 25 + .../serialization/test/test_const_load_fail3.cpp | 22 + .../test/test_const_load_fail3_nvp.cpp | 24 + .../libs/serialization/test/test_const_pass.cpp | 54 + .../serialization/test/test_const_save_warn1.cpp | 25 + .../test/test_const_save_warn1_nvp.cpp | 26 + .../serialization/test/test_const_save_warn2.cpp | 24 + .../test/test_const_save_warn2_nvp.cpp | 25 + .../serialization/test/test_const_save_warn3.cpp | 24 + .../test/test_const_save_warn3_nvp.cpp | 25 + .../serialization/test/test_const_save_warn4.cpp | 37 + .../test/test_const_save_warn4_nvp.cpp | 39 + .../serialization/test/test_contained_class.cpp | 69 + .../libs/serialization/test/test_cyclic_ptrs.cpp | 204 ++ .../serialization/test/test_delete_pointer.cpp | 119 + src/boost/libs/serialization/test/test_deque.cpp | 55 + src/boost/libs/serialization/test/test_derived.cpp | 148 ++ .../libs/serialization/test/test_derived_class.cpp | 49 + .../serialization/test/test_derived_class_ptr.cpp | 52 + src/boost/libs/serialization/test/test_diamond.cpp | 205 ++ .../serialization/test/test_diamond_complex.cpp | 480 ++++ .../libs/serialization/test/test_dll_exported.cpp | 137 ++ .../libs/serialization/test/test_dll_plugin.cpp | 211 ++ .../libs/serialization/test/test_dll_simple.cpp | 247 ++ .../test/test_enable_shared_from_this.cpp | 195 ++ .../libs/serialization/test/test_exported.cpp | 104 + .../libs/serialization/test/test_forward_list.cpp | 51 + .../serialization/test/test_forward_list_ptrs.cpp | 94 + .../serialization/test/test_helper_support.cpp | 129 + .../libs/serialization/test/test_inclusion.cpp | 43 + .../libs/serialization/test/test_inclusion2.cpp | 25 + .../libs/serialization/test/test_interators.cpp | 0 .../libs/serialization/test/test_interrupts.cpp | 147 ++ .../libs/serialization/test/test_iterators.cpp | 257 ++ .../serialization/test/test_iterators_base64.cpp | 105 + src/boost/libs/serialization/test/test_list.cpp | 59 + .../libs/serialization/test/test_list_ptrs.cpp | 98 + src/boost/libs/serialization/test/test_map.cpp | 149 ++ .../test/test_map_boost_unordered.cpp | 142 ++ .../libs/serialization/test/test_map_hashed.cpp | 139 ++ .../libs/serialization/test/test_map_unordered.cpp | 142 ++ src/boost/libs/serialization/test/test_mi.cpp | 135 + .../serialization/test/test_mult_archive_types.cpp | 124 + .../serialization/test/test_multi_shared_lib.cpp | 30 + .../test/test_multiple_inheritance.cpp | 125 + .../libs/serialization/test/test_multiple_ptrs.cpp | 50 + .../libs/serialization/test/test_native_array.cpp | 103 + .../libs/serialization/test/test_new_operator.cpp | 154 ++ src/boost/libs/serialization/test/test_no_rtti.cpp | 166 ++ .../serialization/test/test_non_default_ctor.cpp | 198 ++ .../serialization/test/test_non_default_ctor2.cpp | 144 ++ .../libs/serialization/test/test_non_intrusive.cpp | 174 ++ .../serialization/test/test_not_serializable.cpp | 47 + .../libs/serialization/test/test_null_ptr.cpp | 89 + src/boost/libs/serialization/test/test_nvp.cpp | 68 + src/boost/libs/serialization/test/test_object.cpp | 70 + .../libs/serialization/test/test_optional.cpp | 96 + .../libs/serialization/test/test_p_helper.cpp | 160 ++ src/boost/libs/serialization/test/test_pimpl.cpp | 48 + .../libs/serialization/test/test_polymorphic.cpp | 94 + .../libs/serialization/test/test_polymorphic2.cpp | 40 + .../libs/serialization/test/test_polymorphic2.hpp | 43 + .../serialization/test/test_polymorphic2imp.cpp | 44 + .../libs/serialization/test/test_polymorphic_A.cpp | 58 + .../libs/serialization/test/test_polymorphic_A.hpp | 30 + .../libs/serialization/test/test_primitive.cpp | 66 + .../serialization/test/test_priority_queue.cpp | 65 + .../libs/serialization/test/test_private_base.cpp | 84 + .../libs/serialization/test/test_private_base2.cpp | 104 + .../libs/serialization/test/test_private_ctor.cpp | 66 + src/boost/libs/serialization/test/test_queue.cpp | 56 + .../libs/serialization/test/test_recursion.cpp | 51 + .../libs/serialization/test/test_registered.cpp | 239 ++ .../test/test_reset_object_address.cpp | 412 ++++ src/boost/libs/serialization/test/test_set.cpp | 111 + .../test/test_set_boost_unordered.cpp | 123 + .../libs/serialization/test/test_set_hashed.cpp | 262 ++ .../libs/serialization/test/test_set_unordered.cpp | 123 + .../libs/serialization/test/test_shared_ptr.cpp | 322 +++ .../serialization/test/test_shared_ptr_132.cpp | 230 ++ .../test/test_shared_ptr_multi_base.cpp | 302 +++ .../libs/serialization/test/test_simple_class.cpp | 83 + .../serialization/test/test_simple_class_ptr.cpp | 53 + .../libs/serialization/test/test_singleton.cpp | 74 + .../test/test_singleton_inherited.cpp | 81 + .../serialization/test/test_singleton_plain.cpp | 77 + src/boost/libs/serialization/test/test_slist.cpp | 55 + .../libs/serialization/test/test_slist_ptrs.cpp | 88 + .../libs/serialization/test/test_smart_cast.cpp | 236 ++ src/boost/libs/serialization/test/test_split.cpp | 165 ++ src/boost/libs/serialization/test/test_stack.cpp | 56 + .../serialization/test/test_static_warning.cpp | 63 + .../serialization/test/test_strong_typedef.cpp | 71 + src/boost/libs/serialization/test/test_tools.hpp | 264 ++ .../libs/serialization/test/test_tracking.cpp | 130 + .../libs/serialization/test/test_traits_fail.cpp | 40 + .../libs/serialization/test/test_traits_pass.cpp | 30 + .../libs/serialization/test/test_unique_ptr.cpp | 70 + .../libs/serialization/test/test_unregistered.cpp | 313 +++ .../libs/serialization/test/test_valarray.cpp | 56 + src/boost/libs/serialization/test/test_variant.cpp | 299 +++ src/boost/libs/serialization/test/test_vector.cpp | 128 + .../libs/serialization/test/test_void_cast.cpp | 165 ++ src/boost/libs/serialization/test/test_z.cpp | 779 ++++++ src/boost/libs/serialization/test/testfile2 | Bin 0 -> 8 bytes src/boost/libs/serialization/test/text_archive.hpp | 13 + .../libs/serialization/test/text_warchive.hpp | 13 + src/boost/libs/serialization/test/xml_archive.hpp | 13 + src/boost/libs/serialization/test/xml_warchive.hpp | 13 + src/boost/libs/serialization/util/test.jam | 208 ++ 301 files changed, 42161 insertions(+) create mode 100644 src/boost/libs/serialization/CMake/CMakeLists.txt create mode 100644 src/boost/libs/serialization/build/Jamfile.v2 create mode 100644 src/boost/libs/serialization/example/Jamfile.v2 create mode 100644 src/boost/libs/serialization/example/demo.cpp create mode 100644 src/boost/libs/serialization/example/demo_auto_ptr.cpp create mode 100644 src/boost/libs/serialization/example/demo_dll_a.hpp create mode 100644 src/boost/libs/serialization/example/demo_dll_a.ipp create mode 100644 src/boost/libs/serialization/example/demo_dll_b.hpp create mode 100644 src/boost/libs/serialization/example/demo_dll_b.ipp create mode 100644 src/boost/libs/serialization/example/demo_exception.cpp create mode 100644 src/boost/libs/serialization/example/demo_fast_archive.cpp create mode 100644 src/boost/libs/serialization/example/demo_gps.hpp create mode 100644 src/boost/libs/serialization/example/demo_log.cpp create mode 100644 src/boost/libs/serialization/example/demo_output.txt create mode 100644 src/boost/libs/serialization/example/demo_pimpl.cpp create mode 100644 src/boost/libs/serialization/example/demo_pimpl_A.cpp create mode 100644 src/boost/libs/serialization/example/demo_pimpl_A.hpp create mode 100644 src/boost/libs/serialization/example/demo_polymorphic.cpp create mode 100644 src/boost/libs/serialization/example/demo_polymorphic_A.cpp create mode 100644 src/boost/libs/serialization/example/demo_polymorphic_A.hpp create mode 100644 src/boost/libs/serialization/example/demo_portable_archive.cpp create mode 100644 src/boost/libs/serialization/example/demo_save.xml create mode 100644 src/boost/libs/serialization/example/demo_shared_ptr.cpp create mode 100644 src/boost/libs/serialization/example/demo_simple_log.cpp create mode 100644 src/boost/libs/serialization/example/demo_trivial_archive.cpp create mode 100644 src/boost/libs/serialization/example/demo_xml.cpp create mode 100644 src/boost/libs/serialization/example/demo_xml.hpp create mode 100644 src/boost/libs/serialization/example/demo_xml_load.cpp create mode 100644 src/boost/libs/serialization/example/demo_xml_save.cpp create mode 100644 src/boost/libs/serialization/example/demofile.txt create mode 100644 src/boost/libs/serialization/example/fix_six.cpp create mode 100644 src/boost/libs/serialization/example/log_archive.cpp create mode 100644 src/boost/libs/serialization/example/log_archive.hpp create mode 100644 src/boost/libs/serialization/example/polymorphic_portable_binary_iarchive.cpp create mode 100644 src/boost/libs/serialization/example/polymorphic_portable_binary_iarchive.hpp create mode 100644 src/boost/libs/serialization/example/polymorphic_portable_binary_oarchive.cpp create mode 100644 src/boost/libs/serialization/example/polymorphic_portable_binary_oarchive.hpp create mode 100644 src/boost/libs/serialization/example/portable_binary_archive.hpp create mode 100644 src/boost/libs/serialization/example/portable_binary_iarchive.cpp create mode 100644 src/boost/libs/serialization/example/portable_binary_iarchive.hpp create mode 100644 src/boost/libs/serialization/example/portable_binary_oarchive.cpp create mode 100644 src/boost/libs/serialization/example/portable_binary_oarchive.hpp create mode 100644 src/boost/libs/serialization/example/simple_log_archive.hpp create mode 100644 src/boost/libs/serialization/index.html create mode 100644 src/boost/libs/serialization/meta/libraries.json create mode 100644 src/boost/libs/serialization/performance/Jamfile.v2 create mode 100644 src/boost/libs/serialization/performance/binary_archive.hpp create mode 100644 src/boost/libs/serialization/performance/binary_warchive.hpp create mode 100644 src/boost/libs/serialization/performance/peformance_array.cpp create mode 100644 src/boost/libs/serialization/performance/performance_binary.cpp create mode 100644 src/boost/libs/serialization/performance/performance_codecvt_null.cpp create mode 100644 src/boost/libs/serialization/performance/performance_iterators.cpp create mode 100644 src/boost/libs/serialization/performance/performance_iterators_base64.cpp create mode 100644 src/boost/libs/serialization/performance/performance_no_rtti.cpp create mode 100644 src/boost/libs/serialization/performance/performance_polymorphic.cpp create mode 100644 src/boost/libs/serialization/performance/performance_simple_class.cpp create mode 100644 src/boost/libs/serialization/performance/performance_utf8_codecvt.cpp create mode 100644 src/boost/libs/serialization/performance/performance_vector.cpp create mode 100644 src/boost/libs/serialization/performance/polymorphic_array_binary_archive.hpp create mode 100644 src/boost/libs/serialization/performance/polymorphic_binary_archive.hpp create mode 100644 src/boost/libs/serialization/performance/polymorphic_text_archive.hpp create mode 100644 src/boost/libs/serialization/performance/polymorphic_text_warchive.hpp create mode 100644 src/boost/libs/serialization/performance/polymorphic_xml_archive.hpp create mode 100644 src/boost/libs/serialization/performance/polymorphic_xml_warchive.hpp create mode 100644 src/boost/libs/serialization/performance/portable_binary_archive.hpp create mode 100755 src/boost/libs/serialization/performance/profile.sh create mode 100644 src/boost/libs/serialization/performance/text_archive.hpp create mode 100644 src/boost/libs/serialization/performance/text_warchive.hpp create mode 100644 src/boost/libs/serialization/performance/xml/Jamfile.v2 create mode 100644 src/boost/libs/serialization/performance/xml/harness.hpp create mode 100644 src/boost/libs/serialization/performance/xml/high_resolution_timer.hpp create mode 100644 src/boost/libs/serialization/performance/xml/int16_results.xml create mode 100644 src/boost/libs/serialization/performance/xml/int16_test.cpp create mode 100644 src/boost/libs/serialization/performance/xml/int256_results.xml create mode 100644 src/boost/libs/serialization/performance/xml/int256_test.cpp create mode 100644 src/boost/libs/serialization/performance/xml/int4_results.xml create mode 100644 src/boost/libs/serialization/performance/xml/int4_test.cpp create mode 100644 src/boost/libs/serialization/performance/xml/int64_results.xml create mode 100644 src/boost/libs/serialization/performance/xml/int64_test.cpp create mode 100644 src/boost/libs/serialization/performance/xml/macro.hpp create mode 100644 src/boost/libs/serialization/performance/xml/node.hpp create mode 100644 src/boost/libs/serialization/performance/xml/string16_results.xml create mode 100644 src/boost/libs/serialization/performance/xml/string16_test.cpp create mode 100644 src/boost/libs/serialization/performance/xml/string256_results.xml create mode 100644 src/boost/libs/serialization/performance/xml/string256_test.cpp create mode 100644 src/boost/libs/serialization/performance/xml/string4_results.xml create mode 100644 src/boost/libs/serialization/performance/xml/string4_test.cpp create mode 100644 src/boost/libs/serialization/performance/xml/string64_results.xml create mode 100644 src/boost/libs/serialization/performance/xml/string64_test.cpp create mode 100644 src/boost/libs/serialization/performance/xml_archive.hpp create mode 100644 src/boost/libs/serialization/performance/xml_warchive.hpp create mode 100644 src/boost/libs/serialization/src/archive_exception.cpp create mode 100644 src/boost/libs/serialization/src/basic_archive.cpp create mode 100644 src/boost/libs/serialization/src/basic_iarchive.cpp create mode 100644 src/boost/libs/serialization/src/basic_iserializer.cpp create mode 100644 src/boost/libs/serialization/src/basic_oarchive.cpp create mode 100644 src/boost/libs/serialization/src/basic_oserializer.cpp create mode 100644 src/boost/libs/serialization/src/basic_pointer_iserializer.cpp create mode 100644 src/boost/libs/serialization/src/basic_pointer_oserializer.cpp create mode 100644 src/boost/libs/serialization/src/basic_serializer_map.cpp create mode 100644 src/boost/libs/serialization/src/basic_text_iprimitive.cpp create mode 100644 src/boost/libs/serialization/src/basic_text_oprimitive.cpp create mode 100644 src/boost/libs/serialization/src/basic_text_wiprimitive.cpp create mode 100644 src/boost/libs/serialization/src/basic_text_woprimitive.cpp create mode 100644 src/boost/libs/serialization/src/basic_xml_archive.cpp create mode 100644 src/boost/libs/serialization/src/basic_xml_grammar.ipp create mode 100644 src/boost/libs/serialization/src/binary_iarchive.cpp create mode 100644 src/boost/libs/serialization/src/binary_oarchive.cpp create mode 100644 src/boost/libs/serialization/src/binary_wiarchive.cpp create mode 100644 src/boost/libs/serialization/src/binary_woarchive.cpp create mode 100644 src/boost/libs/serialization/src/codecvt_null.cpp create mode 100644 src/boost/libs/serialization/src/extended_type_info.cpp create mode 100644 src/boost/libs/serialization/src/extended_type_info_no_rtti.cpp create mode 100644 src/boost/libs/serialization/src/extended_type_info_typeid.cpp create mode 100644 src/boost/libs/serialization/src/polymorphic_binary_iarchive.cpp create mode 100644 src/boost/libs/serialization/src/polymorphic_binary_oarchive.cpp create mode 100644 src/boost/libs/serialization/src/polymorphic_iarchive.cpp create mode 100644 src/boost/libs/serialization/src/polymorphic_oarchive.cpp create mode 100644 src/boost/libs/serialization/src/polymorphic_text_iarchive.cpp create mode 100644 src/boost/libs/serialization/src/polymorphic_text_oarchive.cpp create mode 100644 src/boost/libs/serialization/src/polymorphic_text_wiarchive.cpp create mode 100644 src/boost/libs/serialization/src/polymorphic_text_woarchive.cpp create mode 100644 src/boost/libs/serialization/src/polymorphic_xml_iarchive.cpp create mode 100644 src/boost/libs/serialization/src/polymorphic_xml_oarchive.cpp create mode 100644 src/boost/libs/serialization/src/polymorphic_xml_wiarchive.cpp create mode 100644 src/boost/libs/serialization/src/polymorphic_xml_woarchive.cpp create mode 100644 src/boost/libs/serialization/src/stl_port.cpp create mode 100644 src/boost/libs/serialization/src/text_iarchive.cpp create mode 100644 src/boost/libs/serialization/src/text_oarchive.cpp create mode 100644 src/boost/libs/serialization/src/text_wiarchive.cpp create mode 100644 src/boost/libs/serialization/src/text_woarchive.cpp create mode 100644 src/boost/libs/serialization/src/utf8_codecvt_facet.cpp create mode 100644 src/boost/libs/serialization/src/void_cast.cpp create mode 100644 src/boost/libs/serialization/src/xml_archive_exception.cpp create mode 100644 src/boost/libs/serialization/src/xml_grammar.cpp create mode 100644 src/boost/libs/serialization/src/xml_iarchive.cpp create mode 100644 src/boost/libs/serialization/src/xml_oarchive.cpp create mode 100644 src/boost/libs/serialization/src/xml_wgrammar.cpp create mode 100644 src/boost/libs/serialization/src/xml_wiarchive.cpp create mode 100644 src/boost/libs/serialization/src/xml_woarchive.cpp create mode 100644 src/boost/libs/serialization/test/A.cpp create mode 100644 src/boost/libs/serialization/test/A.hpp create mode 100644 src/boost/libs/serialization/test/A.ipp create mode 100644 src/boost/libs/serialization/test/B.hpp create mode 100644 src/boost/libs/serialization/test/C.hpp create mode 100644 src/boost/libs/serialization/test/D.hpp create mode 100644 src/boost/libs/serialization/test/J.hpp create mode 100644 src/boost/libs/serialization/test/Jamfile.v2 create mode 100644 src/boost/libs/serialization/test/b2.log create mode 100644 src/boost/libs/serialization/test/base.hpp create mode 100644 src/boost/libs/serialization/test/binary_archive.hpp create mode 100644 src/boost/libs/serialization/test/binary_warchive.hpp create mode 100644 src/boost/libs/serialization/test/config_test.cpp create mode 100644 src/boost/libs/serialization/test/config_test.o create mode 100644 src/boost/libs/serialization/test/derived2.hpp create mode 100644 src/boost/libs/serialization/test/dll_a.cpp create mode 100644 src/boost/libs/serialization/test/dll_base.cpp create mode 100644 src/boost/libs/serialization/test/dll_derived2.cpp create mode 100644 src/boost/libs/serialization/test/dll_polymorphic_base.cpp create mode 100644 src/boost/libs/serialization/test/dll_polymorphic_derived2.cpp create mode 100644 src/boost/libs/serialization/test/library_status.html create mode 100644 src/boost/libs/serialization/test/links.html create mode 100644 src/boost/libs/serialization/test/multi_shared1.cpp create mode 100644 src/boost/libs/serialization/test/multi_shared2.cpp create mode 100644 src/boost/libs/serialization/test/polymorphic_array_binary_archive.hpp create mode 100644 src/boost/libs/serialization/test/polymorphic_base.cpp create mode 100644 src/boost/libs/serialization/test/polymorphic_base.hpp create mode 100644 src/boost/libs/serialization/test/polymorphic_binary_archive.hpp create mode 100644 src/boost/libs/serialization/test/polymorphic_derived1.cpp create mode 100644 src/boost/libs/serialization/test/polymorphic_derived1.hpp create mode 100644 src/boost/libs/serialization/test/polymorphic_derived2.cpp create mode 100644 src/boost/libs/serialization/test/polymorphic_derived2.hpp create mode 100644 src/boost/libs/serialization/test/polymorphic_text_archive.hpp create mode 100644 src/boost/libs/serialization/test/polymorphic_text_warchive.hpp create mode 100644 src/boost/libs/serialization/test/polymorphic_xml_archive.hpp create mode 100644 src/boost/libs/serialization/test/polymorphic_xml_warchive.hpp create mode 100644 src/boost/libs/serialization/test/portable_binary_archive.hpp create mode 100644 src/boost/libs/serialization/test/test3.dat create mode 100644 src/boost/libs/serialization/test/test__helper.cpp create mode 100644 src/boost/libs/serialization/test/test_array.cpp create mode 100644 src/boost/libs/serialization/test/test_binary.cpp create mode 100644 src/boost/libs/serialization/test/test_bitset.cpp create mode 100644 src/boost/libs/serialization/test/test_boost_array.cpp create mode 100644 src/boost/libs/serialization/test/test_check.cpp create mode 100644 src/boost/libs/serialization/test/test_class_info_load.cpp create mode 100644 src/boost/libs/serialization/test/test_class_info_save.cpp create mode 100644 src/boost/libs/serialization/test/test_codecvt_null.cpp create mode 100644 src/boost/libs/serialization/test/test_complex.cpp create mode 100644 src/boost/libs/serialization/test/test_const_load_fail1.cpp create mode 100644 src/boost/libs/serialization/test/test_const_load_fail1_nvp.cpp create mode 100644 src/boost/libs/serialization/test/test_const_load_fail2.cpp create mode 100644 src/boost/libs/serialization/test/test_const_load_fail2_nvp.cpp create mode 100644 src/boost/libs/serialization/test/test_const_load_fail3.cpp create mode 100644 src/boost/libs/serialization/test/test_const_load_fail3_nvp.cpp create mode 100644 src/boost/libs/serialization/test/test_const_pass.cpp create mode 100644 src/boost/libs/serialization/test/test_const_save_warn1.cpp create mode 100644 src/boost/libs/serialization/test/test_const_save_warn1_nvp.cpp create mode 100644 src/boost/libs/serialization/test/test_const_save_warn2.cpp create mode 100644 src/boost/libs/serialization/test/test_const_save_warn2_nvp.cpp create mode 100644 src/boost/libs/serialization/test/test_const_save_warn3.cpp create mode 100644 src/boost/libs/serialization/test/test_const_save_warn3_nvp.cpp create mode 100644 src/boost/libs/serialization/test/test_const_save_warn4.cpp create mode 100644 src/boost/libs/serialization/test/test_const_save_warn4_nvp.cpp create mode 100644 src/boost/libs/serialization/test/test_contained_class.cpp create mode 100644 src/boost/libs/serialization/test/test_cyclic_ptrs.cpp create mode 100644 src/boost/libs/serialization/test/test_delete_pointer.cpp create mode 100644 src/boost/libs/serialization/test/test_deque.cpp create mode 100644 src/boost/libs/serialization/test/test_derived.cpp create mode 100644 src/boost/libs/serialization/test/test_derived_class.cpp create mode 100644 src/boost/libs/serialization/test/test_derived_class_ptr.cpp create mode 100644 src/boost/libs/serialization/test/test_diamond.cpp create mode 100644 src/boost/libs/serialization/test/test_diamond_complex.cpp create mode 100644 src/boost/libs/serialization/test/test_dll_exported.cpp create mode 100644 src/boost/libs/serialization/test/test_dll_plugin.cpp create mode 100644 src/boost/libs/serialization/test/test_dll_simple.cpp create mode 100644 src/boost/libs/serialization/test/test_enable_shared_from_this.cpp create mode 100644 src/boost/libs/serialization/test/test_exported.cpp create mode 100644 src/boost/libs/serialization/test/test_forward_list.cpp create mode 100644 src/boost/libs/serialization/test/test_forward_list_ptrs.cpp create mode 100644 src/boost/libs/serialization/test/test_helper_support.cpp create mode 100644 src/boost/libs/serialization/test/test_inclusion.cpp create mode 100644 src/boost/libs/serialization/test/test_inclusion2.cpp create mode 100644 src/boost/libs/serialization/test/test_interators.cpp create mode 100644 src/boost/libs/serialization/test/test_interrupts.cpp create mode 100644 src/boost/libs/serialization/test/test_iterators.cpp create mode 100644 src/boost/libs/serialization/test/test_iterators_base64.cpp create mode 100644 src/boost/libs/serialization/test/test_list.cpp create mode 100644 src/boost/libs/serialization/test/test_list_ptrs.cpp create mode 100644 src/boost/libs/serialization/test/test_map.cpp create mode 100644 src/boost/libs/serialization/test/test_map_boost_unordered.cpp create mode 100644 src/boost/libs/serialization/test/test_map_hashed.cpp create mode 100644 src/boost/libs/serialization/test/test_map_unordered.cpp create mode 100644 src/boost/libs/serialization/test/test_mi.cpp create mode 100644 src/boost/libs/serialization/test/test_mult_archive_types.cpp create mode 100644 src/boost/libs/serialization/test/test_multi_shared_lib.cpp create mode 100644 src/boost/libs/serialization/test/test_multiple_inheritance.cpp create mode 100644 src/boost/libs/serialization/test/test_multiple_ptrs.cpp create mode 100644 src/boost/libs/serialization/test/test_native_array.cpp create mode 100644 src/boost/libs/serialization/test/test_new_operator.cpp create mode 100644 src/boost/libs/serialization/test/test_no_rtti.cpp create mode 100644 src/boost/libs/serialization/test/test_non_default_ctor.cpp create mode 100644 src/boost/libs/serialization/test/test_non_default_ctor2.cpp create mode 100644 src/boost/libs/serialization/test/test_non_intrusive.cpp create mode 100644 src/boost/libs/serialization/test/test_not_serializable.cpp create mode 100644 src/boost/libs/serialization/test/test_null_ptr.cpp create mode 100644 src/boost/libs/serialization/test/test_nvp.cpp create mode 100644 src/boost/libs/serialization/test/test_object.cpp create mode 100644 src/boost/libs/serialization/test/test_optional.cpp create mode 100644 src/boost/libs/serialization/test/test_p_helper.cpp create mode 100644 src/boost/libs/serialization/test/test_pimpl.cpp create mode 100644 src/boost/libs/serialization/test/test_polymorphic.cpp create mode 100644 src/boost/libs/serialization/test/test_polymorphic2.cpp create mode 100644 src/boost/libs/serialization/test/test_polymorphic2.hpp create mode 100644 src/boost/libs/serialization/test/test_polymorphic2imp.cpp create mode 100644 src/boost/libs/serialization/test/test_polymorphic_A.cpp create mode 100644 src/boost/libs/serialization/test/test_polymorphic_A.hpp create mode 100644 src/boost/libs/serialization/test/test_primitive.cpp create mode 100644 src/boost/libs/serialization/test/test_priority_queue.cpp create mode 100644 src/boost/libs/serialization/test/test_private_base.cpp create mode 100644 src/boost/libs/serialization/test/test_private_base2.cpp create mode 100644 src/boost/libs/serialization/test/test_private_ctor.cpp create mode 100644 src/boost/libs/serialization/test/test_queue.cpp create mode 100644 src/boost/libs/serialization/test/test_recursion.cpp create mode 100644 src/boost/libs/serialization/test/test_registered.cpp create mode 100644 src/boost/libs/serialization/test/test_reset_object_address.cpp create mode 100644 src/boost/libs/serialization/test/test_set.cpp create mode 100644 src/boost/libs/serialization/test/test_set_boost_unordered.cpp create mode 100644 src/boost/libs/serialization/test/test_set_hashed.cpp create mode 100644 src/boost/libs/serialization/test/test_set_unordered.cpp create mode 100644 src/boost/libs/serialization/test/test_shared_ptr.cpp create mode 100644 src/boost/libs/serialization/test/test_shared_ptr_132.cpp create mode 100644 src/boost/libs/serialization/test/test_shared_ptr_multi_base.cpp create mode 100644 src/boost/libs/serialization/test/test_simple_class.cpp create mode 100644 src/boost/libs/serialization/test/test_simple_class_ptr.cpp create mode 100644 src/boost/libs/serialization/test/test_singleton.cpp create mode 100644 src/boost/libs/serialization/test/test_singleton_inherited.cpp create mode 100644 src/boost/libs/serialization/test/test_singleton_plain.cpp create mode 100644 src/boost/libs/serialization/test/test_slist.cpp create mode 100644 src/boost/libs/serialization/test/test_slist_ptrs.cpp create mode 100644 src/boost/libs/serialization/test/test_smart_cast.cpp create mode 100644 src/boost/libs/serialization/test/test_split.cpp create mode 100644 src/boost/libs/serialization/test/test_stack.cpp create mode 100644 src/boost/libs/serialization/test/test_static_warning.cpp create mode 100644 src/boost/libs/serialization/test/test_strong_typedef.cpp create mode 100644 src/boost/libs/serialization/test/test_tools.hpp create mode 100644 src/boost/libs/serialization/test/test_tracking.cpp create mode 100644 src/boost/libs/serialization/test/test_traits_fail.cpp create mode 100644 src/boost/libs/serialization/test/test_traits_pass.cpp create mode 100644 src/boost/libs/serialization/test/test_unique_ptr.cpp create mode 100644 src/boost/libs/serialization/test/test_unregistered.cpp create mode 100644 src/boost/libs/serialization/test/test_valarray.cpp create mode 100644 src/boost/libs/serialization/test/test_variant.cpp create mode 100644 src/boost/libs/serialization/test/test_vector.cpp create mode 100644 src/boost/libs/serialization/test/test_void_cast.cpp create mode 100644 src/boost/libs/serialization/test/test_z.cpp create mode 100644 src/boost/libs/serialization/test/testfile2 create mode 100644 src/boost/libs/serialization/test/text_archive.hpp create mode 100644 src/boost/libs/serialization/test/text_warchive.hpp create mode 100644 src/boost/libs/serialization/test/xml_archive.hpp create mode 100644 src/boost/libs/serialization/test/xml_warchive.hpp create mode 100644 src/boost/libs/serialization/util/test.jam (limited to 'src/boost/libs/serialization') diff --git a/src/boost/libs/serialization/CMake/CMakeLists.txt b/src/boost/libs/serialization/CMake/CMakeLists.txt new file mode 100644 index 000000000..00868f853 --- /dev/null +++ b/src/boost/libs/serialization/CMake/CMakeLists.txt @@ -0,0 +1,464 @@ +# CMake build control file for Serialization Library tests + +cmake_minimum_required(VERSION 3.0) + +if (POLICY CMP0054) + cmake_policy (SET CMP0054 NEW) +endif (POLICY CMP0054) + +if (POLICY CMP0063) + cmake_policy (SET CMP0063 NEW) +endif (POLICY CMP0063) + +if(Boost_USE_STATIC_LIBS) + project("Serialization-Static") +else() + project("Serialization-Shared") +endif() + +# +# Compiler settings +# + +message(STATUS "compiler is ${CMAKE_CXX_COMPILER_ID}" ) +add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS}) + +if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" ) + add_definitions( -ftemplate-depth=300 ) + # we use gcc to test for C++03 compatibility + add_definitions( -std=c++03 ) + message(STATUS "compiler is g++ c++03") + set(COMPILER_SUPPORTS_CXX11 FALSE) +elseif( CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" ) + add_definitions( /wd4996 ) + message(STATUS "compiler is MSVC") + set(COMPILER_SUPPORTS_CXX11 TRUE) +elseif( CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" ) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=300") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++03") + #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + set(CMAKE_CXX_FLAGS_DEBUG "-g -O0" ) + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O3" ) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -dead_strip") + set(COMPILER_SUPPORTS_CXX11 FALSE) +endif() + +# +# Locate Project Prerequisites +# + +# Boost + +# note: we're assuming that boost has been built with: +# ./b2 —-layout=versioned toolset=clang-darwin link=static,shared variant=debug,release stage + +########################### +# special notes for Xcode. + +# these three should result in CMake setting the variables +# Boost_SERIALIZATION_LIBRARY_DEBUG … to the correct values. + +# But my current version of CMake doesn't automatically set the library names +# to point to the the libraries to be used. The variables are created +# but they are not initialized. So be prepared to set these variables by hand. +# If you want to use the static libraries - point to the boost libraries ending +# in ".a". If you want to use the shared boost libraries - point to the libraries +# ending in ".dylib". + +# But wait - there's more. +# if both lib.a and lib.dylib both exist in the library directory, Xcode will +# automatically chose the *.dylib one - and there's nothing you can do to fix this. +# So my recommendation is +# a) to place the compiled libraries in two different directories +# - e.g. stage/lib-static/*.a and stage/lib-shared/*.dylib +# and set the CMake variable Boost_LIBRARY_DIR to point to one or the other +# b) create two different CMake build directories - build-static and build-shared +# and switch between projects as desired. I like to test both since +# there are things like dead code elimination and visibility which vary +# between the two environments. +# +# caveat - as I write this, I've been unable to get the tests on the shared +# library to function. Problem is that one needs to either put the shared +# libraries in a special known place or set an environmental +# variable which points to the shared library directory. I prefer the latter +# but I've been unable to figure out how to get Xcode to do on a global basis +# and it's not practical to do this for 247 test targets one at a time. + +# c) The targets in the project will by default be built as universal 32/64 binaries +# I have yet to experiment with these yet so I just set the target to 64 bit. + +# end special note for Xcode +############################ + +# +# IDE settings +# + +set(Boost_DEBUG true) +set(Boost_ADDRESS_MODEL 64 CACHE STRING "32/64 bits") +set(Boost_USE_STATIC_LIBS TRUE CACHE BOOL "Use static libraries") +set(Boost_USE_MULTITHREADED ON) +set(Boost_DETAILED_FAILURE_MSG true) + +get_filename_component(BOOST_ROOT "../../.." ABSOLUTE) +string(CONCAT boost_headers ${BOOST_ROOT} "/boost") +if(NOT IS_DIRECTORY ${boost_headers}) + message(FATAL_ERROR "BOOST_ROOT not found") +else() + message(STATUS "BOOST_ROOT is ${BOOST_ROOT}") +endif() + +if(Boost_USE_STATIC_LIBS) + message(STATUS "Link to Boost static libraries") + set(BUILD_SHARED_LIBS NO) + string(CONCAT boost_stage ${BOOST_ROOT} "/stage/Debug/static") +else() + message(STATUS "Link to Boost shared libraries") + set(BUILD_SHARED_LIBS YES) + add_definitions( "-DBOOST_ALL_DYN_LINK=1") + add_definitions( "-DBOOST_ALL_NO_LIB=1") + add_definitions( "-DBOOST_LIB_DIAGNOSTICS=1") + set(CMAKE_CXX_VISIBILITY_PRESET hidden) + set(VISIBILITY_INLINES_HIDDEN YES) + string(CONCAT boost_stage ${BOOST_ROOT} "/stage/Debug/shared") +endif() + +include(CheckIncludeFileCXX) + +message(STATUS "Boost directories found at ${boost_headers}") +message(STATUS "Boost libraries found at ${boost_stage}") +set(CMAKE_LIBRARY_PATH ${boost_stage}) + +# list of archive names for which tests should be generated +#set(archive_list text_archive text_warchive binary_archive xml_archive xml_warchive) +set(archive_list text_archive) + +# list of tests generated by each function call +set(test_list) + +include_directories(BEFORE ${BOOST_ROOT}) + +########################### +# library builds + +add_library(serialization + ../src/archive_exception.cpp + ../src/basic_archive.cpp + ../src/basic_iarchive.cpp + ../src/basic_iserializer.cpp + ../src/basic_oarchive.cpp + ../src/basic_oserializer.cpp + ../src/basic_pointer_iserializer.cpp + ../src/basic_pointer_oserializer.cpp + ../src/basic_serializer_map.cpp + ../src/basic_text_iprimitive.cpp + ../src/basic_text_oprimitive.cpp + ../src/basic_xml_archive.cpp + ../src/binary_iarchive.cpp + ../src/binary_oarchive.cpp + ../src/extended_type_info_no_rtti.cpp + ../src/extended_type_info_typeid.cpp + ../src/extended_type_info.cpp + ../src/polymorphic_iarchive.cpp + ../src/polymorphic_oarchive.cpp + ../src/polymorphic_text_iarchive.cpp + ../src/polymorphic_text_oarchive.cpp + ../src/stl_port.cpp + ../src/text_iarchive.cpp + ../src/text_oarchive.cpp + ../src/void_cast.cpp + ../src/xml_archive_exception.cpp + ../src/xml_iarchive.cpp + ../src/xml_oarchive.cpp + ../src/xml_grammar.cpp + ../src/utf8_codecvt_facet.cpp + ../src/basic_xml_grammar.ipp # doesn't show up in "Source Files" in Xcode"' +) + +add_library(wserialization + ../src/codecvt_null.cpp + ../src/basic_text_wiprimitive.cpp + ../src/basic_text_woprimitive.cpp + ../src/text_wiarchive.cpp + ../src/text_woarchive.cpp + ../src/xml_wiarchive.cpp + ../src/xml_woarchive.cpp + ../src/xml_wgrammar.cpp + ../src/basic_xml_grammar.ipp # doesn't show up in "Source Files" in Xcode"' +) + +set_property(TARGET wserialization PROPERTY LINK_LIBRARIES serialization) + +# end library build +########################### + +add_library(filesystem SHARED IMPORTED GLOBAL ) # or STATIC instead of SHARED +set_target_properties(filesystem PROPERTIES + IMPORTED_LOCATION "${CMAKE_LIBRARY_PATH}/libboost_filesystem-clang-darwin-mt-d-x64-1_69.dylib" +) +get_property(loc TARGET filesystem PROPERTY LOCATION) +message(STATUS "filesystem library located at:${loc}") + +########################### +# test targets + +function( serialization_test test_name) + set(arglist) + foreach(a IN ITEMS ${ARGN} ) + set(arglist ${arglist} ../test/${a}.cpp) + endforeach() + message(STATUS ${test_name}) + add_executable( ${test_name} ../test/${test_name}.cpp ${arglist} ) + target_link_libraries(${test_name} serialization wserialization filesystem) + add_test( ${test_name} ${test_name} ) +endfunction(serialization_test) + +function(archive_test test_name) + set(test_list) + set(arglist) + foreach(a IN ITEMS ${ARGN} ) + set(arglist ${arglist} ../test/${a}.cpp) + endforeach() + foreach( + archive-name + IN ITEMS ${archive_list} + ) + set(amended_test_name ${test_name}_${archive-name}) + add_executable(${amended_test_name} ../test/${test_name}.cpp ${arglist}) + set_property( + TARGET ${amended_test_name} + PROPERTY COMPILE_DEFINITIONS BOOST_ARCHIVE_TEST=${archive-name}.hpp + ) + message(STATUS ${amended_test_name} " " ${arglist} " " ${archive-name}) + target_link_libraries(${amended_test_name} serialization wserialization filesystem) + add_test(${amended_test_name} ${amended_test_name}) + set(test_list ${test_list} ${amended_test_name} PARENT_SCOPE) + endforeach() +endfunction(archive_test) + +function(polymorphic_archive_test test_name) + set(test_list) + set(arglist) + foreach(a IN ITEMS ${ARGN} ) + set(arglist ${arglist} ../test/${a}.cpp) + endforeach() + foreach( + archive-name + IN ITEMS ${archive_list} + ) + set(amended_archive_name polymorphic_${archive-name}) + set(amended_test_name ${test_name}_${amended_archive_name}) + add_executable(${amended_test_name} ../test/${test_name}.cpp ${arglist}) + set_property( + TARGET ${amended_test_name} + PROPERTY COMPILE_DEFINITIONS BOOST_ARCHIVE_TEST=${amended_archive_name}.hpp + ) + message(STATUS ${amended_test_name} " " ${arglist} " " ${amended_archive_name}) + target_link_libraries(${amended_test_name} serialization wserialization filesystem) + add_test(${amended_test_name} ${amended_test_name}) + set(test_list ${test_list} ${amended_test_name} PARENT_SCOPE) + endforeach() +endfunction(polymorphic_archive_test) + +enable_testing() + +message(STATUS dll_a) +add_library(dll_a SHARED ../test/dll_a.cpp) +target_link_libraries(dll_a serialization) +serialization_test(test_dll_simple) +target_link_libraries(test_dll_simple dll_a serialization) + +message(STATUS dll_polymorphic_base) +add_library(dll_polymorphic_base SHARED ../test/dll_polymorphic_base.cpp) +target_link_libraries(dll_polymorphic_base serialization) + +message(STATUS dll_polymorphic_derived2) +add_library(dll_polymorphic_derived2 SHARED ../test/dll_polymorphic_derived2.cpp) +target_link_libraries(dll_polymorphic_derived2 dll_polymorphic_base serialization) + +# compile test_dll_plugin.cpp +# Running the following test requires that the test know the directory +# in which the dll is stored. I don't know how to extract this from bjam +# serialization(test_dll_plugin : : dll_polymorphic_derived2_lib) + +serialization_test(test_private_ctor) +serialization_test(test_reset_object_address A) +serialization_test(test_void_cast) +serialization_test(test_mult_archive_types) +serialization_test(test_iterators) +serialization_test(test_iterators_base64) +serialization_test(test_inclusion) +serialization_test(test_inclusion2) +serialization_test(test_smart_cast) +serialization_test(test_codecvt_null ../src/codecvt_null) +serialization_test(test_strong_typedef) +serialization_test(test_singleton) +serialization_test(test_singleton_inherited) +serialization_test(test_singleton_plain) + +archive_test(test_native_array A) +archive_test(test_boost_array A) +if(COMPILER_SUPPORTS_CXX11) + archive_test(test_array A) +endif() +archive_test(test_binary) +archive_test(test_bitset) +archive_test(test_class_info_save) +archive_test(test_class_info_load) +archive_test(test_complex) +archive_test(test_contained_class A) +archive_test(test_cyclic_ptrs A) +archive_test(test_delete_pointer) +archive_test(test_deque A) +archive_test(test_derived) +archive_test(test_derived_class A) +archive_test(test_diamond) +archive_test(test_diamond_complex) +archive_test(test_forward_list A) +archive_test(test_forward_list_ptrs A) +archive_test(test_helper_support) +archive_test(test_interrupts) +archive_test(test_list A) +archive_test(test_list_ptrs A) +archive_test(test_map A) +archive_test(test_map_boost_unordered A) +archive_test(test_mi) +archive_test(test_multiple_ptrs A) +archive_test(test_multiple_inheritance) +archive_test(test_new_operator A) +archive_test(test_non_intrusive) +archive_test(test_non_default_ctor) +archive_test(test_non_default_ctor2) +archive_test(test_null_ptr) +archive_test(test_nvp A) +archive_test(test_object) +archive_test(test_optional) +archive_test(test_primitive) +archive_test(test_priority_queue A) +archive_test(test_private_base) +archive_test(test_private_base2) +archive_test(test_queue A) +archive_test(test_recursion A) +archive_test(test_registered) +archive_test(test_shared_ptr) +archive_test(test_shared_ptr_multi_base) +archive_test(test_shared_ptr_132) +archive_test(test_simple_class A) +archive_test(test_simple_class_ptr A) +CHECK_INCLUDE_FILE_CXX(slist SLIST_FOUND) +if(SLIST_FOUND) + message(STATUS "slist header found") + archive_test(test_slist A) + archive_test(test_slist_ptr A) +else() + message(STATUS "slist header NOT found") +endif() +archive_test(test_stack A) +archive_test(test_split) +archive_test(test_tracking) +archive_test(test_unregistered) +archive_test(test_unique_ptr) +archive_test(test_valarray) +archive_test(test_variant A) +archive_test(test_vector A) +archive_test(test_set A) +archive_test(test_set_boost_unordered A) +if(COMPILER_SUPPORTS_CXX11) + archive_test(test_set_unordered A) +else() + CHECK_INCLUDE_FILE_CXX(hash_set HASH_SET_FOUND) + if(HASH_SET_FOUND) + archive_test(test_set_hashed A) + endif() +endif() +if(COMPILER_SUPPORTS_CXX11) + archive_test(test_map_unordered A) +else() + CHECK_INCLUDE_FILE_CXX(hash_map HASH_MAP_FOUND) + if(HASH_MAP_FOUND) + archive_test(test_map_hashed A) + endif() +endif() + +polymorphic_archive_test(test_dll_exported polymorphic_derived1) +foreach(test_name IN ITEMS ${test_list} ) + target_link_libraries(${test_name} dll_polymorphic_derived2 dll_polymorphic_base) + message(STATUS " " target_link_libraries " " dll_polymorphic_derived2 " " dll_polymorphic_base) +endforeach() + +polymorphic_archive_test(test_no_rtti polymorphic_base polymorphic_derived1 polymorphic_derived2) +polymorphic_archive_test(test_exported polymorphic_base polymorphic_derived1 polymorphic_derived2) +polymorphic_archive_test(test_polymorphic test_polymorphic_A A) +polymorphic_archive_test(test_polymorphic2 test_polymorphic2imp) +polymorphic_archive_test(test_p_helper) + +# end test targets +#################### + +#################### +# add headers in IDE + +# for serialization + +file(GLOB x + RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" + "${CMAKE_CURRENT_SOURCE_DIR}/../include/boost/archive/*.hpp" +) +add_custom_target(archive SOURCES ${x}) +set_property(TARGET archive PROPERTY FOLDER "serialization") + +file(GLOB x + RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" + "${CMAKE_CURRENT_SOURCE_DIR}/../include/boost/archive/detail/*.hpp" +) +add_custom_target(archive-detail SOURCES ${x}) +set_property(TARGET archive-detail PROPERTY FOLDER "serialization") + +file(GLOB x + RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" + "${CMAKE_CURRENT_SOURCE_DIR}/../include/boost/archive/impl/*.ipp" +) +add_custom_target(archive-impl SOURCES ${x}) +set_property(TARGET archive-impl PROPERTY FOLDER "serialization") + +file(GLOB x + RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" + "${CMAKE_CURRENT_SOURCE_DIR}/../include/boost/archive/iterators/*.hpp" +) +add_custom_target(archive-iterators SOURCES ${x}) +set_property(TARGET archive-iterators PROPERTY FOLDER "serialization") + +file(GLOB x + RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" + "${CMAKE_CURRENT_SOURCE_DIR}/../include/boost/serialization/*.hpp" +) +add_custom_target(serialization-headers SOURCES ${x}) +set_property(TARGET serialization-headers PROPERTY FOLDER "serialization") + +file(GLOB x + RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" + "${CMAKE_CURRENT_SOURCE_DIR}/../include/boost/serialization/detail/*.hpp" +) +add_custom_target(serialization-detail SOURCES ${x}) +set_property(TARGET serialization-detail PROPERTY FOLDER "serialization") + +# for wserialization + +file(GLOB x + RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" + "${CMAKE_CURRENT_SOURCE_DIR}/../include/boost/archive/*_w*.hpp" +) +add_custom_target(wserialization_headers SOURCES ${x}) +set_property(TARGET wserialization_headers PROPERTY FOLDER "wserialization") + +# end headers in IDE +#################### + +##################### +# add test project to run misc tests + +add_executable( test_z ../test/test_z.cpp) +target_link_libraries(test_z serialization wserialization ${Boost_LIBRARIES}) + +# end test project +##################### diff --git a/src/boost/libs/serialization/build/Jamfile.v2 b/src/boost/libs/serialization/build/Jamfile.v2 new file mode 100644 index 000000000..1504abcb6 --- /dev/null +++ b/src/boost/libs/serialization/build/Jamfile.v2 @@ -0,0 +1,139 @@ +# Boost serialization Library Build Jamfile +# (C) Copyright Robert Ramey 2002-2004. +# Use, modification, and distribution are subject to the +# Boost Software License, Version 1.0. (See accompanying file +# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +# +# See http://www.boost.org/libs/serialization for the library home page. + +project boost/serialization + : source-location ../src + : requirements + @include-spirit +; + +SPIRIT_ROOT = [ modules.peek : SPIRIT_ROOT ] ; +rule include-spirit ( properties * ) +{ + local old-compiler ; + if borland in $(properties) + { + if ! 6.1.0 in $(properties) + { + old-compiler = true ; + } + + } + else if msvc in $(properties) + { + if 6.5 in $(properties) + || 7.0 in $(properties) + { + old-compiler = true ; + } + } + + local result ; + if $(old-compiler) + { + if $(SPIRIT_ROOT) + { + # note - we can't use $(SPIRIT_ROOT) because + # it puts -I$(SPIRIT_ROOT) AFTER the "../../.." in the command line. + # so use these instead + result = -I$(SPIRIT_ROOT) ; + } + else + { + echo **** spirit 1.6x required to build library with this compiler **** ; + result = no ; + } + } + return $(result) ; +} + +SOURCES = + basic_archive + basic_iarchive + basic_iserializer + basic_oarchive + basic_oserializer + basic_pointer_iserializer + basic_pointer_oserializer + basic_serializer_map + basic_text_iprimitive + basic_text_oprimitive + basic_xml_archive + binary_iarchive + binary_oarchive + extended_type_info + extended_type_info_typeid + extended_type_info_no_rtti + polymorphic_iarchive + polymorphic_oarchive + stl_port + text_iarchive + text_oarchive + polymorphic_text_iarchive + polymorphic_text_oarchive + polymorphic_binary_iarchive + polymorphic_binary_oarchive + polymorphic_xml_iarchive + polymorphic_xml_oarchive + void_cast + archive_exception + xml_grammar + xml_iarchive + xml_oarchive + xml_archive_exception + codecvt_null + utf8_codecvt_facet + ; + +WSOURCES = + basic_text_wiprimitive + basic_text_woprimitive + text_wiarchive + text_woarchive + polymorphic_text_wiarchive + polymorphic_text_woarchive + xml_wgrammar + xml_wiarchive + xml_woarchive + polymorphic_xml_wiarchive + polymorphic_xml_woarchive +; + +lib boost_serialization + : $(SOURCES).cpp + : + msvc:/Gy + msvc:_SCL_SECURE_NO_WARNINGS + msvc:_CRT_SECURE_NO_WARNINGS + clang:"-fvisibility=hidden -fvisibility-inlines-hidden" + gcc:"-fvisibility=hidden -fvisibility-inlines-hidden" + darwin:"-fvisibility=hidden -fvisibility-inlines-hidden" + gcc:"-ftemplate-depth-255" + clang:"-ftemplate-depth-255" + darwin:"-ftemplate-depth-255" + shared:BOOST_SERIALIZATION_DYN_LINK=1 + ; + +lib boost_wserialization + : $(WSOURCES).cpp boost_serialization + : + msvc:/Gy + msvc:_SCL_SECURE_NO_WARNINGS + msvc:_CRT_SECURE_NO_WARNINGS + clang:"-fvisibility=hidden -fvisibility-inlines-hidden" + gcc:"-fvisibility=hidden -fvisibility-inlines-hidden" + darwin:"-fvisibility=hidden -fvisibility-inlines-hidden" + gcc:"-ftemplate-depth-255" + clang:"-ftemplate-depth-255" + darwin:"-ftemplate-depth-255" + # note: both serialization and wserialization are conditioned on the this + # switch - don't change it to BOOST_WSERIALIZATION_DYN_LINK + shared:BOOST_SERIALIZATION_DYN_LINK=1 + ; + +boost-install boost_serialization boost_wserialization ; diff --git a/src/boost/libs/serialization/example/Jamfile.v2 b/src/boost/libs/serialization/example/Jamfile.v2 new file mode 100644 index 000000000..cce6ee65f --- /dev/null +++ b/src/boost/libs/serialization/example/Jamfile.v2 @@ -0,0 +1,42 @@ +# Boost serialization Library Build Jamfile +# (C) Copyright Robert Ramey 2002-2004. +# Use, modification, and distribution are subject to the +# Boost Software License, Version 1.0. (See accompanying file +# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +# +# See http://www.boost.org/libs/serialization for the library home page. + +project libs/serialization/example + : id serialization_example + : requirements ../build//boost_serialization + ; + +import ../util/test : + run-template + run-invoke + run-winvoke + test-bsl-run-no-lib + test-bsl-run + test-bsl-run_archive + test-bsl-run_files + test-bsl-run_polymorphic_archive +; + +test-suite "demo-suite" : + # demos + [ test-bsl-run demo ] + [ test-bsl-run demo_auto_ptr ] + [ test-bsl-run demo_exception ] + [ test-bsl-run demo_fast_archive ] + [ test-bsl-run demo_log : log_archive ] + [ test-bsl-run demo_pimpl : demo_pimpl_A ] + [ test-bsl-run demo_polymorphic : demo_polymorphic_A ] + [ test-bsl-run demo_portable_archive : portable_binary_iarchive portable_binary_oarchive ] + [ test-bsl-run demo_shared_ptr ] + [ test-bsl-run demo_simple_log ] + [ test-bsl-run demo_trivial_archive ] + [ test-bsl-run demo_xml ] + [ test-bsl-run demo_xml_save ] + [ test-bsl-run demo_xml_load : : : demo_xml_save ] +; + diff --git a/src/boost/libs/serialization/example/demo.cpp b/src/boost/libs/serialization/example/demo.cpp new file mode 100644 index 000000000..cfd212770 --- /dev/null +++ b/src/boost/libs/serialization/example/demo.cpp @@ -0,0 +1,377 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// demo.cpp +// +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + + +#include // NULL +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include +#include + +///////////////////////////////////////////////////////////// +// The intent of this program is to serve as a tutorial for +// users of the serialization package. An attempt has been made +// to illustrate most of the facilities of the package. +// +// The intent is to create an example suffciently complete to +// illustrate the usage and utility of the package while +// including a minimum of other code. +// +// This illustration models the bus system of a small city. +// This includes, multiple bus stops, bus routes and schedules. +// There are different kinds of stops. Bus stops in general will +// will appear on multiple routes. A schedule will include +// muliple trips on the same route. + +///////////////////////////////////////////////////////////// +// gps coordinate +// +// llustrates serialization for a simple type +// +class gps_position +{ + friend std::ostream & operator<<(std::ostream &os, const gps_position &gp); + friend class boost::serialization::access; + int degrees; + int minutes; + float seconds; + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + ar & degrees & minutes & seconds; + } +public: + // every serializable class needs a constructor + gps_position(){}; + gps_position(int _d, int _m, float _s) : + degrees(_d), minutes(_m), seconds(_s) + {} +}; +std::ostream & operator<<(std::ostream &os, const gps_position &gp) +{ + return os << ' ' << gp.degrees << (unsigned char)186 << gp.minutes << '\'' << gp.seconds << '"'; +} + +///////////////////////////////////////////////////////////// +// One bus stop +// +// illustrates serialization of serializable members +// + +class bus_stop +{ + friend class boost::serialization::access; + friend std::ostream & operator<<(std::ostream &os, const bus_stop &gp); + virtual std::string description() const = 0; + gps_position latitude; + gps_position longitude; + template + void serialize(Archive &ar, const unsigned int version) + { + ar & latitude; + ar & longitude; + } +protected: + bus_stop(const gps_position & _lat, const gps_position & _long) : + latitude(_lat), longitude(_long) + {} +public: + bus_stop(){} + virtual ~bus_stop(){} +}; + +BOOST_SERIALIZATION_ASSUME_ABSTRACT(bus_stop) + +std::ostream & operator<<(std::ostream &os, const bus_stop &bs) +{ + return os << bs.latitude << bs.longitude << ' ' << bs.description(); +} + +///////////////////////////////////////////////////////////// +// Several kinds of bus stops +// +// illustrates serialization of derived types +// +class bus_stop_corner : public bus_stop +{ + friend class boost::serialization::access; + std::string street1; + std::string street2; + virtual std::string description() const + { + return street1 + " and " + street2; + } + template + void serialize(Archive &ar, const unsigned int version) + { + // save/load base class information + ar & boost::serialization::base_object(*this); + ar & street1 & street2; + } + +public: + bus_stop_corner(){} + bus_stop_corner(const gps_position & _lat, const gps_position & _long, + const std::string & _s1, const std::string & _s2 + ) : + bus_stop(_lat, _long), street1(_s1), street2(_s2) + { + } +}; + +class bus_stop_destination : public bus_stop +{ + friend class boost::serialization::access; + std::string name; + virtual std::string description() const + { + return name; + } + template + void serialize(Archive &ar, const unsigned int version) + { + ar & boost::serialization::base_object(*this) & name; + } +public: + + bus_stop_destination(){} + bus_stop_destination( + const gps_position & _lat, const gps_position & _long, const std::string & _name + ) : + bus_stop(_lat, _long), name(_name) + { + } +}; + +///////////////////////////////////////////////////////////// +// a bus route is a collection of bus stops +// +// illustrates serialization of STL collection templates. +// +// illustrates serialzation of polymorphic pointer (bus stop *); +// +// illustrates storage and recovery of shared pointers is correct +// and efficient. That is objects pointed to by more than one +// pointer are stored only once. In such cases only one such +// object is restored and pointers are restored to point to it +// +class bus_route +{ + friend class boost::serialization::access; + friend std::ostream & operator<<(std::ostream &os, const bus_route &br); + typedef bus_stop * bus_stop_pointer; + std::list stops; + template + void serialize(Archive &ar, const unsigned int version) + { + // in this program, these classes are never serialized directly but rather + // through a pointer to the base class bus_stop. So we need a way to be + // sure that the archive contains information about these derived classes. + //ar.template register_type(); + ar.register_type(static_cast(NULL)); + //ar.template register_type(); + ar.register_type(static_cast(NULL)); + // serialization of stl collections is already defined + // in the header + ar & stops; + } +public: + bus_route(){} + void append(bus_stop *_bs) + { + stops.insert(stops.end(), _bs); + } +}; +std::ostream & operator<<(std::ostream &os, const bus_route &br) +{ + std::list::const_iterator it; + // note: we're displaying the pointer to permit verification + // that duplicated pointers are properly restored. + for(it = br.stops.begin(); it != br.stops.end(); it++){ + os << '\n' << std::hex << "0x" << *it << std::dec << ' ' << **it; + } + return os; +} + +///////////////////////////////////////////////////////////// +// a bus schedule is a collection of routes each with a starting time +// +// Illustrates serialization of STL objects(pair) in a non-intrusive way. +// See definition of operator<< >(ar, pair) and others in +// serialization.hpp +// +// illustrates nesting of serializable classes +// +// illustrates use of version number to automatically grandfather older +// versions of the same class. + +class bus_schedule +{ +public: + // note: this structure was made public. because the friend declarations + // didn't seem to work as expected. + struct trip_info + { + template + void serialize(Archive &ar, const unsigned int file_version) + { + // in versions 2 or later + if(file_version >= 2) + // read the drivers name + ar & driver; + // all versions have the follwing info + ar & hour & minute; + } + + // starting time + int hour; + int minute; + // only after system shipped was the driver's name added to the class + std::string driver; + + trip_info(){} + trip_info(int _h, int _m, const std::string &_d) : + hour(_h), minute(_m), driver(_d) + {} + }; +private: + friend class boost::serialization::access; + friend std::ostream & operator<<(std::ostream &os, const bus_schedule &bs); + friend std::ostream & operator<<(std::ostream &os, const bus_schedule::trip_info &ti); + std::list > schedule; + template + void serialize(Archive &ar, const unsigned int version) + { + ar & schedule; + } +public: + void append(const std::string &_d, int _h, int _m, bus_route *_br) + { + schedule.insert(schedule.end(), std::make_pair(trip_info(_h, _m, _d), _br)); + } + bus_schedule(){} +}; +BOOST_CLASS_VERSION(bus_schedule::trip_info, 2) + +std::ostream & operator<<(std::ostream &os, const bus_schedule::trip_info &ti) +{ + return os << '\n' << ti.hour << ':' << ti.minute << ' ' << ti.driver << ' '; +} +std::ostream & operator<<(std::ostream &os, const bus_schedule &bs) +{ + std::list >::const_iterator it; + for(it = bs.schedule.begin(); it != bs.schedule.end(); it++){ + os << it->first << *(it->second); + } + return os; +} + +void save_schedule(const bus_schedule &s, const char * filename){ + // make an archive + std::ofstream ofs(filename); + boost::archive::text_oarchive oa(ofs); + oa << s; +} + +void +restore_schedule(bus_schedule &s, const char * filename) +{ + // open the archive + std::ifstream ifs(filename); + boost::archive::text_iarchive ia(ifs); + + // restore the schedule from the archive + ia >> s; +} + +int main(int argc, char *argv[]) +{ + // make the schedule + bus_schedule original_schedule; + + // fill in the data + // make a few stops + bus_stop *bs0 = new bus_stop_corner( + gps_position(34, 135, 52.560f), + gps_position(134, 22, 78.30f), + "24th Street", "10th Avenue" + ); + bus_stop *bs1 = new bus_stop_corner( + gps_position(35, 137, 23.456f), + gps_position(133, 35, 54.12f), + "State street", "Cathedral Vista Lane" + ); + bus_stop *bs2 = new bus_stop_destination( + gps_position(35, 136, 15.456f), + gps_position(133, 32, 15.300f), + "White House" + ); + bus_stop *bs3 = new bus_stop_destination( + gps_position(35, 134, 48.789f), + gps_position(133, 32, 16.230f), + "Lincoln Memorial" + ); + + // make a routes + bus_route route0; + route0.append(bs0); + route0.append(bs1); + route0.append(bs2); + + // add trips to schedule + original_schedule.append("bob", 6, 24, &route0); + original_schedule.append("bob", 9, 57, &route0); + original_schedule.append("alice", 11, 02, &route0); + + // make aother routes + bus_route route1; + route1.append(bs3); + route1.append(bs2); + route1.append(bs1); + + // add trips to schedule + original_schedule.append("ted", 7, 17, &route1); + original_schedule.append("ted", 9, 38, &route1); + original_schedule.append("alice", 11, 47, &route1); + + // display the complete schedule + std::cout << "original schedule"; + std::cout << original_schedule; + + std::string filename(boost::archive::tmpdir()); + filename += "/demofile.txt"; + + // save the schedule + save_schedule(original_schedule, filename.c_str()); + + // ... some time later + // make a new schedule + bus_schedule new_schedule; + + restore_schedule(new_schedule, filename.c_str()); + + // and display + std::cout << "\nrestored schedule"; + std::cout << new_schedule; + // should be the same as the old one. (except for the pointer values) + + delete bs0; + delete bs1; + delete bs2; + delete bs3; + return 0; +} diff --git a/src/boost/libs/serialization/example/demo_auto_ptr.cpp b/src/boost/libs/serialization/example/demo_auto_ptr.cpp new file mode 100644 index 000000000..ff86ac413 --- /dev/null +++ b/src/boost/libs/serialization/example/demo_auto_ptr.cpp @@ -0,0 +1,135 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// demo_auto_ptr.cpp + +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include +#include + +#include // remove, std::autoptr inteface wrong in dinkumware +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include +#include +#include + +#include + +namespace boost { +namespace serialization { + +///////////////////////////////////////////////////////////// +// implement serialization for auto_ptr< T > +// note: this must be added to the boost namespace in order to +// be called by the library +template +inline void save( + Archive & ar, + const std::auto_ptr< T > &t, + const unsigned int file_version +){ + // only the raw pointer has to be saved + // the ref count is rebuilt automatically on load + const T * const tx = t.get(); + ar << tx; +} + +template +inline void load( + Archive & ar, + std::auto_ptr< T > &t, + const unsigned int file_version +){ + T *pTarget; + ar >> pTarget; + // note that the reset automagically maintains the reference count + #if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) + t.release(); + t = std::auto_ptr< T >(pTarget); + #else + t.reset(pTarget); + #endif +} + +// split non-intrusive serialization function member into separate +// non intrusive save/load member functions +template +inline void serialize( + Archive & ar, + std::auto_ptr< T > &t, + const unsigned int file_version +){ + boost::serialization::split_free(ar, t, file_version); +} + +} // namespace serialization +} // namespace boost + +///////////////////////////////////////////////////////////// +// test auto_ptr serialization +class A +{ +private: + friend class boost::serialization::access; + int x; + template + void serialize(Archive &ar, const unsigned int /* file_version */){ + ar & x; + } +public: + A(){} // default constructor + ~A(){} // default destructor +}; + +void save(const std::auto_ptr & spa, const char *filename) +{ + std::ofstream ofs(filename); + boost::archive::text_oarchive oa(ofs); + oa << spa; +} + +void load(std::auto_ptr & spa, const char *filename) +{ + // open the archive + std::ifstream ifs(filename); + boost::archive::text_iarchive ia(ifs); + + // restore the schedule from the archive + ia >> spa; +} + +int main(int argc, char *argv[]) +{ + std::string filename = boost::archive::tmpdir(); + filename += "/testfile"; + + // create a new auto pointer to ta new object of type A + std::auto_ptr spa(new A); + // serialize it + save(spa, filename.c_str()); + // reset the auto pointer to NULL + // thereby destroying the object of type A + // note that the reset automagically maintains the reference count + #if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) + spa.release(); + #else + spa.reset(); + #endif + // restore state to one equivalent to the original + // creating a new type A object + load(spa, filename.c_str()); + // obj of type A gets destroyed + // as auto_ptr goes out of scope + std::remove(filename.c_str()); + return 0; +} diff --git a/src/boost/libs/serialization/example/demo_dll_a.hpp b/src/boost/libs/serialization/example/demo_dll_a.hpp new file mode 100644 index 000000000..0dd5ffb93 --- /dev/null +++ b/src/boost/libs/serialization/example/demo_dll_a.hpp @@ -0,0 +1,318 @@ +#ifndef BOOST_SERIALIZATION_TEST_A_HPP +#define BOOST_SERIALIZATION_TEST_A_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// A.hpp simple class test + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include // for rand() +#include // for fabs() +#include // size_t +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::rand; + using ::fabs; + using ::size_t; +} +#endif + +//#include +#include +#include + +#include +#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) +#include +#endif + +#include +#include +#include + +class A +{ +private: + friend class boost::serialization::access; + // note: from an aesthetic perspective, I would much prefer to have this + // defined out of line. Unfortunately, this trips a bug in the VC 6.0 + // compiler. So hold our nose and put it her to permit running of tests. + template + void serialize( + Archive &ar, + const unsigned int /* file_version */ + ){ + ar & BOOST_SERIALIZATION_NVP(b); + #ifndef BOOST_NO_INT64_T + ar & BOOST_SERIALIZATION_NVP(f); + ar & BOOST_SERIALIZATION_NVP(g); + #endif + #if BOOST_WORKAROUND(__BORLANDC__, <= 0x551 ) + int i; + if(BOOST_DEDUCED_TYPENAME Archive::is_saving::value){ + i = l; + ar & BOOST_SERIALIZATION_NVP(i); + } + else{ + ar & BOOST_SERIALIZATION_NVP(i); + l = i; + } + #else + ar & BOOST_SERIALIZATION_NVP(l); + #endif + ar & BOOST_SERIALIZATION_NVP(m); + ar & BOOST_SERIALIZATION_NVP(n); + ar & BOOST_SERIALIZATION_NVP(o); + ar & BOOST_SERIALIZATION_NVP(p); + ar & BOOST_SERIALIZATION_NVP(q); + #ifndef BOOST_NO_CWCHAR + ar & BOOST_SERIALIZATION_NVP(r); + #endif + ar & BOOST_SERIALIZATION_NVP(c); + ar & BOOST_SERIALIZATION_NVP(s); + ar & BOOST_SERIALIZATION_NVP(t); + ar & BOOST_SERIALIZATION_NVP(u); + ar & BOOST_SERIALIZATION_NVP(v); + ar & BOOST_SERIALIZATION_NVP(w); + ar & BOOST_SERIALIZATION_NVP(x); + ar & BOOST_SERIALIZATION_NVP(y); + #ifndef BOOST_NO_STD_WSTRING + ar & BOOST_SERIALIZATION_NVP(z); + #endif + } + bool b; + #ifndef BOOST_NO_INT64_T + boost::int64_t f; + boost::uint64_t g; + #endif + enum h { + i = 0, + j, + k + } l; + std::size_t m; + signed long n; + unsigned long o; + signed short p; + unsigned short q; + #ifndef BOOST_NO_CWCHAR + wchar_t r; + #endif + char c; + signed char s; + unsigned char t; + signed int u; + unsigned int v; + float w; + double x; + std::string y; + #ifndef BOOST_NO_STD_WSTRING + std::wstring z; + #endif +public: + A(); + bool operator==(const A &rhs) const; + bool operator!=(const A &rhs) const; + bool operator<(const A &rhs) const; // used by less + // hash function for class A + operator std::size_t () const; + friend std::ostream & operator<<(std::ostream & os, A const & a); + friend std::istream & operator>>(std::istream & is, A & a); +}; + +//BOOST_TEST_DONT_PRINT_LOG_VALUE(A); + +template +void randomize(S &x) +{ + assert(0 == x.size()); + for(;;){ + unsigned int i = std::rand() % 27; + if(0 == i) + break; + x += static_cast('a' - 1 + i); + } +} + +template +void accumulate(std::size_t & s, const T & t){ + const char * tptr = (const char *)(& t); + unsigned int count = sizeof(t); + while(count-- > 0){ + s += *tptr++; + } +} + +A::operator std::size_t () const { + std::size_t retval = 0; + accumulate(retval, b); + #ifndef BOOST_NO_INT64_T + accumulate(retval, f); + accumulate(retval, g); + #endif + accumulate(retval, l); + accumulate(retval, m); + accumulate(retval, n); + accumulate(retval, o); + accumulate(retval, p); + accumulate(retval, q); + #ifndef BOOST_NO_CWCHAR + accumulate(retval, r); + #endif + accumulate(retval, c); + accumulate(retval, s); + accumulate(retval, t); + accumulate(retval, u); + accumulate(retval, v); + return retval; +} + +inline A::A() : + b(true), + #ifndef BOOST_NO_INT64_T + f(std::rand() * std::rand()), + g(std::rand() * std::rand()), + #endif + l(static_cast(std::rand() % 3)), + m(std::rand()), + n(std::rand()), + o(std::rand()), + p(std::rand()), + q(std::rand()), + #ifndef BOOST_NO_CWCHAR + r(std::rand()), + #endif + c(std::rand()), + s(std::rand()), + t(std::rand()), + u(std::rand()), + v(std::rand()), + w((float)std::rand()), + x((double)std::rand()) +{ + randomize(y); + #ifndef BOOST_NO_STD_WSTRING + randomize(z); + #endif +} + +inline bool A::operator==(const A &rhs) const +{ + if(b != rhs.b) + return false; + if(l != rhs.l) + return false; + #ifndef BOOST_NO_INT64_T + if(f != rhs.f) + return false; + if(g != rhs.g) + return false; + #endif + if(m != rhs.m) + return false; + if(n != rhs.n) + return false; + if(o != rhs.o) + return false; + if(p != rhs.p) + return false; + if(q != rhs.q) + return false; + #ifndef BOOST_NO_CWCHAR + if(r != rhs.r) + return false; + #endif + if(c != rhs.c) + return false; + if(s != rhs.s) + return false; + if(t != rhs.t) + return false; + if(u != rhs.u) + return false; + if(v != rhs.v) + return false; + if(std::abs( boost::math::float_distance(w, rhs.w)) > 1) + return false; + if(std::abs( boost::math::float_distance(x, rhs.x)) > 1) + return false; + if(0 != y.compare(rhs.y)) + return false; + #ifndef BOOST_NO_STD_WSTRING + if(0 != z.compare(rhs.z)) + return false; + #endif + return true; +} + +inline bool A::operator!=(const A &rhs) const +{ + return ! (*this == rhs); +} + +inline bool A::operator<(const A &rhs) const +{ + if(b != rhs.b) + return b < rhs.b; + #ifndef BOOST_NO_INT64_T + if(f != rhs.f) + return f < rhs.f; + if(g != rhs.g) + return g < rhs.g; + #endif + if(l != rhs.l ) + return l < rhs.l; + if(m != rhs.m ) + return m < rhs.m; + if(n != rhs.n ) + return n < rhs.n; + if(o != rhs.o ) + return o < rhs.o; + if(p != rhs.p ) + return p < rhs.p; + if(q != rhs.q ) + return q < rhs.q; + #ifndef BOOST_NO_CWCHAR + if(r != rhs.r ) + return r < rhs.r; + #endif + if(c != rhs.c ) + return c < rhs.c; + if(s != rhs.s ) + return s < rhs.s; + if(t != rhs.t ) + return t < rhs.t; + if(u != rhs.u ) + return u < rhs.u; + if(v != rhs.v ) + return v < rhs.v; + if(w != rhs.w ) + return w < rhs.w; + if(x != rhs.x ) + return x < rhs.x; + int i = y.compare(rhs.y); + if(i != 0 ) + return i < 0; + #ifndef BOOST_NO_STD_WSTRING + int j = z.compare(rhs.z); + if(j != 0 ) + return j < 0; + #endif + return false; +} + +#endif // BOOST_SERIALIZATION_TEST_A_HPP diff --git a/src/boost/libs/serialization/example/demo_dll_a.ipp b/src/boost/libs/serialization/example/demo_dll_a.ipp new file mode 100644 index 000000000..99cc9fe61 --- /dev/null +++ b/src/boost/libs/serialization/example/demo_dll_a.ipp @@ -0,0 +1,317 @@ +#ifndef BOOST_SERIALIZATION_TEST_A_HPP +#define BOOST_SERIALIZATION_TEST_A_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// A.hpp simple class test + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include // for rand() +#include // for fabs() +#include // size_t + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::rand; + using ::fabs; + using ::size_t; +} +#endif + +//#include +#include +#include + +#include +#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) +#include +#endif + +#include +#include +#include + +class A +{ +private: + friend class boost::serialization::access; + // note: from an aesthetic perspective, I would much prefer to have this + // defined out of line. Unfortunately, this trips a bug in the VC 6.0 + // compiler. So hold our nose and put it her to permit running of tests. + template + void serialize( + Archive &ar, + const unsigned int /* file_version */ + ){ + ar & BOOST_SERIALIZATION_NVP(b); + #ifndef BOOST_NO_INT64_T + ar & BOOST_SERIALIZATION_NVP(f); + ar & BOOST_SERIALIZATION_NVP(g); + #endif + #if BOOST_WORKAROUND(__BORLANDC__, <= 0x551 ) + int i; + if(BOOST_DEDUCED_TYPENAME Archive::is_saving::value){ + i = l; + ar & BOOST_SERIALIZATION_NVP(i); + } + else{ + ar & BOOST_SERIALIZATION_NVP(i); + l = i; + } + #else + ar & BOOST_SERIALIZATION_NVP(l); + #endif + ar & BOOST_SERIALIZATION_NVP(m); + ar & BOOST_SERIALIZATION_NVP(n); + ar & BOOST_SERIALIZATION_NVP(o); + ar & BOOST_SERIALIZATION_NVP(p); + ar & BOOST_SERIALIZATION_NVP(q); + #ifndef BOOST_NO_CWCHAR + ar & BOOST_SERIALIZATION_NVP(r); + #endif + ar & BOOST_SERIALIZATION_NVP(c); + ar & BOOST_SERIALIZATION_NVP(s); + ar & BOOST_SERIALIZATION_NVP(t); + ar & BOOST_SERIALIZATION_NVP(u); + ar & BOOST_SERIALIZATION_NVP(v); + ar & BOOST_SERIALIZATION_NVP(w); + ar & BOOST_SERIALIZATION_NVP(x); + ar & BOOST_SERIALIZATION_NVP(y); + #ifndef BOOST_NO_STD_WSTRING + ar & BOOST_SERIALIZATION_NVP(z); + #endif + } + bool b; + #ifndef BOOST_NO_INT64_T + boost::int64_t f; + boost::uint64_t g; + #endif + enum h { + i = 0, + j, + k + } l; + std::size_t m; + signed long n; + unsigned long o; + signed short p; + unsigned short q; + #ifndef BOOST_NO_CWCHAR + wchar_t r; + #endif + char c; + signed char s; + unsigned char t; + signed int u; + unsigned int v; + float w; + double x; + std::string y; + #ifndef BOOST_NO_STD_WSTRING + std::wstring z; + #endif +public: + A(); + bool operator==(const A &rhs) const; + bool operator!=(const A &rhs) const; + bool operator<(const A &rhs) const; // used by less + // hash function for class A + operator std::size_t () const; + friend std::ostream & operator<<(std::ostream & os, A const & a); + friend std::istream & operator>>(std::istream & is, A & a); +}; + +//BOOST_TEST_DONT_PRINT_LOG_VALUE(A); + +template +void randomize(S &x) +{ + assert(0 == x.size()); + for(;;){ + unsigned int i = std::rand() % 27; + if(0 == i) + break; + x += static_cast('a' - 1 + i); + } +} + +template +void accumulate(std::size_t & s, const T & t){ + const char * tptr = (const char *)(& t); + unsigned int count = sizeof(t); + while(count-- > 0){ + s += *tptr++; + } +} + +A::operator std::size_t () const { + std::size_t retval = 0; + accumulate(retval, b); + #ifndef BOOST_NO_INT64_T + accumulate(retval, f); + accumulate(retval, g); + #endif + accumulate(retval, l); + accumulate(retval, m); + accumulate(retval, n); + accumulate(retval, o); + accumulate(retval, p); + accumulate(retval, q); + #ifndef BOOST_NO_CWCHAR + accumulate(retval, r); + #endif + accumulate(retval, c); + accumulate(retval, s); + accumulate(retval, t); + accumulate(retval, u); + accumulate(retval, v); + return retval; +} + +inline A::A() : + b(true), + #ifndef BOOST_NO_INT64_T + f(std::rand() * std::rand()), + g(std::rand() * std::rand()), + #endif + l(static_cast(std::rand() % 3)), + m(std::rand()), + n(std::rand()), + o(std::rand()), + p(std::rand()), + q(std::rand()), + #ifndef BOOST_NO_CWCHAR + r(std::rand()), + #endif + c(std::rand()), + s(std::rand()), + t(std::rand()), + u(std::rand()), + v(std::rand()), + w((float)std::rand()), + x((double)std::rand()) +{ + randomize(y); + #ifndef BOOST_NO_STD_WSTRING + randomize(z); + #endif +} + +inline bool A::operator==(const A &rhs) const +{ + if(b != rhs.b) + return false; + if(l != rhs.l) + return false; + #ifndef BOOST_NO_INT64_T + if(f != rhs.f) + return false; + if(g != rhs.g) + return false; + #endif + if(m != rhs.m) + return false; + if(n != rhs.n) + return false; + if(o != rhs.o) + return false; + if(p != rhs.p) + return false; + if(q != rhs.q) + return false; + #ifndef BOOST_NO_CWCHAR + if(r != rhs.r) + return false; + #endif + if(c != rhs.c) + return false; + if(s != rhs.s) + return false; + if(t != rhs.t) + return false; + if(u != rhs.u) + return false; + if(v != rhs.v) + return false; + if(std::abs( boost::math::float_distance(w, rhs.w)) > 1) + return false; + if(std::abs( boost::math::float_distance(x, rhs.x)) > 1) + return false; + if(0 != y.compare(rhs.y)) + return false; + #ifndef BOOST_NO_STD_WSTRING + if(0 != z.compare(rhs.z)) + return false; + #endif + return true; +} + +inline bool A::operator!=(const A &rhs) const +{ + return ! (*this == rhs); +} + +inline bool A::operator<(const A &rhs) const +{ + if(b != rhs.b) + return b < rhs.b; + #ifndef BOOST_NO_INT64_T + if(f != rhs.f) + return f < rhs.f; + if(g != rhs.g) + return g < rhs.g; + #endif + if(l != rhs.l ) + return l < rhs.l; + if(m != rhs.m ) + return m < rhs.m; + if(n != rhs.n ) + return n < rhs.n; + if(o != rhs.o ) + return o < rhs.o; + if(p != rhs.p ) + return p < rhs.p; + if(q != rhs.q ) + return q < rhs.q; + #ifndef BOOST_NO_CWCHAR + if(r != rhs.r ) + return r < rhs.r; + #endif + if(c != rhs.c ) + return c < rhs.c; + if(s != rhs.s ) + return s < rhs.s; + if(t != rhs.t ) + return t < rhs.t; + if(u != rhs.u ) + return u < rhs.u; + if(v != rhs.v ) + return v < rhs.v; + if(w != rhs.w ) + return w < rhs.w; + if(x != rhs.x ) + return x < rhs.x; + int i = y.compare(rhs.y); + if(i != 0 ) + return i < 0; + #ifndef BOOST_NO_STD_WSTRING + int j = z.compare(rhs.z); + if(j != 0 ) + return j < 0; + #endif + return false; +} + +#endif // BOOST_SERIALIZATION_TEST_A_HPP diff --git a/src/boost/libs/serialization/example/demo_dll_b.hpp b/src/boost/libs/serialization/example/demo_dll_b.hpp new file mode 100644 index 000000000..3fcfea672 --- /dev/null +++ b/src/boost/libs/serialization/example/demo_dll_b.hpp @@ -0,0 +1,113 @@ +#ifndef BOOST_SERIALIZATION_TEST_B_HPP +#define BOOST_SERIALIZATION_TEST_B_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// B.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include // for rand() +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::rand; +} +#endif + +#include +#include +#include + +#include "A.hpp" + +/////////////////////////////////////////////////////// +// Derived class test +class B : public A +{ +private: + friend class boost::serialization::access; + template + void save(Archive &ar, const unsigned int /* file_version */) const + { + // write any base class info to the archive + ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(A); + + // write out members + ar << BOOST_SERIALIZATION_NVP(s); + ar << BOOST_SERIALIZATION_NVP(t); + ar << BOOST_SERIALIZATION_NVP(u); + ar << BOOST_SERIALIZATION_NVP(v); + ar << BOOST_SERIALIZATION_NVP(w); + ar << BOOST_SERIALIZATION_NVP(x); + } + + template + void load(Archive & ar, const unsigned int file_version) + { + // read any base class info to the archive + ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(A); + switch(file_version){ + case 1: + case 2: + ar >> BOOST_SERIALIZATION_NVP(s); + ar >> BOOST_SERIALIZATION_NVP(t); + ar >> BOOST_SERIALIZATION_NVP(u); + ar >> BOOST_SERIALIZATION_NVP(v); + ar >> BOOST_SERIALIZATION_NVP(w); + ar >> BOOST_SERIALIZATION_NVP(x); + default: + break; + } + } + + BOOST_SERIALIZATION_SPLIT_MEMBER() + signed char s; + unsigned char t; + signed int u; + unsigned int v; + float w; + double x; +public: + B(); + virtual ~B(){}; + bool operator==(const B &rhs) const; +}; + +B::B() : + s(std::rand()), + t(std::rand()), + u(std::rand()), + v(std::rand()), + w((float)std::rand() / std::rand()), + x((double)std::rand() / std::rand()) +{ +} + +BOOST_CLASS_VERSION(B, 2) + +inline bool B::operator==(const B &rhs) const +{ + return + A::operator==(rhs) + && s == rhs.s + && t == rhs.t + && u == rhs.u + && v == rhs.v + && std::abs( boost::math::float_distance(w, rhs.w)) < 2 + && std::abs( boost::math::float_distance(x, rhs.x)) < 2 + ; +} + +#endif // BOOST_SERIALIZATION_TEST_B_HPP diff --git a/src/boost/libs/serialization/example/demo_dll_b.ipp b/src/boost/libs/serialization/example/demo_dll_b.ipp new file mode 100644 index 000000000..74d53b794 --- /dev/null +++ b/src/boost/libs/serialization/example/demo_dll_b.ipp @@ -0,0 +1,112 @@ +#ifndef BOOST_SERIALIZATION_TEST_B_HPP +#define BOOST_SERIALIZATION_TEST_B_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// B.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include // for rand() + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::rand; +} +#endif + +#include +#include +#include + +#include "A.hpp" + +/////////////////////////////////////////////////////// +// Derived class test +class B : public A +{ +private: + friend class boost::serialization::access; + template + void save(Archive &ar, const unsigned int /* file_version */) const + { + // write any base class info to the archive + ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(A); + + // write out members + ar << BOOST_SERIALIZATION_NVP(s); + ar << BOOST_SERIALIZATION_NVP(t); + ar << BOOST_SERIALIZATION_NVP(u); + ar << BOOST_SERIALIZATION_NVP(v); + ar << BOOST_SERIALIZATION_NVP(w); + ar << BOOST_SERIALIZATION_NVP(x); + } + + template + void load(Archive & ar, const unsigned int file_version) + { + // read any base class info to the archive + ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(A); + switch(file_version){ + case 1: + case 2: + ar >> BOOST_SERIALIZATION_NVP(s); + ar >> BOOST_SERIALIZATION_NVP(t); + ar >> BOOST_SERIALIZATION_NVP(u); + ar >> BOOST_SERIALIZATION_NVP(v); + ar >> BOOST_SERIALIZATION_NVP(w); + ar >> BOOST_SERIALIZATION_NVP(x); + default: + break; + } + } + + BOOST_SERIALIZATION_SPLIT_MEMBER() + signed char s; + unsigned char t; + signed int u; + unsigned int v; + float w; + double x; +public: + B(); + virtual ~B(){}; + bool operator==(const B &rhs) const; +}; + +B::B() : + s(std::rand()), + t(std::rand()), + u(std::rand()), + v(std::rand()), + w((float)std::rand() / std::rand()), + x((double)std::rand() / std::rand()) +{ +} + +BOOST_CLASS_VERSION(B, 2) + +inline bool B::operator==(const B &rhs) const +{ + return + A::operator==(rhs) + && s == rhs.s + && t == rhs.t + && u == rhs.u + && v == rhs.v + && std::abs( boost::math::float_distance(w, rhs.w)) < 2 + && std::abs( boost::math::float_distance(x, rhs.x)) < 2 + ; +} + +#endif // BOOST_SERIALIZATION_TEST_B_HPP diff --git a/src/boost/libs/serialization/example/demo_exception.cpp b/src/boost/libs/serialization/example/demo_exception.cpp new file mode 100644 index 000000000..84f881f9b --- /dev/null +++ b/src/boost/libs/serialization/example/demo_exception.cpp @@ -0,0 +1,258 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// demo_exception.cpp + +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Example of safe exception handling for pointer de-serialization +// +// This example was prepared by Robert Ramey to demonstrate and test +// safe exception handling during the de-serialization of pointers in +// a non-trivial example. +// +// Hopefully, this addresses exception issues raised by +// Vahan Margaryan who spent considerable time and effort +// in the analysis and testing of issues of exception safety +// of the serialization library. + +#include +#include +#include // NULL +#include +#include + +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include + +#ifndef BOOST_NO_EXCEPTIONS +#include +#endif + +#include +#include + +#include +#include + +template +struct deleter +{ + void operator()(TPTR t){ + delete t; + } +}; + +class Course; +class Student; + +class Student +{ +public: + static int count; + Student(){ + count++; + } + ~Student(){ + some_courses.clear(); + count--; + } + std::list some_courses; +private: + friend class boost::serialization::access; + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + ar & some_courses; + } +}; + +int Student::count = 0; + +class Course +{ +public: + static int count; + Course(){ + count++; + } + ~Course(){ + // doesnt delete pointers in list + // since it doesn't "own" them + some_students.clear(); + count--; + } + std::list some_students; +private: + friend class boost::serialization::access; + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + ar & some_students; + } +}; + +int Course::count = 0; + +class School +{ +public: + ~School(){ + // must delete all the students because + // it "owns" them + std::for_each(all_students.begin(), all_students.end(), deleter()); + all_students.clear(); + // as well as courses + std::for_each(all_courses.begin(), all_courses.end(), deleter()); + all_courses.clear(); + } + std::list all_students; + std::list all_courses; +private: + friend class boost::serialization::access; + BOOST_SERIALIZATION_SPLIT_MEMBER() + template + void save(Archive & ar, const unsigned int file_version) const; + template + void load(Archive & ar, const unsigned int file_version); +}; + +#if 0 +// case 1: +template +void School::serialize(Archive & ar, const unsigned int /* file_version */){ + // if an exeception occurs while loading courses + // the structure courses may have some courses each + // with students + ar & all_courses; + // while all_students will have no members. + ar & all_students; // create students that have no courses + // so ~School() will delete all members of courses + // but this will NOT delete any students - see above + // a memory leak will be the result. +} + +// switching the order of serialization doesn't help in this case +// case 2: +template +void School::serialize(Archive & ar, const unsigned int /* file_version */){ + ar & all_students; + ar >> all_courses; // create any courses that have no students +} +#endif + +template +void School::save(Archive & ar, const unsigned int /* file_version */) const { + ar << all_students; + ar << all_courses; +} + +template +void School::load(Archive & ar, const unsigned int /* file_version */){ + // if an exeception occurs while loading courses + // the structure courses may have some courses each + // with students + try{ + // deserialization of a Course * will in general provoke the + // deserialization of Student * which are added to the list of + // students for a class. That is, this process will result + // in the copying of a pointer. + ar >> all_courses; + ar >> all_students; // create students that have no courses + } + catch(std::exception){ + // elminate any dangling references + all_courses.clear(); + all_students.clear(); + throw; + } +} + +void init(School *school){ + Student *bob = new Student(); + Student *ted = new Student(); + Student *carol = new Student(); + Student *alice = new Student(); + + school->all_students.push_back(bob); + school->all_students.push_back(ted); + school->all_students.push_back(carol); + school->all_students.push_back(alice); + + Course *math = new Course(); + Course *history = new Course(); + Course *literature = new Course(); + Course *gym = new Course(); + + school->all_courses.push_back(math); + school->all_courses.push_back(history); + school->all_courses.push_back(literature); + school->all_courses.push_back(gym); + + bob->some_courses.push_back(math); + math->some_students.push_back(bob); + bob->some_courses.push_back(literature); + literature->some_students.push_back(bob); + + ted->some_courses.push_back(math); + math->some_students.push_back(ted); + ted->some_courses.push_back(history); + history->some_students.push_back(ted); + + alice->some_courses.push_back(literature); + literature->some_students.push_back(alice); + alice->some_courses.push_back(history); + history->some_students.push_back(alice); + + // no students signed up for gym + // carol has no courses +} + +void save(const School * const school, const char *filename){ + std::ofstream ofile(filename); + boost::archive::text_oarchive ar(ofile); + ar << school; +} + +void load(School * & school, const char *filename){ + std::ifstream ifile(filename); + boost::archive::text_iarchive ar(ifile); + try{ + ar >> school; + } + catch(std::exception){ + // eliminate dangling reference + school = NULL; + } +} + +int main(int argc, char *argv[]){ + std::string filename(boost::archive::tmpdir()); + filename += "/demofile.txt"; + + School *school = new School(); + std::cout << "1. student count = " << Student::count << std::endl; + std::cout << "2. class count = " << Course::count << std::endl; + init(school); + std::cout << "3. student count = " << Student::count << std::endl; + std::cout << "4. class count = " << Course::count << std::endl; + save(school, filename.c_str()); + delete school; + school = NULL; + std::cout << "5. student count = " << Student::count << std::endl; + std::cout << "6. class count = " << Course::count << std::endl; + load(school, filename.c_str()); + std::cout << "7. student count = " << Student::count << std::endl; + std::cout << "8. class count = " << Course::count << std::endl; + delete school; + std::cout << "9. student count = " << Student::count << std::endl; + std::cout << "10. class count = " << Course::count << std::endl; + std::remove(filename.c_str()); + return Student::count + Course::count; +} diff --git a/src/boost/libs/serialization/example/demo_fast_archive.cpp b/src/boost/libs/serialization/example/demo_fast_archive.cpp new file mode 100644 index 000000000..ca813900e --- /dev/null +++ b/src/boost/libs/serialization/example/demo_fast_archive.cpp @@ -0,0 +1,180 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// demo_fast_binary_archive.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution +#include + +#include +#include + +#define BOOST_ARCHIVE_SOURCE +#include +#include +#include + +// include template definitions for base classes used. Otherwise +// you'll get link failure with undefined symbols +#include +#include +#include +#include + +using namespace boost::archive; + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// "Fast" output binary archive. This is a variation of the native binary +class fast_binary_oarchive : + // don't derive from binary_oarchive !!! + public binary_oarchive_impl< + fast_binary_oarchive, + std::ostream::char_type, + std::ostream::traits_type + > +{ + typedef fast_binary_oarchive derived_t; + typedef binary_oarchive_impl< + fast_binary_oarchive, + std::ostream::char_type, + std::ostream::traits_type + > base_t; +#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS +public: +#else + friend class boost::archive::detail::interface_oarchive; + friend class basic_binary_oarchive; + friend class basic_binary_oprimitive< + derived_t, + std::ostream::char_type, + std::ostream::traits_type + >; + friend class boost::archive::save_access; +#endif + // add base class to the places considered when matching + // save function to a specific set of arguments. Note, this didn't + // work on my MSVC 7.0 system using + // binary_oarchive_impl::load_override; + // so we use the sure-fire method below. This failed to work as well + template + void save_override(T & t){ + base_t::save_override(t); + // verify that this program is in fact working by making sure + // that arrays are getting passed here + BOOST_STATIC_ASSERT(! (boost::is_array::value) ); + } + template + void save_override(const int (& t)[N]){ + save_binary(t, sizeof(t)); + } + template + void save_override(const unsigned int (& t)[N]){ + save_binary(t, sizeof(t)); + } + template + void save_override(const long (& t)[N]){ + save_binary(t, sizeof(t)); + } + template + void save_override(const unsigned long (& t)[N]){ + save_binary(t, sizeof(t)); + } +public: + fast_binary_oarchive(std::ostream & os, unsigned flags = 0) : + base_t(os, flags) + {} + fast_binary_oarchive(std::streambuf & bsb, unsigned int flags = 0) : + base_t(bsb, flags) + {} +}; + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE(fast_binary_oarchive) + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// "Fast" input binary archive. This is a variation of the native binary +class fast_binary_iarchive : + // don't derive from binary_oarchive !!! + public binary_iarchive_impl< + fast_binary_iarchive, + std::istream::char_type, + std::istream::traits_type + > +{ + typedef fast_binary_iarchive derived_t; + typedef binary_iarchive_impl< + fast_binary_iarchive, + std::istream::char_type, + std::istream::traits_type + > base_t; +#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS +public: +#else + friend class boost::archive::detail::interface_iarchive; + friend class basic_binary_iarchive; + friend class basic_binary_iprimitive< + derived_t, + std::ostream::char_type, + std::ostream::traits_type + >; + friend class boost::archive::load_access; +#endif + // add base class to the places considered when matching + // save function to a specific set of arguments. Note, this didn't + // work on my MSVC 7.0 system using + // binary_oarchive_impl::load_override; + // so we use the sure-fire method below. This failed to work as well + template + void load_override(T & t){ + base_t::load_override(t); + BOOST_STATIC_ASSERT(! (boost::is_array::value) ); + } + template + void load_override(int (& t)[N]){ + load_binary(t, sizeof(t)); + } + template + void load_override(unsigned int (& t)[N]){ + load_binary(t, sizeof(t)); + } + template + void load_override(long (& t)[N]){ + load_binary(t, sizeof(t)); + } + template + void load_override(unsigned long (& t)[N]){ + load_binary(t, sizeof(t)); + } +public: + fast_binary_iarchive(std::istream & is, unsigned int flags = 0) : + base_t(is, flags) + {} + fast_binary_iarchive(std::streambuf & bsb, unsigned int flags = 0) : + base_t(bsb, flags) + {} +}; + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE(fast_binary_iarchive) + +int main( int argc, char* argv[] ) +{ + const int a[3] = {1, 2, 3}; + int a1[3] = {4, 5, 6}; + + std::stringstream ss; + { + fast_binary_oarchive pboa(ss); + pboa << a; + } + { + fast_binary_iarchive pbia(ss); + pbia >> a1; + } + return (a[0] != a1[0]) || (a[1] != a1[1]) || (a[2] != a1[2]); +} + + diff --git a/src/boost/libs/serialization/example/demo_gps.hpp b/src/boost/libs/serialization/example/demo_gps.hpp new file mode 100644 index 000000000..5f39cc041 --- /dev/null +++ b/src/boost/libs/serialization/example/demo_gps.hpp @@ -0,0 +1,284 @@ +#ifndef BOOST_SERIALIZATION_EXAMPLE_DEMO_GPS_HPP +#define BOOST_SERIALIZATION_EXAMPLE_DEMO_GPS_HPP + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// +// demo_gps.hpp +// +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +// This illustration models the bus system of a small city. +// This includes, multiple bus stops, bus routes and schedules. +// There are different kinds of stops. Bus stops in general will +// will appear on multiple routes. A schedule will include +// muliple trips on the same route. + +///////////////////////////////////////////////////////////// +// gps coordinate +// +// llustrates serialization for a simple type +// +class gps_position +{ + friend class boost::serialization::access; + friend std::ostream & operator<<(std::ostream &os, const gps_position &gp); + + int degrees; + int minutes; + float seconds; + + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_NVP(degrees) + & BOOST_SERIALIZATION_NVP(minutes) + & BOOST_SERIALIZATION_NVP(seconds); + } + +public: + // every serializable class needs a constructor + gps_position(){}; + gps_position(int _d, int _m, float _s) : + degrees(_d), minutes(_m), seconds(_s) + {} +}; + +std::ostream & operator<<(std::ostream &os, const gps_position &gp) +{ + return os << ' ' << gp.degrees << (unsigned char)186 << gp.minutes << '\'' << gp.seconds << '"'; +} + +///////////////////////////////////////////////////////////// +// One bus stop +// +// illustrates serialization of serializable members +// + +class bus_stop +{ + friend class boost::serialization::access; + virtual std::string description() const = 0; + gps_position latitude; + gps_position longitude; + + template + void serialize(Archive &ar, const unsigned int version) + { + ar & BOOST_SERIALIZATION_NVP(latitude); + ar & BOOST_SERIALIZATION_NVP(longitude); + } + +protected: + bus_stop(const gps_position & _lat, const gps_position & _long) : + latitude(_lat), longitude(_long) + {} +public: + bus_stop(){} + friend std::ostream & operator<<(std::ostream &os, const bus_stop &gp); + virtual ~bus_stop(){} +}; + +BOOST_SERIALIZATION_ASSUME_ABSTRACT(bus_stop) + +std::ostream & operator<<(std::ostream &os, const bus_stop &bs) +{ + return os << bs.latitude << bs.longitude << ' ' << bs.description(); +} + +///////////////////////////////////////////////////////////// +// Several kinds of bus stops +// +// illustrates serialization of derived types +// +class bus_stop_corner : public bus_stop +{ + friend class boost::serialization::access; + std::string street1; + std::string street2; + virtual std::string description() const + { + return street1 + " and " + street2; + } + template + void serialize(Archive &ar, const unsigned int version) + { + // save/load base class information + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(bus_stop); + ar & BOOST_SERIALIZATION_NVP(street1); + ar & BOOST_SERIALIZATION_NVP(street2); + } +public: + bus_stop_corner(){} + bus_stop_corner(const gps_position & _lat, const gps_position & _long, + const std::string & _s1, const std::string & _s2 + ) : + bus_stop(_lat, _long), street1(_s1), street2(_s2) + { + } +}; + +class bus_stop_destination : public bus_stop +{ + friend class boost::serialization::access; + std::string name; + virtual std::string description() const + { + return name; + } + template + void serialize(Archive &ar, const unsigned int version) + { + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(bus_stop) + & BOOST_SERIALIZATION_NVP(name); + } +public: + bus_stop_destination(){} + bus_stop_destination( + const gps_position & _lat, const gps_position & _long, const std::string & _name + ) : + bus_stop(_lat, _long), name(_name) + { + } +}; + +///////////////////////////////////////////////////////////// +// a bus route is a collection of bus stops +// +// illustrates serialization of STL collection templates. +// +// illustrates serialzation of polymorphic pointer (bus stop *); +// +// illustrates storage and recovery of shared pointers is correct +// and efficient. That is objects pointed to by more than one +// pointer are stored only once. In such cases only one such +// object is restored and pointers are restored to point to it +// +class bus_route +{ + friend class boost::serialization::access; + friend std::ostream & operator<<(std::ostream &os, const bus_route &br); + typedef bus_stop * bus_stop_pointer; + std::list stops; + template + void serialize(Archive &ar, const unsigned int version) + { + // in this program, these classes are never serialized directly but rather + // through a pointer to the base class bus_stop. So we need a way to be + // sure that the archive contains information about these derived classes. + //ar.template register_type(); + ar.register_type(static_cast(NULL)); + //ar.template register_type(); + ar.register_type(static_cast(NULL)); + // serialization of stl collections is already defined + // in the header + ar & BOOST_SERIALIZATION_NVP(stops); + } +public: + bus_route(){} + void append(bus_stop *_bs) + { + stops.insert(stops.end(), _bs); + } +}; +std::ostream & operator<<(std::ostream &os, const bus_route &br) +{ + std::list::const_iterator it; + // note: we're displaying the pointer to permit verification + // that duplicated pointers are properly restored. + for(it = br.stops.begin(); it != br.stops.end(); it++){ + os << '\n' << std::hex << "0x" << *it << std::dec << ' ' << **it; + } + return os; +} + +///////////////////////////////////////////////////////////// +// a bus schedule is a collection of routes each with a starting time +// +// Illustrates serialization of STL objects(pair) in a non-intrusive way. +// See definition of operator<< >(ar, pair) +// +// illustrates nesting of serializable classes +// +// illustrates use of version number to automatically grandfather older +// versions of the same class. + +class bus_schedule +{ + friend class boost::serialization::access; + friend std::ostream & operator<<(std::ostream &os, const bus_schedule &bs); + template + void serialize(Archive &ar, const unsigned int version) + { + ar & BOOST_SERIALIZATION_NVP(schedule); + } + // note: this structure was made public. because the friend declarations + // didn't seem to work as expected. +public: + struct trip_info + { + template + void serialize(Archive &ar, const unsigned int file_version) + { + // in versions 2 or later + if(file_version >= 2) + // read the drivers name + ar & BOOST_SERIALIZATION_NVP(driver); + // all versions have the follwing info + ar & BOOST_SERIALIZATION_NVP(hour) + & BOOST_SERIALIZATION_NVP(minute); + } + + // starting time + int hour; + int minute; + // only after system shipped was the driver's name added to the class + std::string driver; + + trip_info(){} + trip_info(int _h, int _m, const std::string &_d) : + hour(_h), minute(_m), driver(_d) + {} + ~trip_info(){ + } + }; +// friend std::ostream & operator<<(std::ostream &os, const trip_info &ti); +private: + std::list > schedule; +public: + void append(const std::string &_d, int _h, int _m, bus_route *_br) + { + schedule.insert(schedule.end(), std::make_pair(trip_info(_h, _m, _d), _br)); + } + bus_schedule(){} +}; + +BOOST_CLASS_VERSION(bus_schedule::trip_info, 3) +BOOST_CLASS_VERSION(bus_schedule, 2) + +std::ostream & operator<<(std::ostream &os, const bus_schedule::trip_info &ti) +{ + return os << '\n' << ti.hour << ':' << ti.minute << ' ' << ti.driver << ' '; +} +std::ostream & operator<<(std::ostream &os, const bus_schedule &bs) +{ + std::list >::const_iterator it; + for(it = bs.schedule.begin(); it != bs.schedule.end(); it++){ + os << it->first << *(it->second); + } + return os; +} + +#endif // BOOST_SERIALIZATION_EXAMPLE_DEMO_GPS_HPP diff --git a/src/boost/libs/serialization/example/demo_log.cpp b/src/boost/libs/serialization/example/demo_log.cpp new file mode 100644 index 000000000..eef40ec81 --- /dev/null +++ b/src/boost/libs/serialization/example/demo_log.cpp @@ -0,0 +1,76 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// +// demo_log.cpp +// +// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#include + +#include "demo_gps.hpp" +#include "log_archive.hpp" + +int main(int argc, char *argv[]){ + // make the schedule + bus_schedule schedule; + + // fill in the data + // make a few stops + bus_stop *bs0 = new bus_stop_corner( + gps_position(34, 135, 52.560f), + gps_position(134, 22, 78.30f), + "24th Street", "10th Avenue" + ); + bus_stop *bs1 = new bus_stop_corner( + gps_position(35, 137, 23.456f), + gps_position(133, 35, 54.12f), + "State street", "Cathedral Vista Lane" + ); + bus_stop *bs2 = new bus_stop_destination( + gps_position(35, 136, 15.456f), + gps_position(133, 32, 15.300f), + "White House" + ); + bus_stop *bs3 = new bus_stop_destination( + gps_position(35, 134, 48.789f), + gps_position(133, 32, 16.230f), + "Lincoln Memorial" + ); + + // make a routes + bus_route route0; + route0.append(bs0); + route0.append(bs1); + route0.append(bs2); + + // add trips to schedule + schedule.append("bob", 6, 24, &route0); + schedule.append("bob", 9, 57, &route0); + schedule.append("alice", 11, 02, &route0); + + // make aother routes + bus_route route1; + route1.append(bs3); + route1.append(bs2); + route1.append(bs1); + + // add trips to schedule + schedule.append("ted", 7, 17, &route1); + schedule.append("ted", 9, 38, &route1); + schedule.append("alice", 11, 47, &route1); + + // display the complete schedule + log_archive oa(std::cout); + oa << BOOST_SERIALIZATION_NVP(schedule); + oa << schedule; + + delete bs0; + delete bs1; + delete bs2; + delete bs3; + return 0; +} + diff --git a/src/boost/libs/serialization/example/demo_output.txt b/src/boost/libs/serialization/example/demo_output.txt new file mode 100644 index 000000000..306bdbdc2 --- /dev/null +++ b/src/boost/libs/serialization/example/demo_output.txt @@ -0,0 +1,51 @@ +original schedule +6:24 bob +0x003265C8 34º135'52.56" 134º22'78.3" 24th Street and 10th Avenue +0x00326648 35º137'23.456" 133º35'54.12" State street and Cathedral Vista Lane +0x00326768 35º136'15.456" 133º32'15.3" White House +9:57 bob +0x003265C8 34º135'52.56" 134º22'78.3" 24th Street and 10th Avenue +0x00326648 35º137'23.456" 133º35'54.12" State street and Cathedral Vista Lane +0x00326768 35º136'15.456" 133º32'15.3" White House +11:2 alice +0x003265C8 34º135'52.56" 134º22'78.3" 24th Street and 10th Avenue +0x00326648 35º137'23.456" 133º35'54.12" State street and Cathedral Vista Lane +0x00326768 35º136'15.456" 133º32'15.3" White House +7:17 ted +0x003267D0 35º134'48.789" 133º32'16.23" Lincoln Memorial +0x00326768 35º136'15.456" 133º32'15.3" White House +0x00326648 35º137'23.456" 133º35'54.12" State street and Cathedral Vista Lane +9:38 ted +0x003267D0 35º134'48.789" 133º32'16.23" Lincoln Memorial +0x00326768 35º136'15.456" 133º32'15.3" White House +0x00326648 35º137'23.456" 133º35'54.12" State street and Cathedral Vista Lane +11:47 alice +0x003267D0 35º134'48.789" 133º32'16.23" Lincoln Memorial +0x00326768 35º136'15.456" 133º32'15.3" White House +0x00326648 35º137'23.456" 133º35'54.12" State street and Cathedral Vista Lane +restored schedule +6:24 +0x0032A2F8 34º135'52.56" 134º22'78.3" 24th Street and 10th Avenue +0x0032A508 35º137'23.456" 133º35'54.12" State street and Cathedral Vista Lane +0x0032A628 35º136'15.456" 133º32'15.3" White House +9:57 +0x0032A2F8 34º135'52.56" 134º22'78.3" 24th Street and 10th Avenue +0x0032A508 35º137'23.456" 133º35'54.12" State street and Cathedral Vista Lane +0x0032A628 35º136'15.456" 133º32'15.3" White House +11:2 +0x0032A2F8 34º135'52.56" 134º22'78.3" 24th Street and 10th Avenue +0x0032A508 35º137'23.456" 133º35'54.12" State street and Cathedral Vista Lane +0x0032A628 35º136'15.456" 133º32'15.3" White House +7:17 +0x0032A8C0 35º134'48.789" 133º32'16.23" Lincoln Memorial +0x0032A628 35º136'15.456" 133º32'15.3" White House +0x0032A508 35º137'23.456" 133º35'54.12" State street and Cathedral Vista Lane +9:38 +0x0032A8C0 35º134'48.789" 133º32'16.23" Lincoln Memorial +0x0032A628 35º136'15.456" 133º32'15.3" White House +0x0032A508 35º137'23.456" 133º35'54.12" State street and Cathedral Vista Lane +11:47 +0x0032A8C0 35º134'48.789" 133º32'16.23" Lincoln Memorial +0x0032A628 35º136'15.456" 133º32'15.3" White House +0x0032A508 35º137'23.456" 133º35'54.12" State street and Cathedral Vista Lane +*** No errors detected diff --git a/src/boost/libs/serialization/example/demo_pimpl.cpp b/src/boost/libs/serialization/example/demo_pimpl.cpp new file mode 100644 index 000000000..629bbcd1f --- /dev/null +++ b/src/boost/libs/serialization/example/demo_pimpl.cpp @@ -0,0 +1,34 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// demo_pimpl.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include + +#include +#include + +#include "demo_pimpl_A.hpp" + +int main(int argc, char* argv[]) +{ + std::stringstream ss; + + const A a; + { + boost::archive::text_oarchive oa(ss); + oa << a; + } + A a1; + { + boost::archive::text_iarchive ia(ss); + ia >> a1; + } + return 0; +} + diff --git a/src/boost/libs/serialization/example/demo_pimpl_A.cpp b/src/boost/libs/serialization/example/demo_pimpl_A.cpp new file mode 100644 index 000000000..055d02daa --- /dev/null +++ b/src/boost/libs/serialization/example/demo_pimpl_A.cpp @@ -0,0 +1,45 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// demo_pimpl_A.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#include + +#include "demo_pimpl_A.hpp" + +// "hidden" definition of class B +struct B { + int b; + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + ar & b; + } +}; + +A::A() : + pimpl(new B) +{} +A::~A(){ + delete pimpl; +} +// now we can define the serialization for class A +template +void A::serialize(Archive & ar, const unsigned int /* file_version */){ + ar & pimpl; +} + +// without the explicit instantiations below, the program will +// fail to link for lack of instantiantiation of the above function +// note: the following failed to fix link errors for vc 7.0 ! +template void A::serialize( + boost::archive::text_iarchive & ar, + const unsigned int file_version +); +template void A::serialize( + boost::archive::text_oarchive & ar, + const unsigned int file_version +); diff --git a/src/boost/libs/serialization/example/demo_pimpl_A.hpp b/src/boost/libs/serialization/example/demo_pimpl_A.hpp new file mode 100644 index 000000000..eff3f1277 --- /dev/null +++ b/src/boost/libs/serialization/example/demo_pimpl_A.hpp @@ -0,0 +1,24 @@ +#ifndef BOOST_SERIALIZATION_EXAMPLE_DEMO_PIMPL_A_HPP +#define BOOST_SERIALIZATION_EXAMPLE_DEMO_PIMPL_A_HPP + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// demo_pimpl_A.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// class whose declaration is hidden by a pointer +struct B; + +struct A { + // class a contains a pointer to a "hidden" declaration + B *pimpl; + template + void serialize(Archive & ar, const unsigned int file_version); + A(); + ~A(); +}; + +#endif // BOOST_SERIALIZATION_EXAMPLE_DEMO_PIMPL_A_HPP diff --git a/src/boost/libs/serialization/example/demo_polymorphic.cpp b/src/boost/libs/serialization/example/demo_polymorphic.cpp new file mode 100644 index 000000000..0a9c85667 --- /dev/null +++ b/src/boost/libs/serialization/example/demo_polymorphic.cpp @@ -0,0 +1,65 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// demo_polymorphic.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include + +#include +#include + +#include +#include + +#include "demo_polymorphic_A.hpp" + +int main(int argc, char* argv[]) +{ + const A a; + A a1; + { + // test with a text archive + std::stringstream ss; + { + // instantiate archive which inhertis polymorphic interface + // and the normal text archive implementation + boost::archive::polymorphic_text_oarchive oa(ss); + boost::archive::polymorphic_oarchive & oa_interface = oa; + // we can just just the interface for saving + oa_interface << a; + } + { + // or we can use the implementation directly + boost::archive::polymorphic_text_iarchive ia(ss); + ia >> a1; + } + } + if(! (a == a1)) + return 1; + { + //test with a binary archive + std::stringstream ss; + { + // instantiate archive which inhertis polymorphic interface + // and the normal binary archive implementation + boost::archive::polymorphic_binary_oarchive oa(ss); + oa << a; + } + { + // see above + boost::archive::polymorphic_binary_iarchive ia(ss); + boost::archive::polymorphic_iarchive & ia_interface = ia; + // use just the polymorphic interface for loading. + ia_interface >> a1; + } + } + if(! (a == a1)) + return 1; + return 0; +} + diff --git a/src/boost/libs/serialization/example/demo_polymorphic_A.cpp b/src/boost/libs/serialization/example/demo_polymorphic_A.cpp new file mode 100644 index 000000000..bf26cb413 --- /dev/null +++ b/src/boost/libs/serialization/example/demo_polymorphic_A.cpp @@ -0,0 +1,26 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// demo_polymorphic_A.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + + +#include +#include + +#include "demo_polymorphic_A.hpp" + +// explicitly instantiate templates for polymorphic archives +// used by this demo. +template +void A::serialize( + boost::archive::polymorphic_iarchive &, + const unsigned int +); +template +void A::serialize( + boost::archive::polymorphic_oarchive &, + const unsigned int +); diff --git a/src/boost/libs/serialization/example/demo_polymorphic_A.hpp b/src/boost/libs/serialization/example/demo_polymorphic_A.hpp new file mode 100644 index 000000000..513b633a2 --- /dev/null +++ b/src/boost/libs/serialization/example/demo_polymorphic_A.hpp @@ -0,0 +1,39 @@ +#ifndef BOOST_SERIALIZATION_EXAMPLE_DEMO_POLYMORPHIC_A_HPP +#define BOOST_SERIALIZATION_EXAMPLE_DEMO_POLYMORPHIC_A_HPP + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// demo_polymorphic_A.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +namespace boost { +namespace archive { + +class polymorphic_iarchive; +class polymorphic_oarchive; + +} // namespace archive +} // namespace boost + +struct A { + // class a contains a pointer to a "hidden" declaration + template + void serialize( + Archive & ar, + const unsigned int file_version + ){ + ar & data; + } + int data; + bool operator==(const A & rhs) const { + return data == rhs.data; + } + A() : + data(0) + {} +}; + +#endif // BOOST_SERIALIZATION_EXAMPLE_DEMO_POLYMORPHIC_A_HPP diff --git a/src/boost/libs/serialization/example/demo_portable_archive.cpp b/src/boost/libs/serialization/example/demo_portable_archive.cpp new file mode 100644 index 000000000..ae329618c --- /dev/null +++ b/src/boost/libs/serialization/example/demo_portable_archive.cpp @@ -0,0 +1,104 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// +// demo_portable_archive.cpp +// +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +// note:: this example can only be built with the static library +// (at least with MSVC - due to conflicts related to import of library +// code and instantiation of templates. +#include + +#include "portable_binary_oarchive.hpp" +#include "portable_binary_iarchive.hpp" + +#include +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ using ::rand; } +#endif + +class A +{ + friend class boost::serialization::access; + char c; + A *pa; + int i; + int i2; // special tricky case to check sign extension + unsigned int ui; + long l; + unsigned long ul; + template + void serialize(Archive & ar, const unsigned int /* version */){ + ar & c & i & i2 & ui & l & ul ; + } +public: + bool operator==(const A & rhs) const { + return + c == rhs.c + && i == rhs.i + && i2 == rhs.i2 + && ui == rhs.ui + && l == rhs.l + && ul == rhs.ul + ; + } + A() : + c(0xFF & std::rand()), + pa(0), + i(std::rand()), + i2(0x80), + ui(std::rand()), + l(std::rand() * std::rand()), + ul(std::rand()) + {} +}; + +int main( int /* argc */, char* /* argv */[] ) +{ + const A a; + A a1; + + std::stringstream ss; + { + portable_binary_oarchive pboa(ss); + pboa << a; + } + { + portable_binary_iarchive pbia(ss); + pbia >> a1; + } + if(! (a == a1)) + return 1; + + ss.clear(); + { + portable_binary_oarchive pboa(ss, endian_big); + pboa << a; + } + { + portable_binary_iarchive pbia(ss, endian_big); + pbia >> a1; + } + if(! (a == a1)) + return 1; + + ss.clear(); + { + portable_binary_oarchive pboa(ss, endian_big); + pboa << a; + } + { + portable_binary_iarchive pbia(ss, endian_big); + pbia >> a1; + } + + return !(a == a1); +} + + diff --git a/src/boost/libs/serialization/example/demo_save.xml b/src/boost/libs/serialization/example/demo_save.xml new file mode 100644 index 000000000..c5a28c8eb --- /dev/null +++ b/src/boost/libs/serialization/example/demo_save.xml @@ -0,0 +1,129 @@ + + + + + + 6 + + + bob + 6 + 24 + + + + 3 + + + + 34 + 135 + 52.560001 + + + 134 + 22 + 78.300003 + + + 24th Street + 10th Avenue + + + + + 35 + 137 + 23.455999 + + + 133 + 35 + 54.119999 + + + State street + Cathedral Vista Lane + + + + + 35 + 136 + 15.456 + + + 133 + 32 + 15.3 + + + White House + + + + + + + bob + 9 + 57 + + + + + + alice + 11 + 2 + + + + + + ted + 7 + 17 + + + + 3 + + + + 35 + 134 + 48.789001 + + + 133 + 32 + 16.23 + + + Lincoln Memorial + + + + + + + + + ted + 9 + 38 + + + + + + alice + 11 + 47 + + + + + + diff --git a/src/boost/libs/serialization/example/demo_shared_ptr.cpp b/src/boost/libs/serialization/example/demo_shared_ptr.cpp new file mode 100644 index 000000000..63410fc88 --- /dev/null +++ b/src/boost/libs/serialization/example/demo_shared_ptr.cpp @@ -0,0 +1,164 @@ +// demo_shared_ptr.cpp : demonstrates adding serialization to a template + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . Polymorphic +// derived pointer example by David Tonge. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include // NULL +#include +#include + +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include +#include +#include + +#include + +/////////////////////////// +// test shared_ptr serialization +class A +{ +private: + friend class boost::serialization::access; + int x; + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + ar & x; + } +public: + static int count; + A(){++count;} // default constructor + virtual ~A(){--count;} // default destructor +}; + +BOOST_SERIALIZATION_SHARED_PTR(A) + +///////////////// +// ADDITION BY DT +class B : public A +{ +private: + friend class boost::serialization::access; + int x; + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + ar & boost::serialization::base_object(*this); + } +public: + static int count; + B() : A() {}; + virtual ~B() {}; +}; + +BOOST_SERIALIZATION_SHARED_PTR(B) + +///////////////// + +int A::count = 0; + +void display(boost::shared_ptr &spa, boost::shared_ptr &spa1) +{ + std::cout << "a = 0x" << std::hex << spa.get() << " "; + if (spa.get()) std::cout << "is a " << typeid(*(spa.get())).name() << "* "; + std::cout << "use count = " << std::dec << spa.use_count() << std::endl; + std::cout << "a1 = 0x" << std::hex << spa1.get() << " "; + if (spa1.get()) std::cout << "is a " << typeid(*(spa1.get())).name() << "* "; + std::cout << "use count = " << std::dec << spa1.use_count() << std::endl; + std::cout << "unique element count = " << A::count << std::endl; +} + +int main(int /* argc */, char * /*argv*/[]) +{ + std::string filename(boost::archive::tmpdir()); + filename += "/testfile"; + + // create a new shared pointer to ta new object of type A + boost::shared_ptr spa(new A); + boost::shared_ptr spa1; + spa1 = spa; + display(spa, spa1); + // serialize it + { + std::ofstream ofs(filename.c_str()); + boost::archive::text_oarchive oa(ofs); + oa << spa; + oa << spa1; + } + // reset the shared pointer to NULL + // thereby destroying the object of type A + spa.reset(); + spa1.reset(); + display(spa, spa1); + // restore state to one equivalent to the original + // creating a new type A object + { + // open the archive + std::ifstream ifs(filename.c_str()); + boost::archive::text_iarchive ia(ifs); + + // restore the schedule from the archive + ia >> spa; + ia >> spa1; + } + display(spa, spa1); + spa.reset(); + spa1.reset(); + + std::cout << std::endl; + std::cout << std::endl; + std::cout << "New tests" << std::endl; + + ///////////////// + // ADDITION BY DT + // create a new shared pointer to ta new object of type A + spa = boost::shared_ptr(new B); + spa1 = spa; + display(spa, spa1); + // serialize it + { + std::ofstream ofs(filename.c_str()); + boost::archive::text_oarchive oa(ofs); + oa.register_type(static_cast(NULL)); + oa << spa; + oa << spa1; + } + // reset the shared pointer to NULL + // thereby destroying the object of type B + spa.reset(); + spa1.reset(); + display(spa, spa1); + // restore state to one equivalent to the original + // creating a new type B object + { + // open the archive + std::ifstream ifs(filename.c_str()); + boost::archive::text_iarchive ia(ifs); + + // restore the schedule from the archive + ia.register_type(static_cast(NULL)); + ia >> spa; + ia >> spa1; + } + display(spa, spa1); + /////////////// + std::remove(filename.c_str()); + + // obj of type A gets destroyed + // as smart_ptr goes out of scope + return 0; +} diff --git a/src/boost/libs/serialization/example/demo_simple_log.cpp b/src/boost/libs/serialization/example/demo_simple_log.cpp new file mode 100644 index 000000000..b6963c5b1 --- /dev/null +++ b/src/boost/libs/serialization/example/demo_simple_log.cpp @@ -0,0 +1,75 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// +// demo_log.cpp +// +// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#include + +#include "demo_gps.hpp" +#include "simple_log_archive.hpp" + +int main(int argc, char *argv[]) +{ + // make the schedule + bus_schedule schedule; + + // fill in the data + // make a few stops + bus_stop *bs0 = new bus_stop_corner( + gps_position(34, 135, 52.560f), + gps_position(134, 22, 78.30f), + "24th Street", "10th Avenue" + ); + bus_stop *bs1 = new bus_stop_corner( + gps_position(35, 137, 23.456f), + gps_position(133, 35, 54.12f), + "State street", "Cathedral Vista Lane" + ); + bus_stop *bs2 = new bus_stop_destination( + gps_position(35, 136, 15.456f), + gps_position(133, 32, 15.300f), + "White House" + ); + bus_stop *bs3 = new bus_stop_destination( + gps_position(35, 134, 48.789f), + gps_position(133, 32, 16.230f), + "Lincoln Memorial" + ); + + // make a routes + bus_route route0; + route0.append(bs0); + route0.append(bs1); + route0.append(bs2); + + // add trips to schedule + schedule.append("bob", 6, 24, &route0); + schedule.append("bob", 9, 57, &route0); + schedule.append("alice", 11, 02, &route0); + + // make aother routes + bus_route route1; + route1.append(bs3); + route1.append(bs2); + route1.append(bs1); + + // add trips to schedule + schedule.append("ted", 7, 17, &route1); + schedule.append("ted", 9, 38, &route1); + schedule.append("alice", 11, 47, &route1); + + // display the complete schedule + simple_log_archive log(std::cout); + log << schedule; + + delete bs0; + delete bs1; + delete bs2; + delete bs3; + return 0; +} diff --git a/src/boost/libs/serialization/example/demo_trivial_archive.cpp b/src/boost/libs/serialization/example/demo_trivial_archive.cpp new file mode 100644 index 000000000..b82b13764 --- /dev/null +++ b/src/boost/libs/serialization/example/demo_trivial_archive.cpp @@ -0,0 +1,94 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// +// demo_trivial_archive.cpp +// +// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include // std::size_t +#include + +///////////////////////////////////////////////////////////////////////// +// class trivial_oarchive +class trivial_oarchive { + +public: + ////////////////////////////////////////////////////////// + // public interface used by programs that use the + // serialization library + typedef boost::mpl::bool_ is_saving; + typedef boost::mpl::bool_ is_loading; + template void register_type(){} + template trivial_oarchive & operator<<(const T & t){ + return *this; + } + template trivial_oarchive & operator&(const T & t){ + return *this << t; + } + void save_binary(void *address, std::size_t count){}; +}; + +#include "demo_gps.hpp" + +int main(int argc, char *argv[]) +{ + // make the schedule + bus_schedule schedule; + + // fill in the data + // make a few stops + bus_stop *bs0 = new bus_stop_corner( + gps_position(34, 135, 52.560f), + gps_position(134, 22, 78.30f), + "24th Street", "10th Avenue" + ); + bus_stop *bs1 = new bus_stop_corner( + gps_position(35, 137, 23.456f), + gps_position(133, 35, 54.12f), + "State street", "Cathedral Vista Lane" + ); + bus_stop *bs2 = new bus_stop_destination( + gps_position(35, 136, 15.456f), + gps_position(133, 32, 15.300f), + "White House" + ); + bus_stop *bs3 = new bus_stop_destination( + gps_position(35, 134, 48.789f), + gps_position(133, 32, 16.230f), + "Lincoln Memorial" + ); + + // make a routes + bus_route route0; + route0.append(bs0); + route0.append(bs1); + route0.append(bs2); + + // add trips to schedule + schedule.append("bob", 6, 24, &route0); + schedule.append("bob", 9, 57, &route0); + schedule.append("alice", 11, 02, &route0); + + // make aother routes + bus_route route1; + route1.append(bs3); + route1.append(bs2); + route1.append(bs1); + + // add trips to schedule + schedule.append("ted", 7, 17, &route1); + schedule.append("ted", 9, 38, &route1); + schedule.append("alice", 11, 47, &route1); + + // display the complete schedule + trivial_oarchive ta; + ta << schedule; + + delete bs0; + delete bs1; + delete bs2; + delete bs3; + return 0; +} diff --git a/src/boost/libs/serialization/example/demo_xml.cpp b/src/boost/libs/serialization/example/demo_xml.cpp new file mode 100644 index 000000000..4c8518e99 --- /dev/null +++ b/src/boost/libs/serialization/example/demo_xml.cpp @@ -0,0 +1,127 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// +// demo_xml.cpp +// +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include +#include + +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include +#include +#include + +#include "demo_gps.hpp" + +void save_schedule(const bus_schedule &s, const char * filename){ + // make an archive + std::ofstream ofs(filename); + assert(ofs.good()); + boost::archive::xml_oarchive oa(ofs); + oa << BOOST_SERIALIZATION_NVP(s); +} + +void +restore_schedule(bus_schedule &s, const char * filename) +{ + // open the archive + std::ifstream ifs(filename); + assert(ifs.good()); + boost::archive::xml_iarchive ia(ifs); + + // restore the schedule from the archive + ia >> BOOST_SERIALIZATION_NVP(s); +} + +int main(int argc, char *argv[]) +{ + // make the schedule + bus_schedule original_schedule; + + // fill in the data + // make a few stops + bus_stop *bs0 = new bus_stop_corner( + gps_position(34, 135, 52.560f), + gps_position(134, 22, 78.30f), + "24th Street", "10th Avenue" + ); + bus_stop *bs1 = new bus_stop_corner( + gps_position(35, 137, 23.456f), + gps_position(133, 35, 54.12f), + "State street", "Cathedral Vista Lane" + ); + bus_stop *bs2 = new bus_stop_destination( + gps_position(35, 136, 15.456f), + gps_position(133, 32, 15.300f), + "White House" + ); + bus_stop *bs3 = new bus_stop_destination( + gps_position(35, 134, 48.789f), + gps_position(133, 32, 16.230f), + "Lincoln Memorial" + ); + + // make a routes + bus_route route0; + route0.append(bs0); + route0.append(bs1); + route0.append(bs2); + + // add trips to schedule + original_schedule.append("bob", 6, 24, &route0); + original_schedule.append("bob", 9, 57, &route0); + original_schedule.append("alice", 11, 02, &route0); + + // make aother routes + bus_route route1; + route1.append(bs3); + route1.append(bs2); + route1.append(bs1); + + // add trips to schedule + original_schedule.append("ted", 7, 17, &route1); + original_schedule.append("ted", 9, 38, &route1); + original_schedule.append("alice", 11, 47, &route1); + + // display the complete schedule + std::cout << "original schedule"; + std::cout << original_schedule; + + std::string filename(boost::archive::tmpdir()); + filename += "/demo.xml"; + + // save the schedule + save_schedule(original_schedule, filename.c_str()); + + // ... some time later + // make a new schedule + bus_schedule new_schedule; + + restore_schedule(new_schedule, filename.c_str()); + + // and display + std::cout << "\nrestored schedule"; + std::cout << new_schedule; + // should be the same as the old one. (except for the pointer values) + + std::remove(filename.c_str()); + + delete bs0; + delete bs1; + delete bs2; + delete bs3; + return 0; +} diff --git a/src/boost/libs/serialization/example/demo_xml.hpp b/src/boost/libs/serialization/example/demo_xml.hpp new file mode 100644 index 000000000..86d6c1b4a --- /dev/null +++ b/src/boost/libs/serialization/example/demo_xml.hpp @@ -0,0 +1,284 @@ +#ifndef BOOST_SERIALIZATION_EXAMPLE_DEMO_XML_HPP +#define BOOST_SERIALIZATION_EXAMPLE_DEMO_XML_HPP + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// +// demo_xml.hpp +// +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + + +#include +#include +#include +#include + +#include +#include +#include +#include + +// This illustration models the bus system of a small city. +// This includes, multiple bus stops, bus routes and schedules. +// There are different kinds of stops. Bus stops in general will +// will appear on multiple routes. A schedule will include +// muliple trips on the same route. + +///////////////////////////////////////////////////////////// +// gps coordinate +// +// llustrates serialization for a simple type +// +class gps_position +{ + friend class boost::serialization::access; + friend std::ostream & operator<<(std::ostream &os, const gps_position &gp); + + int degrees; + int minutes; + float seconds; + + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_NVP(degrees) + & BOOST_SERIALIZATION_NVP(minutes) + & BOOST_SERIALIZATION_NVP(seconds); + } + +public: + // every serializable class needs a constructor + gps_position(){}; + gps_position(int _d, int _m, float _s) : + degrees(_d), minutes(_m), seconds(_s) + {} +}; + +std::ostream & operator<<(std::ostream &os, const gps_position &gp) +{ + return os << ' ' << gp.degrees << (unsigned char)186 << gp.minutes << '\'' << gp.seconds << '"'; +} + +///////////////////////////////////////////////////////////// +// One bus stop +// +// illustrates serialization of serializable members +// + +class bus_stop +{ + friend class boost::serialization::access; + virtual std::string description() const = 0; + gps_position latitude; + gps_position longitude; + + template + void serialize(Archive &ar, const unsigned int version) + { + ar & BOOST_SERIALIZATION_NVP(latitude); + ar & BOOST_SERIALIZATION_NVP(longitude); + } + +protected: + bus_stop(const gps_position & _lat, const gps_position & _long) : + latitude(_lat), longitude(_long) + {} +public: + bus_stop(){} + friend std::ostream & operator<<(std::ostream &os, const bus_stop &gp); + virtual ~bus_stop(){} +}; + +BOOST_IS_ABSTRACT(bus_stop) + +std::ostream & operator<<(std::ostream &os, const bus_stop &bs) +{ + return os << bs.latitude << bs.longitude << ' ' << bs.description(); +} + +///////////////////////////////////////////////////////////// +// Several kinds of bus stops +// +// illustrates serialization of derived types +// +class bus_stop_corner : public bus_stop +{ + friend class boost::serialization::access; + std::string street1; + std::string street2; + virtual std::string description() const + { + return street1 + " and " + street2; + } + template + void serialize(Archive &ar, const unsigned int version) + { + // save/load base class information + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(bus_stop); + ar & BOOST_SERIALIZATION_NVP(street1); + ar & BOOST_SERIALIZATION_NVP(street2); + } +public: + bus_stop_corner(){} + bus_stop_corner(const gps_position & _lat, const gps_position & _long, + const std::string & _s1, const std::string & _s2 + ) : + bus_stop(_lat, _long), street1(_s1), street2(_s2) + { + } +}; + +class bus_stop_destination : public bus_stop +{ + friend class boost::serialization::access; + std::string name; + virtual std::string description() const + { + return name; + } + template + void serialize(Archive &ar, const unsigned int version) + { + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(bus_stop) + & BOOST_SERIALIZATION_NVP(name); + } +public: + bus_stop_destination(){} + bus_stop_destination( + const gps_position & _lat, const gps_position & _long, const std::string & _name + ) : + bus_stop(_lat, _long), name(_name) + { + } +}; + +///////////////////////////////////////////////////////////// +// a bus route is a collection of bus stops +// +// illustrates serialization of STL collection templates. +// +// illustrates serialzation of polymorphic pointer (bus stop *); +// +// illustrates storage and recovery of shared pointers is correct +// and efficient. That is objects pointed to by more than one +// pointer are stored only once. In such cases only one such +// object is restored and pointers are restored to point to it +// +class bus_route +{ + friend class boost::serialization::access; + friend std::ostream & operator<<(std::ostream &os, const bus_route &br); + typedef bus_stop * bus_stop_pointer; + std::list stops; + template + void serialize(Archive &ar, const unsigned int version) + { + // in this program, these classes are never serialized directly but rather + // through a pointer to the base class bus_stop. So we need a way to be + // sure that the archive contains information about these derived classes. + //ar.template register_type(); + ar.register_type(static_cast(NULL)); + //ar.template register_type(); + ar.register_type(static_cast(NULL)); + // serialization of stl collections is already defined + // in the header + ar & BOOST_SERIALIZATION_NVP(stops); + } +public: + bus_route(){} + void append(bus_stop *_bs) + { + stops.insert(stops.end(), _bs); + } +}; +std::ostream & operator<<(std::ostream &os, const bus_route &br) +{ + std::list::const_iterator it; + // note: we're displaying the pointer to permit verification + // that duplicated pointers are properly restored. + for(it = br.stops.begin(); it != br.stops.end(); it++){ + os << '\n' << std::hex << "0x" << *it << std::dec << ' ' << **it; + } + return os; +} + +///////////////////////////////////////////////////////////// +// a bus schedule is a collection of routes each with a starting time +// +// Illustrates serialization of STL objects(pair) in a non-intrusive way. +// See definition of operator<< >(ar, pair) +// +// illustrates nesting of serializable classes +// +// illustrates use of version number to automatically grandfather older +// versions of the same class. + +class bus_schedule +{ + friend class boost::serialization::access; + friend std::ostream & operator<<(std::ostream &os, const bus_schedule &bs); + template + void serialize(Archive &ar, const unsigned int version) + { + ar & BOOST_SERIALIZATION_NVP(schedule); + } + // note: this structure was made public. because the friend declarations + // didn't seem to work as expected. +public: + struct trip_info + { + template + void serialize(Archive &ar, const unsigned int file_version) + { + // in versions 2 or later + if(file_version >= 2) + // read the drivers name + ar & BOOST_SERIALIZATION_NVP(driver); + // all versions have the follwing info + ar & BOOST_SERIALIZATION_NVP(hour) + & BOOST_SERIALIZATION_NVP(minute); + } + + // starting time + int hour; + int minute; + // only after system shipped was the driver's name added to the class + std::string driver; + + trip_info(){} + trip_info(int _h, int _m, const std::string &_d) : + hour(_h), minute(_m), driver(_d) + {} + ~trip_info(){ + } + }; +// friend std::ostream & operator<<(std::ostream &os, const trip_info &ti); +private: + std::list > schedule; +public: + void append(const std::string &_d, int _h, int _m, bus_route *_br) + { + schedule.insert(schedule.end(), std::make_pair(trip_info(_h, _m, _d), _br)); + } + bus_schedule(){} +}; + +BOOST_CLASS_VERSION(bus_schedule::trip_info, 3) +BOOST_CLASS_VERSION(bus_schedule, 2) + +std::ostream & operator<<(std::ostream &os, const bus_schedule::trip_info &ti) +{ + return os << '\n' << ti.hour << ':' << ti.minute << ' ' << ti.driver << ' '; +} +std::ostream & operator<<(std::ostream &os, const bus_schedule &bs) +{ + std::list >::const_iterator it; + for(it = bs.schedule.begin(); it != bs.schedule.end(); it++){ + os << it->first << *(it->second); + } + return os; +} + +#endif // BOOST_SERIALIZATION_EXAMPLE_DEMO_XML_HPP diff --git a/src/boost/libs/serialization/example/demo_xml_load.cpp b/src/boost/libs/serialization/example/demo_xml_load.cpp new file mode 100644 index 000000000..fcbe80bbf --- /dev/null +++ b/src/boost/libs/serialization/example/demo_xml_load.cpp @@ -0,0 +1,45 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// +// demo_xml_load.cpp +// +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include + +#include + +#include "demo_gps.hpp" + +void +restore_schedule(bus_schedule &s, const char * filename) +{ + // open the archive + std::ifstream ifs(filename); + assert(ifs.good()); + boost::archive::xml_iarchive ia(ifs); + + // restore the schedule from the archive + ia >> BOOST_SERIALIZATION_NVP(s); +} + +int main(int argc, char *argv[]) +{ + // make a new schedule + bus_schedule new_schedule; + + std::string filename(boost::archive::tmpdir()); + filename += "/demo_save.xml"; + + restore_schedule(new_schedule, filename.c_str()); + + // and display + std::cout << "\nrestored schedule"; + std::cout << new_schedule; + + return 0; +} diff --git a/src/boost/libs/serialization/example/demo_xml_save.cpp b/src/boost/libs/serialization/example/demo_xml_save.cpp new file mode 100644 index 000000000..045d40bab --- /dev/null +++ b/src/boost/libs/serialization/example/demo_xml_save.cpp @@ -0,0 +1,91 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// +// demo_xml_save.cpp +// +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include + +#include + +#include "demo_gps.hpp" + +void save_schedule(const bus_schedule &s, const char * filename){ + // make an archive + std::ofstream ofs(filename); + assert(ofs.good()); + boost::archive::xml_oarchive oa(ofs); + oa << BOOST_SERIALIZATION_NVP(s); +} + +int main(int argc, char *argv[]) +{ + // make the schedule + bus_schedule original_schedule; + + // fill in the data + // make a few stops + bus_stop *bs0 = new bus_stop_corner( + gps_position(34, 135, 52.560f), + gps_position(134, 22, 78.30f), + "24th Street", "10th Avenue" + ); + bus_stop *bs1 = new bus_stop_corner( + gps_position(35, 137, 23.456f), + gps_position(133, 35, 54.12f), + "State street", "Cathedral Vista Lane" + ); + bus_stop *bs2 = new bus_stop_destination( + gps_position(35, 136, 15.456f), + gps_position(133, 32, 15.300f), + "White House" + ); + bus_stop *bs3 = new bus_stop_destination( + gps_position(35, 134, 48.789f), + gps_position(133, 32, 16.230f), + "Lincoln Memorial" + ); + + // make a routes + bus_route route0; + route0.append(bs0); + route0.append(bs1); + route0.append(bs2); + + // add trips to schedule + original_schedule.append("bob", 6, 24, &route0); + original_schedule.append("bob", 9, 57, &route0); + original_schedule.append("alice", 11, 02, &route0); + + // make aother routes + bus_route route1; + route1.append(bs3); + route1.append(bs2); + route1.append(bs1); + + // add trips to schedule + original_schedule.append("ted", 7, 17, &route1); + original_schedule.append("ted", 9, 38, &route1); + original_schedule.append("alice", 11, 47, &route1); + + // display the complete schedule + std::cout << "original schedule"; + std::cout << original_schedule; + + std::string filename(boost::archive::tmpdir()); + filename += "/demo_save.xml"; + + // save the schedule + save_schedule(original_schedule, filename.c_str()); + + delete bs0; + delete bs1; + delete bs2; + delete bs3; + return 0; +} diff --git a/src/boost/libs/serialization/example/demofile.txt b/src/boost/libs/serialization/example/demofile.txt new file mode 100644 index 000000000..59ae12f63 --- /dev/null +++ b/src/boost/libs/serialization/example/demofile.txt @@ -0,0 +1,13 @@ +22 serialization::archive 3 0 2 0 0 6 0 0 0 0 6 24 4 1 0 +0 0 0 3 5 1 0 +1 0 0 0 0 34 135 52.560001 134 22 78.300003 11 24th Street 11 10th Avenue 5 +2 35 137 23.455999 133 35 54.119999 12 State street 20 Cathedral Vista Lane 6 1 0 +3 35 136 15.456 133 32 15.3 11 White House 9 57 4 +0 11 2 4 +0 7 17 4 +4 3 6 +5 35 134 48.789001 133 32 16.23 16 Lincoln Memorial 6 +3 5 +2 9 38 4 +4 11 47 4 +4 \ No newline at end of file diff --git a/src/boost/libs/serialization/example/fix_six.cpp b/src/boost/libs/serialization/example/fix_six.cpp new file mode 100644 index 000000000..6526e1292 --- /dev/null +++ b/src/boost/libs/serialization/example/fix_six.cpp @@ -0,0 +1,37 @@ +#include +#include +#include +#include +#include + +void usage(const char * program_name){ + std::cout << "usage:"; + std::cout << program_name << " filename" << std::endl; +} + +int main(int argc, char *argv[]){ + if(argc != 2){ + std::cout << "invalid number of arguments" << std::endl; + usage(argv[0]); + return 1; + } + std::filebuf fb; + fb.open( + argv[1], + std::ios_base::binary | std::ios_base::in | std::ios_base::out + ); + if(!fb.is_open()){ + std::cout << argv[1] << " failed to open" << std::endl; + return 1; + } + boost::archive::binary_iarchive ia(fb); + boost::archive::library_version_type lvt = ia.get_library_version(); + if(boost::archive::library_version_type(6) != lvt){ + std::cout << "library version not equal to six" << std::endl; + return 1; + } + lvt = boost::archive::library_version_type(7); + fb.pubseekpos(26, std::ios_base::out); + fb.sputn(reinterpret_cast(& lvt), sizeof(lvt)); + fb.close(); +} diff --git a/src/boost/libs/serialization/example/log_archive.cpp b/src/boost/libs/serialization/example/log_archive.cpp new file mode 100644 index 000000000..8b21a008b --- /dev/null +++ b/src/boost/libs/serialization/example/log_archive.cpp @@ -0,0 +1,32 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// log_archive.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +//#define BOOST_ARCHIVE_SOURCE +#include "log_archive.hpp" +#include + +// explicitly instantiate for this type of xml stream +#include +#include +#include + +namespace boost { +namespace archive { + +template class detail::archive_serializer_map; +template class basic_xml_oarchive ; +template class xml_oarchive_impl ; + +} // namespace archive +} // namespace boost diff --git a/src/boost/libs/serialization/example/log_archive.hpp b/src/boost/libs/serialization/example/log_archive.hpp new file mode 100644 index 000000000..0d7ffdbd2 --- /dev/null +++ b/src/boost/libs/serialization/example/log_archive.hpp @@ -0,0 +1,81 @@ +#ifndef LOG_ARCHIVE_HPP +#define LOG_ARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// log_archive.hpp + +// (C) Copyright 2010 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +namespace boost { + namespace archive { + namespace detail { + template class interface_oarchive; + } // namespace detail + } // namespace archive +} // boost + +///////////////////////////////////////////////////////////////////////// +// log data to an output stream. This illustrates a simpler implemenation +// of text output which is useful for getting a formatted display of +// any serializable class. Intended to be useful as a debugging aid. +class log_archive : + /* protected ? */ + public boost::archive::xml_oarchive_impl +{ + typedef boost::archive::xml_oarchive_impl base; + // give serialization implementation access to this clas + friend class boost::archive::detail::interface_oarchive; + friend class boost::archive::basic_xml_oarchive; + friend class boost::archive::save_access; + + ///////////////////////////////////////////////////////////////////// + // Override functions defined in basic_xml_oarchive + + // Anything not an attribute and not a name-value pair is an + // error and should be trapped here. + template + void save_override(T & t){ + // make it a name-value pair and pass it on. + // this permits this to be used even with data types which + // are not wrapped with the name + base::save_override(boost::serialization::make_nvp(NULL, t)); + } + template + void save_override(const boost::serialization::nvp< T > & t){ + // this is here to remove the "const" requirement. Since + // this class is to be used only for output, it's not required. + base::save_override(t); + } + // specific overrides for attributes - not name value pairs so we + // want to trap them before the above "fall through" + // since we don't want to see these in the output - make them no-ops. + void save_override(const boost::archive::object_id_type & t){} + void save_override(const boost::archive::object_reference_type & t){} + void save_override(const boost::archive::version_type & t){} + void save_override(const boost::archive::class_id_type & t){} + void save_override(const boost::archive::class_id_optional_type & t){} + void save_override(const boost::archive::class_id_reference_type & t){} + void save_override(const boost::archive::class_name_type & t){} + void save_override(const boost::archive::tracking_type & t){} +public: + log_archive(std::ostream & os, unsigned int flags = 0) : + boost::archive::xml_oarchive_impl( + os, + flags | boost::archive::no_header + ) + {} +}; + +#endif // LOG_ARCHIVE_HPP diff --git a/src/boost/libs/serialization/example/polymorphic_portable_binary_iarchive.cpp b/src/boost/libs/serialization/example/polymorphic_portable_binary_iarchive.cpp new file mode 100644 index 000000000..2e16262b5 --- /dev/null +++ b/src/boost/libs/serialization/example/polymorphic_portable_binary_iarchive.cpp @@ -0,0 +1,34 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_portable_binary_iarchive.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#define BOOST_ARCHIVE_SOURCE +#include "polymorphic_portable_binary_iarchive.hpp" + +// explicitly instantiate for this type of text stream +#include +#include +#include + +namespace boost { +namespace archive { + +template class binary_iarchive_impl< + polymorphic_portable_binary_iarchive, + std::istream::char_type, + std::istream::traits_type +>; +template class detail::archive_pointer_iserializer< + polymorphic_portable_binary_iarchive +> ; + +} // namespace archive +} // namespace boost diff --git a/src/boost/libs/serialization/example/polymorphic_portable_binary_iarchive.hpp b/src/boost/libs/serialization/example/polymorphic_portable_binary_iarchive.hpp new file mode 100644 index 000000000..34334c271 --- /dev/null +++ b/src/boost/libs/serialization/example/polymorphic_portable_binary_iarchive.hpp @@ -0,0 +1,35 @@ +#ifndef BOOST_ARCHIVE_POLYMORPHIC_PORTABLE_BINARY_IARCHIVE_HPP +#define BOOST_ARCHIVE_POLYMORPHIC_PORTABLE_BINARY_IARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_portable_binary_iarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include "portable_binary_iarchive.hpp" + +typedef boost::archive::detail::polymorphic_iarchive_dispatch< + portable_binary_iarchive +> polymorphic_portable_binary_iarchive; + +#include +#if BOOST_VERSION > 103401 + // required by export + BOOST_SERIALIZATION_REGISTER_ARCHIVE( + polymorphic_portable_binary_iarchive + ) +#endif + +#endif // BOOST_ARCHIVE_POLYMORPHIC_PORTABLE_BINARY_OARCHIVE_HPP + diff --git a/src/boost/libs/serialization/example/polymorphic_portable_binary_oarchive.cpp b/src/boost/libs/serialization/example/polymorphic_portable_binary_oarchive.cpp new file mode 100644 index 000000000..dce90c343 --- /dev/null +++ b/src/boost/libs/serialization/example/polymorphic_portable_binary_oarchive.cpp @@ -0,0 +1,35 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_portable_binary_oarchive.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#define BOOST_ARCHIVE_SOURCE +#include "polymorphic_portable_binary_oarchive.hpp" + +// explicitly instantiate for this type of text stream +#include +#include +#include + +namespace boost { +namespace archive { + +// explicitly instantiate for this type of binary stream +template class binary_oarchive_impl< + polymorphic_portable_binary_oarchive, + std::ostream::char_type, + std::ostream::traits_type +>; +template class detail::archive_pointer_oserializer< + polymorphic_portable_binary_oarchive +> ; + +} // namespace archive +} // namespace boost diff --git a/src/boost/libs/serialization/example/polymorphic_portable_binary_oarchive.hpp b/src/boost/libs/serialization/example/polymorphic_portable_binary_oarchive.hpp new file mode 100644 index 000000000..f63269a00 --- /dev/null +++ b/src/boost/libs/serialization/example/polymorphic_portable_binary_oarchive.hpp @@ -0,0 +1,34 @@ +#ifndef BOOST_ARCHIVE_POLYMORPHIC_PORTABLE_BINARY_OARCHIVE_HPP +#define BOOST_ARCHIVE_POLYMORPHIC_PORTABLE_BINARY_OARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_portable_binary_oarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include "portable_binary_oarchive.hpp" + +typedef boost::archive::detail::polymorphic_oarchive_dispatch< + portable_binary_oarchive + > polymorphic_portable_binary_oarchive; + +#include +#if BOOST_VERSION > 103401 + // required by export + BOOST_SERIALIZATION_REGISTER_ARCHIVE( + polymorphic_portable_binary_oarchive + ) +#endif + +#endif // BOOST_ARCHIVE_POLYMORPHIC_PORTABLE_BINARY_OARCHIVE_HPP diff --git a/src/boost/libs/serialization/example/portable_binary_archive.hpp b/src/boost/libs/serialization/example/portable_binary_archive.hpp new file mode 100644 index 000000000..132eba631 --- /dev/null +++ b/src/boost/libs/serialization/example/portable_binary_archive.hpp @@ -0,0 +1,46 @@ +#ifndef PORTABLE_BINARY_ARCHIVE_HPP +#define PORTABLE_BINARY_ARCHIVE_HPP + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include + +#include +#if CHAR_BIT != 8 +#error This code assumes an eight-bit byte. +#endif + +#include +#include + +enum portable_binary_archive_flags { + endian_big = 0x4000, + endian_little = 0x8000 +}; + +//#if ( endian_big <= boost::archive::flags_last ) +//#error archive flags conflict +//#endif + +inline void +reverse_bytes(char size, char *address){ + char * first = address; + char * last = first + size - 1; + for(;first < last;++first, --last){ + char x = *last; + *last = *first; + *first = x; + } +} + +#endif // PORTABLE_BINARY_ARCHIVE_HPP diff --git a/src/boost/libs/serialization/example/portable_binary_iarchive.cpp b/src/boost/libs/serialization/example/portable_binary_iarchive.cpp new file mode 100644 index 000000000..08f3f20ec --- /dev/null +++ b/src/boost/libs/serialization/example/portable_binary_iarchive.cpp @@ -0,0 +1,131 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// portable_binary_iarchive.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include + +#include +#include +#include + +#include "portable_binary_iarchive.hpp" + +void +portable_binary_iarchive::load_impl(boost::intmax_t & l, char maxsize){ + char size; + l = 0; + this->primitive_base_t::load(size); + + if(0 == size){ + return; + } + + bool negative = (size < 0); + if(negative) + size = -size; + + if(size > maxsize) + boost::serialization::throw_exception( + portable_binary_iarchive_exception() + ); + + char * cptr = reinterpret_cast(& l); + #if BOOST_ENDIAN_BIG_BYTE + cptr += (sizeof(boost::intmax_t) - size); + #endif + this->primitive_base_t::load_binary(cptr, size); + + #if BOOST_ENDIAN_BIG_BYTE + if(m_flags & endian_little) + #else + if(m_flags & endian_big) + #endif + reverse_bytes(size, cptr); + + if(negative) + l = -l; +} + +void +portable_binary_iarchive::load_override( + boost::archive::class_name_type & t +){ + std::string cn; + cn.reserve(BOOST_SERIALIZATION_MAX_KEY_SIZE); + load_override(cn); + if(cn.size() > (BOOST_SERIALIZATION_MAX_KEY_SIZE - 1)) + boost::serialization::throw_exception( + boost::archive::archive_exception( + boost::archive::archive_exception::invalid_class_name) + ); + std::memcpy(t, cn.data(), cn.size()); + // borland tweak + t.t[cn.size()] = '\0'; +} + +void +portable_binary_iarchive::init(unsigned int flags){ + if(0 == (flags & boost::archive::no_header)){ + // read signature in an archive version independent manner + std::string file_signature; + * this >> file_signature; + if(file_signature != boost::archive::BOOST_ARCHIVE_SIGNATURE()) + boost::serialization::throw_exception( + boost::archive::archive_exception( + boost::archive::archive_exception::invalid_signature + ) + ); + // make sure the version of the reading archive library can + // support the format of the archive being read + boost::archive::library_version_type input_library_version; + * this >> input_library_version; + + // extra little .t is to get around borland quirk + if(boost::archive::BOOST_ARCHIVE_VERSION() < input_library_version) + boost::serialization::throw_exception( + boost::archive::archive_exception( + boost::archive::archive_exception::unsupported_version + ) + ); + + #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) + this->set_library_version(input_library_version); + //#else + //#if ! BOOST_WORKAROUND(BOOST_MSVC, <= 1200) + //detail:: + //#endif + boost::archive::detail::basic_iarchive::set_library_version( + input_library_version + ); + #endif + } + unsigned char x; + load(x); + m_flags = x << CHAR_BIT; +} + +#include +#include + +namespace boost { +namespace archive { + +namespace detail { + template class archive_serializer_map; +} + +template class basic_binary_iprimitive< + portable_binary_iarchive, + std::istream::char_type, + std::istream::traits_type +> ; + +} // namespace archive +} // namespace boost diff --git a/src/boost/libs/serialization/example/portable_binary_iarchive.hpp b/src/boost/libs/serialization/example/portable_binary_iarchive.hpp new file mode 100644 index 000000000..de7f287fb --- /dev/null +++ b/src/boost/libs/serialization/example/portable_binary_iarchive.hpp @@ -0,0 +1,204 @@ +#ifndef PORTABLE_BINARY_IARCHIVE_HPP +#define PORTABLE_BINARY_IARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +#if defined(_MSC_VER) +#pragma warning( push ) +#pragma warning( disable : 4244 ) +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// portable_binary_iarchive.hpp + +// (C) Copyright 2002-7 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include +#include +#include +#include +#include + +#include "portable_binary_archive.hpp" + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// exception to be thrown if integer read from archive doesn't fit +// variable being loaded +class portable_binary_iarchive_exception : + public boost::archive::archive_exception +{ +public: + enum exception_code { + incompatible_integer_size + } m_exception_code ; + portable_binary_iarchive_exception(exception_code c = incompatible_integer_size ) : + boost::archive::archive_exception(boost::archive::archive_exception::other_exception), + m_exception_code(c) + {} + virtual const char *what( ) const throw( ) + { + const char *msg = "programmer error"; + switch(m_exception_code){ + case incompatible_integer_size: + msg = "integer cannot be represented"; + break; + default: + msg = boost::archive::archive_exception::what(); + assert(false); + break; + } + return msg; + } +}; + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// "Portable" input binary archive. It addresses integer size and endienness so +// that binary archives can be passed across systems. Note:floating point types +// not addressed here +class portable_binary_iarchive : + public boost::archive::basic_binary_iprimitive< + portable_binary_iarchive, + std::istream::char_type, + std::istream::traits_type + >, + public boost::archive::detail::common_iarchive< + portable_binary_iarchive + > + { + typedef boost::archive::basic_binary_iprimitive< + portable_binary_iarchive, + std::istream::char_type, + std::istream::traits_type + > primitive_base_t; + typedef boost::archive::detail::common_iarchive< + portable_binary_iarchive + > archive_base_t; +#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS +public: +#else + friend archive_base_t; + friend primitive_base_t; // since with override load below + friend class boost::archive::detail::interface_iarchive< + portable_binary_iarchive + >; + friend class boost::archive::load_access; +protected: +#endif + unsigned int m_flags; + void load_impl(boost::intmax_t & l, char maxsize); + + // default fall through for any types not specified here + template + void load(T & t){ + boost::intmax_t l; + load_impl(l, sizeof(T)); + // use cast to avoid compile time warning + //t = static_cast< T >(l); + t = T(l); + } + void load(boost::serialization::item_version_type & t){ + boost::intmax_t l; + load_impl(l, sizeof(boost::serialization::item_version_type)); + // use cast to avoid compile time warning + t = boost::serialization::item_version_type(l); + } + void load(boost::archive::version_type & t){ + boost::intmax_t l; + load_impl(l, sizeof(boost::archive::version_type)); + // use cast to avoid compile time warning + t = boost::archive::version_type(l); + } + void load(boost::archive::class_id_type & t){ + boost::intmax_t l; + load_impl(l, sizeof(boost::archive::class_id_type)); + // use cast to avoid compile time warning + t = boost::archive::class_id_type(static_cast(l)); + } + void load(std::string & t){ + this->primitive_base_t::load(t); + } + #ifndef BOOST_NO_STD_WSTRING + void load(std::wstring & t){ + this->primitive_base_t::load(t); + } + #endif + void load(float & t){ + this->primitive_base_t::load(t); + // floats not supported + //BOOST_STATIC_ASSERT(false); + } + void load(double & t){ + this->primitive_base_t::load(t); + // doubles not supported + //BOOST_STATIC_ASSERT(false); + } + void load(char & t){ + this->primitive_base_t::load(t); + } + void load(unsigned char & t){ + this->primitive_base_t::load(t); + } + typedef boost::archive::detail::common_iarchive + detail_common_iarchive; + template + void load_override(T & t){ + this->detail_common_iarchive::load_override(t); + } + void load_override(boost::archive::class_name_type & t); + // binary files don't include the optional information + void load_override(boost::archive::class_id_optional_type &){} + + void init(unsigned int flags); +public: + portable_binary_iarchive(std::istream & is, unsigned flags = 0) : + primitive_base_t( + * is.rdbuf(), + 0 != (flags & boost::archive::no_codecvt) + ), + archive_base_t(flags), + m_flags(0) + { + init(flags); + } + + portable_binary_iarchive( + std::basic_streambuf< + std::istream::char_type, + std::istream::traits_type + > & bsb, + unsigned int flags + ) : + primitive_base_t( + bsb, + 0 != (flags & boost::archive::no_codecvt) + ), + archive_base_t(flags), + m_flags(0) + { + init(flags); + } +}; + +// required by export in boost version > 1.34 +#ifdef BOOST_SERIALIZATION_REGISTER_ARCHIVE + BOOST_SERIALIZATION_REGISTER_ARCHIVE(portable_binary_iarchive) +#endif + +// required by export in boost <= 1.34 +#define BOOST_ARCHIVE_CUSTOM_IARCHIVE_TYPES portable_binary_iarchive + +#if defined(_MSC_VER) +#pragma warning( pop ) +#endif + +#endif // PORTABLE_BINARY_IARCHIVE_HPP diff --git a/src/boost/libs/serialization/example/portable_binary_oarchive.cpp b/src/boost/libs/serialization/example/portable_binary_oarchive.cpp new file mode 100644 index 000000000..a5d404965 --- /dev/null +++ b/src/boost/libs/serialization/example/portable_binary_oarchive.cpp @@ -0,0 +1,98 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// portable_binary_oarchive.cpp + +// (C) Copyright 2002-7 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include "portable_binary_oarchive.hpp" + +void +portable_binary_oarchive::save_impl( + const boost::intmax_t l, + const char maxsize +){ + char size = 0; + + if(l == 0){ + this->primitive_base_t::save(size); + return; + } + + boost::intmax_t ll; + bool negative = (l < 0); + if(negative) + ll = -l; + else + ll = l; + + do{ + ll >>= CHAR_BIT; + ++size; + }while(ll != 0); + + this->primitive_base_t::save( + static_cast(negative ? -size : size) + ); + + if(negative) + ll = -l; + else + ll = l; + char * cptr = reinterpret_cast(& ll); + #if BOOST_ENDIAN_BIG_BYTE + cptr += (sizeof(boost::intmax_t) - size); + if(m_flags & endian_little) + reverse_bytes(size, cptr); + #else + if(m_flags & endian_big) + reverse_bytes(size, cptr); + #endif + this->primitive_base_t::save_binary(cptr, size); +} + +void +portable_binary_oarchive::init(unsigned int flags) { + if(m_flags == (endian_big | endian_little)){ + boost::serialization::throw_exception( + portable_binary_oarchive_exception() + ); + } + if(0 == (flags & boost::archive::no_header)){ + // write signature in an archive version independent manner + const std::string file_signature( + boost::archive::BOOST_ARCHIVE_SIGNATURE() + ); + * this << file_signature; + // write library version + const boost::archive::library_version_type v( + boost::archive::BOOST_ARCHIVE_VERSION() + ); + * this << v; + } + save(static_cast(m_flags >> CHAR_BIT)); +} + +#include +#include + +namespace boost { +namespace archive { + +namespace detail { + template class archive_serializer_map; +} + +template class basic_binary_oprimitive< + portable_binary_oarchive, + std::ostream::char_type, + std::ostream::traits_type +> ; + +} // namespace archive +} // namespace boost diff --git a/src/boost/libs/serialization/example/portable_binary_oarchive.hpp b/src/boost/libs/serialization/example/portable_binary_oarchive.hpp new file mode 100644 index 000000000..5085fc3db --- /dev/null +++ b/src/boost/libs/serialization/example/portable_binary_oarchive.hpp @@ -0,0 +1,191 @@ +#ifndef PORTABLE_BINARY_OARCHIVE_HPP +#define PORTABLE_BINARY_OARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +#if defined(_MSC_VER) +#pragma warning( push ) +#pragma warning( disable : 4244 ) +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// portable_binary_oarchive.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include +#include +#include +#include + +#include "portable_binary_archive.hpp" + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// exception to be thrown if integer read from archive doesn't fit +// variable being loaded +class portable_binary_oarchive_exception : + public boost::archive::archive_exception +{ +public: + typedef enum { + invalid_flags + } exception_code; + portable_binary_oarchive_exception(exception_code c = invalid_flags ) + {} + virtual const char *what( ) const throw( ) + { + const char *msg = "programmer error"; + switch(code){ + case invalid_flags: + msg = "cannot be both big and little endian"; + default: + boost::archive::archive_exception::what(); + } + return msg; + } +}; + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// "Portable" output binary archive. This is a variation of the native binary +// archive. it addresses integer size and endienness so that binary archives can +// be passed across systems. Note:floating point types not addressed here + +class portable_binary_oarchive : + public boost::archive::basic_binary_oprimitive< + portable_binary_oarchive, + std::ostream::char_type, + std::ostream::traits_type + >, + public boost::archive::detail::common_oarchive< + portable_binary_oarchive + > +{ + typedef boost::archive::basic_binary_oprimitive< + portable_binary_oarchive, + std::ostream::char_type, + std::ostream::traits_type + > primitive_base_t; + typedef boost::archive::detail::common_oarchive< + portable_binary_oarchive + > archive_base_t; +#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS +public: +#else + friend archive_base_t; + friend primitive_base_t; // since with override save below + friend class boost::archive::detail::interface_oarchive< + portable_binary_oarchive + >; + friend class boost::archive::save_access; +protected: +#endif + unsigned int m_flags; + void save_impl(const boost::intmax_t l, const char maxsize); + // add base class to the places considered when matching + // save function to a specific set of arguments. Note, this didn't + // work on my MSVC 7.0 system so we use the sure-fire method below + // using archive_base_t::save; + + // default fall through for any types not specified here + template + void save(const T & t){ + save_impl(t, sizeof(T)); + } + void save(const std::string & t){ + this->primitive_base_t::save(t); + } + #ifndef BOOST_NO_STD_WSTRING + void save(const std::wstring & t){ + this->primitive_base_t::save(t); + } + #endif + void save(const float & t){ + this->primitive_base_t::save(t); + // floats not supported + //BOOST_STATIC_ASSERT(false); + } + void save(const double & t){ + this->primitive_base_t::save(t); + // doubles not supported + //BOOST_STATIC_ASSERT(false); + } + void save(const char & t){ + this->primitive_base_t::save(t); + } + void save(const unsigned char & t){ + this->primitive_base_t::save(t); + } + + // default processing - kick back to base class. Note the + // extra stuff to get it passed borland compilers + typedef boost::archive::detail::common_oarchive + detail_common_oarchive; + template + void save_override(T & t){ + this->detail_common_oarchive::save_override(t); + } + // explicitly convert to char * to avoid compile ambiguities + void save_override(const boost::archive::class_name_type & t){ + const std::string s(t); + * this << s; + } + // binary files don't include the optional information + void save_override( + const boost::archive::class_id_optional_type & /* t */ + ){} + + void init(unsigned int flags); +public: + portable_binary_oarchive(std::ostream & os, unsigned flags = 0) : + primitive_base_t( + * os.rdbuf(), + 0 != (flags & boost::archive::no_codecvt) + ), + archive_base_t(flags), + m_flags(flags & (endian_big | endian_little)) + { + init(flags); + } + + portable_binary_oarchive( + std::basic_streambuf< + std::ostream::char_type, + std::ostream::traits_type + > & bsb, + unsigned int flags + ) : + primitive_base_t( + bsb, + 0 != (flags & boost::archive::no_codecvt) + ), + archive_base_t(flags), + m_flags(0) + { + init(flags); + } +}; + + +// required by export in boost version > 1.34 +#ifdef BOOST_SERIALIZATION_REGISTER_ARCHIVE + BOOST_SERIALIZATION_REGISTER_ARCHIVE(portable_binary_oarchive) +#endif + +// required by export in boost <= 1.34 +#define BOOST_ARCHIVE_CUSTOM_OARCHIVE_TYPES portable_binary_oarchive + +#if defined(_MSC_VER) +#pragma warning( pop ) +#endif + +#endif // PORTABLE_BINARY_OARCHIVE_HPP diff --git a/src/boost/libs/serialization/example/simple_log_archive.hpp b/src/boost/libs/serialization/example/simple_log_archive.hpp new file mode 100644 index 000000000..44f6d73dd --- /dev/null +++ b/src/boost/libs/serialization/example/simple_log_archive.hpp @@ -0,0 +1,167 @@ +#ifndef BOOST_SIMPLE_LOG_ARCHIVE_HPP +#define BOOST_SIMPLE_LOG_ARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// simple_log_archive.hpp + +// (C) Copyright 2010 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include // std::size_t + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} // namespace std +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +///////////////////////////////////////////////////////////////////////// +// log data to an output stream. This illustrates a simpler implemenation +// of text output which is useful for getting a formatted display of +// any serializable class. Intended to be useful as a debugging aid. +class simple_log_archive { + std::ostream & m_os; + unsigned int m_depth; + + template + struct save_enum_type { + template + static void invoke(Archive &ar, const T &t){ + ar.m_os << static_cast(t); + } + }; + template + struct save_primitive { + template + static void invoke(Archive & ar, const T & t){ + ar.m_os << t; + } + }; + template + struct save_only { + template + static void invoke(Archive & ar, const T & t){ + // make sure call is routed through the highest interface that might + // be specialized by the user. + boost::serialization::serialize_adl( + ar, + const_cast(t), + ::boost::serialization::version< T >::value + ); + } + }; + template + void save(const T &t){ + typedef + BOOST_DEDUCED_TYPENAME boost::mpl::eval_if, + boost::mpl::identity >, + //else + BOOST_DEDUCED_TYPENAME boost::mpl::eval_if< + // if its primitive + boost::mpl::equal_to< + boost::serialization::implementation_level< T >, + boost::mpl::int_ + >, + boost::mpl::identity >, + // else + boost::mpl::identity > + > >::type typex; + typex::invoke(*this, t); + } + #ifndef BOOST_NO_STD_WSTRING + void save(const std::wstring &ws){ + m_os << "wide string types not suported in log archive"; + } + #endif + +public: + /////////////////////////////////////////////////// + // Implement requirements for archive concept + + typedef boost::mpl::bool_ is_loading; + typedef boost::mpl::bool_ is_saving; + + // this can be a no-op since we ignore pointer polymorphism + template + void register_type(const T * = NULL){} + + unsigned int get_library_version(){ + return 0; + } + + void + save_binary(const void *address, std::size_t count){ + m_os << "save_binary not implemented"; + } + + // the << operators + template + simple_log_archive & operator<<(T const & t){ + m_os << ' '; + save(t); + return * this; + } + template + simple_log_archive & operator<<(T * const t){ + m_os << " ->"; + if(NULL == t) + m_os << " null"; + else + *this << * t; + return * this; + } + template + simple_log_archive & operator<<(const T (&t)[N]){ + return *this << boost::serialization::make_array( + static_cast(&t[0]), + N + ); + } + template + simple_log_archive & operator<<(const boost::serialization::nvp< T > & t){ + m_os << '\n'; // start line with each named object + // indent according to object depth + for(unsigned int i = 0; i < m_depth; ++i) + m_os << ' '; + ++m_depth; + m_os << t.name(); // output the name of the object + * this << t.const_value(); + --m_depth; + return * this; + } + + // the & operator + template + simple_log_archive & operator&(const T & t){ + return * this << t; + } + /////////////////////////////////////////////// + + simple_log_archive(std::ostream & os) : + m_os(os), + m_depth(0) + {} +}; + +#endif // BOOST_SIMPLE_LOG_ARCHIVE_HPP diff --git a/src/boost/libs/serialization/index.html b/src/boost/libs/serialization/index.html new file mode 100644 index 000000000..ad01a7c51 --- /dev/null +++ b/src/boost/libs/serialization/index.html @@ -0,0 +1,15 @@ + + + + + + +Automatic redirection failed, please go to +doc/index.html. + + \ No newline at end of file diff --git a/src/boost/libs/serialization/meta/libraries.json b/src/boost/libs/serialization/meta/libraries.json new file mode 100644 index 000000000..55d777109 --- /dev/null +++ b/src/boost/libs/serialization/meta/libraries.json @@ -0,0 +1,14 @@ +{ + "key": "serialization", + "name": "Serialization", + "authors": [ + "Robert Ramey" + ], + "description": "Serialization for persistence and marshalling.", + "category": [ + "IO" + ], + "maintainers": [ + "Robert Ramey " + ] +} diff --git a/src/boost/libs/serialization/performance/Jamfile.v2 b/src/boost/libs/serialization/performance/Jamfile.v2 new file mode 100644 index 000000000..5ec2a2968 --- /dev/null +++ b/src/boost/libs/serialization/performance/Jamfile.v2 @@ -0,0 +1,48 @@ +# Boost serialization Library performance test Jamfile + +# (C) Copyright Robert Ramey 2002-2004. +# Use, modification, and distribution are subject to the +# Boost Software License, Version 1.0. (See accompanying file +# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +# + +project libs/serialization/performance + : default-build release + : id serialization_performance + ; + +# import rules from the boost serialization test +# import ../util/test : test-bsl-run-no-lib ; +import ../util/test : + run-template + run-invoke + run-winvoke + test-bsl-run-no-lib + test-bsl-run + test-bsl-run_archive + test-bsl-run_files + test-bsl-run_polymorphic_archive +; + +BOOST_ARCHIVE_LIST = [ modules.peek : BOOST_ARCHIVE_LIST ] ; + +test-suite "performance" : + [ test-bsl-run_files peformance_array : ../test/A ] +# [ test-bsl-run_files performance_binary ] +# [ test-bsl-run_files performance_polymorphic ] +# [ test-bsl-run_files performance_vector ] +# [ test-bsl-run_files performance_no_rtti ] +# [ test-bsl-run_files performance_simple_class ] +# [ test-bsl-run_polymorphic_archive performance_polymorphic : ../test/test_polymorphic_A ] + + [ test-bsl-run-no-lib performance_iterators ] + [ test-bsl-run-no-lib performance_iterators_base64 ] +# [ test-bsl-run-no-lib performance_utf8_codecvt +# : ../src/utf8_codecvt_facet +# : # ../../config/test/all//BOOST_NO_STD_WSTREAMBUF +# ] +# [ test-bsl-run-no-lib performance_codecvt_null +# : ../src/codecvt_null +# : # ../../config/test/all//BOOST_NO_STD_WSTREAMBUF +# ] +; diff --git a/src/boost/libs/serialization/performance/binary_archive.hpp b/src/boost/libs/serialization/performance/binary_archive.hpp new file mode 100644 index 000000000..3569bcf36 --- /dev/null +++ b/src/boost/libs/serialization/performance/binary_archive.hpp @@ -0,0 +1,22 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +// binary_archive +#include +typedef boost::archive::binary_oarchive test_oarchive; +typedef std::ofstream test_ostream; +#include +typedef boost::archive::binary_iarchive test_iarchive; +typedef std::ifstream test_istream; +#define TEST_STREAM_FLAGS std::ios::binary + diff --git a/src/boost/libs/serialization/performance/binary_warchive.hpp b/src/boost/libs/serialization/performance/binary_warchive.hpp new file mode 100644 index 000000000..929f3a37d --- /dev/null +++ b/src/boost/libs/serialization/performance/binary_warchive.hpp @@ -0,0 +1,14 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +// binary_warchive +#include +typedef boost::archive::binary_woarchive test_oarchive; +typedef std::wofstream test_ostream; +#include +typedef boost::archive::binary_wiarchive test_iarchive; +typedef std::wifstream test_istream; +#define TEST_STREAM_FLAGS std::wios::binary diff --git a/src/boost/libs/serialization/performance/peformance_array.cpp b/src/boost/libs/serialization/performance/peformance_array.cpp new file mode 100644 index 000000000..401590134 --- /dev/null +++ b/src/boost/libs/serialization/performance/peformance_array.cpp @@ -0,0 +1,118 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_array.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "../test/test_tools.hpp" + +#include +//#include +// the following fails with (only!) gcc 3.4 +// #include BOOST_PP_STRINGIZE(BOOST_PP_CAT(../test/,BOOST_ARCHIVE_TEST)) +// just copy over the files from the test directory +#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST) + +#include +#include + +#include +#include "../test/A.hpp" +#include "../test/A.ipp" + +struct array_equal_to //: public std::binary_function +{ +template + bool operator()(const T & _Left, const U & _Right) const + { + // consider alignment + int count_left = sizeof(_Left) / ( + static_cast(static_cast(&_Left[1])) + - static_cast(static_cast(&_Left[0])) + ); + int count_right = sizeof(_Right) / ( + static_cast(static_cast(&_Right[1])) + - static_cast(static_cast(&_Right[0])) + ); + if(count_right != count_left) + return false; + while(count_left-- > 0){ + if(_Left[count_left] == _Right[count_left]) + continue; + return false; + } + return true; + } +}; + +template +int test_array(T) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + // test array of objects + const T a_array[10]={T(),T(),T(),T(),T(),T(),T(),T(),T(),T()}; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("a_array", a_array); + } + { + T a_array1[10]; + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("a_array", a_array1); + + array_equal_to/**/ Compare; + BOOST_CHECK(Compare(a_array, a_array1)); + } + { + T a_array1[9]; + test_istream is(testfile, TEST_STREAM_FLAGS); + BOOST_TRY { + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + bool exception_invoked = false; + BOOST_TRY { + ia >> boost::serialization::make_nvp("a_array", a_array1); + } + BOOST_CATCH (boost::archive::archive_exception ae){ + BOOST_CHECK( + boost::archive::archive_exception::array_size_too_short + == ae.code + ); + exception_invoked = true; + } + BOOST_CATCH_END + BOOST_CHECK(exception_invoked); + } + BOOST_CATCH (boost::archive::archive_exception ae){} + BOOST_CATCH_END + } + std::remove(testfile); + return EXIT_SUCCESS; +} + +int test_main( int /* argc */, char* /* argv */[] ) +{ + int res = test_array(A()); + // test an int array for which optimized versions should be available + if (res == EXIT_SUCCESS) + res = test_array(0); + return res; +} + +// EOF diff --git a/src/boost/libs/serialization/performance/performance_binary.cpp b/src/boost/libs/serialization/performance/performance_binary.cpp new file mode 100644 index 000000000..7c817b206 --- /dev/null +++ b/src/boost/libs/serialization/performance/performance_binary.cpp @@ -0,0 +1,96 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_simple_class.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include + +#include // for rand() +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::rand; + using ::remove; +} +#endif + +#include "../test/test_tools.hpp" +#include +// #include +// the following fails with (only!) gcc 3.4 +// #include BOOST_PP_STRINGIZE(BOOST_PP_CAT(../test/,BOOST_ARCHIVE_TEST)) +// just copy over the files from the test directory +#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST) + +#include +#include + +class A { + friend class boost::serialization::access; + char data[150]; + // note: from an aesthetic perspective, I would much prefer to have this + // defined out of line. Unfortunately, this trips a bug in the VC 6.0 + // compiler. So hold our nose and put it her to permit running of tests. + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + ar & boost::serialization::make_nvp( + "data", + boost::serialization::make_binary_object(data, sizeof(data)) + ); + } + +public: + A(); + bool operator==(const A & rhs) const; +}; + +A::A(){ + int i = sizeof(data); + while(i-- > 0) + data[i] = 0xff & std::rand(); +} + +bool A::operator==(const A & rhs) const { + int i = sizeof(data); + while(i-- > 0) + if(data[i] != rhs.data[i]) + return false; + return true; +} + +int test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + const A a; + A a1; + const int i = 12345; + int i1 = 34790; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << BOOST_SERIALIZATION_NVP(a); + // note: add a little bit on the end of the archive to detect + // failure of text mode binary. + oa << BOOST_SERIALIZATION_NVP(i); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> BOOST_SERIALIZATION_NVP(a1); + ia >> BOOST_SERIALIZATION_NVP(i1); + } + BOOST_CHECK(i == i1); + BOOST_CHECK(a == a1); + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/performance/performance_codecvt_null.cpp b/src/boost/libs/serialization/performance/performance_codecvt_null.cpp new file mode 100644 index 000000000..70dd573ee --- /dev/null +++ b/src/boost/libs/serialization/performance/performance_codecvt_null.cpp @@ -0,0 +1,136 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_codecvt_null.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution. Note: compilation with compilers +// which use wchar_t as 2 byte objects will emit warnings. These should be +// ignored. + +#include +#include +#include +#include +#include +#include +#include + +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" + +#include +#include +#include +#include + +template +struct test_data +{ + static wchar_t wchar_encoding[]; +}; + +template<> +wchar_t test_data<2>::wchar_encoding[] = { + 0x0001, + 0x007f, + 0x0080, + 0x07ff, + 0x0800, + 0x7fff +}; + +template<> +wchar_t test_data<4>::wchar_encoding[] = { + 0x00000001, + 0x0000007f, + 0x00000080, + 0x000007ff, + 0x00000800, + 0x0000ffff, + 0x00010000, + 0x0010ffff, + 0x001fffff, + 0x00200000, + 0x03ffffff, + 0x04000000, + 0x7fffffff +}; + +#include + +int test_main( int /* argc */, char* /* argv */[] ) { + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + std::locale old_loc; + std::locale * null_locale = + boost::archive::add_facet(old_loc, new boost::archive::codecvt_null); + + typedef test_data td; + { + std::wofstream ofs; + ofs.imbue(*null_locale); + ofs.open(testfile, std::ios::binary); + std::copy( + td::wchar_encoding, + #if ! defined(__BORLANDC__) + // borland 5.60 complains about this + td::wchar_encoding + sizeof(td::wchar_encoding)/sizeof(wchar_t), + #else + // so use this instead + td::wchar_encoding + 6, + #endif + boost::archive::iterators::ostream_iterator(ofs) + ); + } + bool ok = false; + { + std::wifstream ifs; + ifs.imbue(*null_locale); + ifs.open(testfile, std::ios::binary); + ok = std::equal( + td::wchar_encoding, + #if ! defined(__BORLANDC__) + // borland 5.60 complains about this + td::wchar_encoding + sizeof(td::wchar_encoding)/sizeof(wchar_t), + #else + // so use this instead + td::wchar_encoding + 6, + #endif + boost::archive::iterators::istream_iterator(ifs) + ); + } + + BOOST_CHECK(ok); + { + std::wofstream ofs("testfile2"); + ofs.imbue(*null_locale); + int i = 10; + ofs << i; + ofs.close(); + + std::wifstream ifs("testfile2"); + ifs.imbue(*null_locale); + int i2; + ifs >> i2; + std::cout << "i=" << i << std::endl; + std::cout << "i2=" << i2 << std::endl; + BOOST_CHECK(i == i2); + ifs.close(); + } + + delete null_locale; + std::remove(testfile); + return EXIT_SUCCESS; +} + diff --git a/src/boost/libs/serialization/performance/performance_iterators.cpp b/src/boost/libs/serialization/performance/performance_iterators.cpp new file mode 100644 index 000000000..869b6eda5 --- /dev/null +++ b/src/boost/libs/serialization/performance/performance_iterators.cpp @@ -0,0 +1,213 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_iterators.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include // for rand +#include +#include // used to test stream iterators + +#include +#ifdef BOOST_NO_STDC_NAMESPACE +namespace std{ + using ::rand; +} +#endif + +#include +#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) +#include +#endif + +#ifndef BOOST_NO_CWCHAR +#include +#include +#endif +#include +#include +#include +#include +#include + +#include "../test/test_tools.hpp" + +#ifndef BOOST_NO_CWCHAR + +void test_wchar_from_mb(const wchar_t *la, const char * a, const unsigned int size){ + typedef boost::archive::iterators::wchar_from_mb translator; + BOOST_CHECK(( + std::equal( + translator(BOOST_MAKE_PFTO_WRAPPER(a)), + translator(BOOST_MAKE_PFTO_WRAPPER(a + size)), + la + ) + )); +} + +void test_mb_from_wchar(const char * a, const wchar_t *la, const unsigned int size){ + typedef boost::archive::iterators::mb_from_wchar translator; + BOOST_CHECK( + std::equal( + translator(BOOST_MAKE_PFTO_WRAPPER(la)), + translator(BOOST_MAKE_PFTO_WRAPPER(la + size)), + a + ) + ); +} + +#endif + +template +void test_xml_escape( + const CharType * xml_escaped, + const CharType * xml, + unsigned int size +){ + typedef boost::archive::iterators::xml_escape translator; + + BOOST_CHECK( + std::equal( + translator(BOOST_MAKE_PFTO_WRAPPER(xml)), + translator(BOOST_MAKE_PFTO_WRAPPER(xml + size)), + xml_escaped + ) + ); +} + +template +void test_xml_unescape( + const CharType * xml, + const CharType * xml_escaped, + unsigned int size +){ + + // test xml_unescape + typedef boost::archive::iterators::xml_unescape translator; + + BOOST_CHECK( + std::equal( + translator(BOOST_MAKE_PFTO_WRAPPER(xml_escaped)), + translator(BOOST_MAKE_PFTO_WRAPPER(xml_escaped + size)), + xml + ) + ); +} + +template +void test_transform_width(unsigned int size){ + // test transform_width + char rawdata[8]; + + char * rptr; + for(rptr = rawdata + 6; rptr-- > rawdata;) + *rptr = std::rand(); + + // convert 8 to 6 bit characters + typedef boost::archive::iterators::transform_width< + char *, BitsOut, BitsIn + > translator1; + + std::vector v6; + + std::copy( + translator1(BOOST_MAKE_PFTO_WRAPPER(static_cast(rawdata))), + translator1(BOOST_MAKE_PFTO_WRAPPER(rawdata + size)), + std::back_inserter(v6) + ); + + // check to see we got the expected # of characters out + if(0 == size) + BOOST_CHECK(v6.size() == 0); + else + BOOST_CHECK(v6.size() == (size * BitsIn - 1 ) / BitsOut + 1); + + typedef boost::archive::iterators::transform_width< + std::vector::iterator, BitsIn, BitsOut + > translator2; + + BOOST_CHECK( + std::equal( + rawdata, + rawdata + size, + translator2(BOOST_MAKE_PFTO_WRAPPER(v6.begin())) + ) + ); + +} + +template +void test_stream_iterators( + const CharType * test_data, + unsigned int size +){ + std::basic_stringstream ss; + boost::archive::iterators::ostream_iterator osi = + boost::archive::iterators::ostream_iterator(ss); + std::copy(test_data, test_data + size, osi); + + BOOST_CHECK(size == ss.str().size()); + + boost::archive::iterators::istream_iterator isi = + boost::archive::iterators::istream_iterator(ss); + BOOST_CHECK(std::equal(test_data, test_data + size,isi)); +} + +int +test_main(int /* argc */, char* /* argv */ [] ) +{ + const char xml[] = "<+>+&+\"+'"; + const char xml_escaped[] = "<+>+&+"+'"; + test_xml_escape( + xml_escaped, + xml, + sizeof(xml) / sizeof(char) - 1 + ); + test_xml_unescape( + xml, + xml_escaped, + sizeof(xml_escaped) / sizeof(char) - 1 + ); + + const char a[] = "abcdefghijklmnopqrstuvwxyz"; + + #ifndef BOOST_NO_CWCHAR + const wchar_t wxml[] = L"<+>+&+\"+'"; + const wchar_t wxml_escaped[] = L"<+>+&+"+'"; + test_xml_escape( + wxml_escaped, + wxml, + sizeof(wxml) / sizeof(wchar_t) - 1 + ); + test_xml_unescape( + wxml, + wxml_escaped, + sizeof(wxml_escaped) / sizeof(wchar_t) - 1 + ); + + const wchar_t la[] = L"abcdefghijklmnopqrstuvwxyz"; + + test_wchar_from_mb(la, a, sizeof(a) / sizeof(char) - 1); + test_mb_from_wchar(a, la, sizeof(la) / sizeof(wchar_t) - 1); + + test_stream_iterators(la, sizeof(la)/sizeof(wchar_t) - 1); + #endif + + test_stream_iterators(a, sizeof(a) - 1); + + test_transform_width<6, 8>(0); + test_transform_width<6, 8>(1); + test_transform_width<6, 8>(2); + test_transform_width<6, 8>(3); + test_transform_width<6, 8>(4); + test_transform_width<6, 8>(5); + test_transform_width<6, 8>(6); + test_transform_width<6, 8>(7); + test_transform_width<6, 8>(8); + + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/performance/performance_iterators_base64.cpp b/src/boost/libs/serialization/performance/performance_iterators_base64.cpp new file mode 100644 index 000000000..662ea6cf7 --- /dev/null +++ b/src/boost/libs/serialization/performance/performance_iterators_base64.cpp @@ -0,0 +1,100 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_iterators.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#include + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#include +#include // size_t + +#include +#ifdef BOOST_NO_STDC_NAMESPACE +namespace std{ + using ::rand; + using ::size_t; +} +#endif + +#include + +#include +#include +#include +#include +#include + +#include "../test/test_tools.hpp" + +#include + +template +void test_base64(){ + CharType rawdata[150]; + std::size_t size = sizeof(rawdata) / sizeof(CharType); + CharType * rptr; + for(rptr = rawdata + size; rptr-- > rawdata;) + *rptr = std::rand(); + + // convert to base64 + typedef std::list text_base64_type; + text_base64_type text_base64; + + typedef + boost::archive::iterators::insert_linebreaks< + boost::archive::iterators::base64_from_binary< + boost::archive::iterators::transform_width< + CharType * + ,6 + ,sizeof(CharType) * 8 + > + > + ,72 + > + translate_out; + + std::copy( + translate_out(BOOST_MAKE_PFTO_WRAPPER(static_cast(rawdata))), + translate_out(BOOST_MAKE_PFTO_WRAPPER(rawdata + size)), + std::back_inserter(text_base64) + ); + + // convert from base64 to binary and compare with the original + typedef + boost::archive::iterators::transform_width< + boost::archive::iterators::binary_from_base64< + boost::archive::iterators::remove_whitespace< + BOOST_DEDUCED_TYPENAME text_base64_type::iterator + > + >, + sizeof(CharType) * 8, + 6 + > translate_in; + + BOOST_CHECK( + std::equal( + rawdata, + rawdata + size, + translate_in(BOOST_MAKE_PFTO_WRAPPER(text_base64.begin())) + ) + ); + +} + +int +test_main( int argc, char* argv[] ) +{ + test_base64(); + #ifndef BOOST_NO_CWCHAR + test_base64(); + #endif + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/performance/performance_no_rtti.cpp b/src/boost/libs/serialization/performance/performance_no_rtti.cpp new file mode 100644 index 000000000..bebafe783 --- /dev/null +++ b/src/boost/libs/serialization/performance/performance_no_rtti.cpp @@ -0,0 +1,222 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_no_rtti.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// note: this program tests the inter-operability of different +// extended typeinfo systems. In this example, one class is +// identified using the default RTTI while the other uses a custom +// system based on the export key. +// +// As this program uses RTTI for one of the types, the test will fail +// on a system for which RTTI is not enabled or not existent. + +#include + +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include +#include + +#include +#include "../test/test_tools.hpp" +#include +// #include +// the following fails with (only!) gcc 3.4 +// #include BOOST_PP_STRINGIZE(BOOST_PP_CAT(../test/,BOOST_ARCHIVE_TEST)) +// just copy over the files from the test directory +#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST) + +#include +#include +#include +#include +#include + +class polymorphic_base +{ + friend class boost::serialization::access; + template + void serialize(Archive & /* ar */, const unsigned int /* file_version */){ + } +public: + virtual const char * get_key() const = 0; + virtual ~polymorphic_base(){}; +}; + +BOOST_IS_ABSTRACT(polymorphic_base) +BOOST_CLASS_TYPE_INFO( + polymorphic_base, + extended_type_info_no_rtti +) +// note: types which use ...no_rtti MUST be exported +BOOST_CLASS_EXPORT(polymorphic_base) + +class polymorphic_derived1 : public polymorphic_base +{ + friend class boost::serialization::access; + template + void serialize(Archive &ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(polymorphic_base); + } +public: + virtual const char * get_key() const ; +}; + +BOOST_CLASS_TYPE_INFO( + polymorphic_derived1, + extended_type_info_no_rtti +) +BOOST_CLASS_EXPORT(polymorphic_derived1) + +const char * polymorphic_derived1::get_key() const { + const boost::serialization::extended_type_info *eti + = boost::serialization::type_info_implementation + ::type::get_instance(); + return eti->get_key(); +} + +class polymorphic_derived2 : public polymorphic_base +{ + friend class boost::serialization::access; + template + void serialize(Archive &ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(polymorphic_base); + } +public: + virtual const char * get_key() const ; +}; + +// note the mixing of type_info systems is supported. +BOOST_CLASS_TYPE_INFO( + polymorphic_derived2, + boost::serialization::extended_type_info_typeid +) + +BOOST_CLASS_EXPORT(polymorphic_derived2) + +const char * polymorphic_derived2::get_key() const { + // use the exported key as the identifier + const boost::serialization::extended_type_info *eti + = boost::serialization::type_info_implementation + ::type::get_instance(); + return eti->get_key(); +} + +// save derived polymorphic class +void save_derived(const char *testfile) +{ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + + polymorphic_derived1 *rd1 = new polymorphic_derived1; + polymorphic_derived2 *rd2 = new polymorphic_derived2; + + oa << BOOST_SERIALIZATION_NVP(rd1); + oa << BOOST_SERIALIZATION_NVP(rd2); + + // the above opereration registers the derived classes as a side + // effect. Hence, instances can now be correctly serialized through + // a base class pointer. + polymorphic_base *rb1 = rd1; + polymorphic_base *rb2 = rd2; + oa << BOOST_SERIALIZATION_NVP(rb1); + oa << BOOST_SERIALIZATION_NVP(rb2); + + delete rd1; + delete rd2; +} + +// save derived polymorphic class +void load_derived(const char *testfile) +{ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + + polymorphic_derived1 *rd1 = NULL; + polymorphic_derived2 *rd2 = NULL; + + ia >> BOOST_SERIALIZATION_NVP(rd1); + + BOOST_CHECK_MESSAGE( + boost::serialization::type_info_implementation + ::type::get_instance() + == boost::serialization::type_info_implementation + ::type::get_derived_extended_type_info(*rd1), + "restored pointer d1 not of correct type" + ); + + ia >> BOOST_SERIALIZATION_NVP(rd2); + + BOOST_CHECK_MESSAGE( + boost::serialization::type_info_implementation + ::type::get_instance() + == boost::serialization::type_info_implementation + ::type::get_derived_extended_type_info(*rd2), + "restored pointer d2 not of correct type" + ); + + polymorphic_base *rb1 = NULL; + polymorphic_base *rb2 = NULL; + + // the above opereration registers the derived classes as a side + // effect. Hence, instances can now be correctly serialized through + // a base class pointer. + ia >> BOOST_SERIALIZATION_NVP(rb1); + + BOOST_CHECK_MESSAGE( + rb1 == dynamic_cast(rd1), + "serialized pointers not correctly restored" + ); + + BOOST_CHECK_MESSAGE( + boost::serialization::type_info_implementation + ::type::get_instance() + == boost::serialization::type_info_implementation + ::type::get_derived_extended_type_info(*rb1), + "restored pointer b1 not of correct type" + ); + + ia >> BOOST_SERIALIZATION_NVP(rb2); + + BOOST_CHECK_MESSAGE( + rb2 == dynamic_cast(rd2), + "serialized pointers not correctly restored" + ); + + BOOST_CHECK_MESSAGE( + boost::serialization::type_info_implementation + ::type::get_instance() + == boost::serialization::type_info_implementation + ::type::get_derived_extended_type_info(*rb2), + "restored pointer b2 not of correct type" + ); + + delete rb1; + delete rb2; +} + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + + BOOST_REQUIRE(NULL != testfile); + + save_derived(testfile); + load_derived(testfile); + + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/performance/performance_polymorphic.cpp b/src/boost/libs/serialization/performance/performance_polymorphic.cpp new file mode 100644 index 000000000..50bc21be2 --- /dev/null +++ b/src/boost/libs/serialization/performance/performance_polymorphic.cpp @@ -0,0 +1,104 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_polymorphic.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include + +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "../test/test_tools.hpp" + +#if !defined(BOOST_ARCHIVE_TEST) +#define BOOST_ARCHIVE_TEST polymorphic_text_archive.hpp +#endif + +// the following is to ensure that when one of the libraries changes +// BJAM rebuilds and relinks the test. +/* +#include "polymorphic_text_archive.hpp" +#include "polymorphic_text_warchive.hpp" +#include "polymorphic_binary_archive.hpp" +#include "polymorphic_xml_archive.hpp" +#include "polymorphic_xml_warchive.hpp" +*/ + +#include +// #include +// the following fails with (only!) gcc 3.4 +// #include BOOST_PP_STRINGIZE(BOOST_PP_CAT(../test/,BOOST_ARCHIVE_TEST)) +// just copy over the files from the test directory +#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST) + +#include +#include + +#include +#include "../test/test_polymorphic_A.hpp" + +int test_main(int /* argc */, char * /* argv */ []) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + const data d; + data d1; + // test using using polymorphic interface + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa_implementation(os); + boost::archive::polymorphic_oarchive & oa_interface = oa_implementation; + oa_interface << BOOST_SERIALIZATION_NVP(d); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia_implementation(is); + boost::archive::polymorphic_iarchive & ia_interface = ia_implementation; + ia_interface >> BOOST_SERIALIZATION_NVP(d1); + } + BOOST_CHECK(d == d1); + std::remove(testfile); + + // test using using polymorphic implementation. + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa_implementation(os); + oa_implementation << BOOST_SERIALIZATION_NVP(d); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia_implementation(is); + ia_implementation >> BOOST_SERIALIZATION_NVP(d1); + } + BOOST_CHECK(d == d1); + std::remove(testfile); + + // test using using polymorphic implementation. + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + boost::archive::polymorphic_oarchive * oa_implementation + = new test_oarchive(os); + *oa_implementation << BOOST_SERIALIZATION_NVP(d); + delete oa_implementation; + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + boost::archive::polymorphic_iarchive * ia_implementation + = new test_iarchive(is); + *ia_implementation >> BOOST_SERIALIZATION_NVP(d1); + delete ia_implementation; + } + BOOST_CHECK(d == d1); + std::remove(testfile); + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/performance/performance_simple_class.cpp b/src/boost/libs/serialization/performance/performance_simple_class.cpp new file mode 100644 index 000000000..3f936078a --- /dev/null +++ b/src/boost/libs/serialization/performance/performance_simple_class.cpp @@ -0,0 +1,55 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_simple_class.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +// invoke header for a custom archive test. + +#include + +#include // remove +#include + +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "../test/test_tools.hpp" +#include +// #include +// the following fails with (only!) gcc 3.4 +// #include BOOST_PP_STRINGIZE(BOOST_PP_CAT(../test/,BOOST_ARCHIVE_TEST)) +// just copy over the files from the test directory +#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST) + +#include +#include "../test/A.hpp" + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + A a, a1; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("a", a); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("a", a1); + } + BOOST_CHECK_EQUAL(a, a1); + std::remove(testfile); + return (a == a1) ? EXIT_SUCCESS : EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/performance/performance_utf8_codecvt.cpp b/src/boost/libs/serialization/performance/performance_utf8_codecvt.cpp new file mode 100644 index 000000000..2562f4a71 --- /dev/null +++ b/src/boost/libs/serialization/performance/performance_utf8_codecvt.cpp @@ -0,0 +1,248 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_utf8_codecvt.cpp + +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include +#include +#include +#include +#include + +#include // size_t +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} // namespace std +#endif + +#include +#ifdef BOOST_NO_STDC_NAMESPACE +namespace std{ using ::wcslen; } +#endif + +#include "../test/test_tools.hpp" +#include +#include + +#include +#include + +template +struct test_data +{ + static unsigned char utf8_encoding[]; + static wchar_t wchar_encoding[]; +}; + +template<> +unsigned char test_data<2>::utf8_encoding[] = { + 0x01, + 0x7f, + 0xc2, 0x80, + 0xdf, 0xbf, + 0xe0, 0xa0, 0x80, + 0xe7, 0xbf, 0xbf +}; + +template<> +wchar_t test_data<2>::wchar_encoding[] = { + 0x0001, + 0x007f, + 0x0080, + 0x07ff, + 0x0800, + 0x7fff +}; + +template<> +unsigned char test_data<4>::utf8_encoding[] = { + 0x01, + 0x7f, + 0xc2, 0x80, + 0xdf, 0xbf, + 0xe0, 0xa0, 0x80, + 0xef, 0xbf, 0xbf, + 0xf0, 0x90, 0x80, 0x80, + 0xf4, 0x8f, 0xbf, 0xbf, + 0xf7, 0xbf, 0xbf, 0xbf, + 0xf8, 0x88, 0x80, 0x80, 0x80, + 0xfb, 0xbf, 0xbf, 0xbf, 0xbf, + 0xfc, 0x84, 0x80, 0x80, 0x80, 0x80, + 0xfd, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf +}; + +template<> +wchar_t test_data<4>::wchar_encoding[] = { + 0x00000001, + 0x0000007f, + 0x00000080, + 0x000007ff, + 0x00000800, + 0x0000ffff, + 0x00010000, + 0x0010ffff, + 0x001fffff, + 0x00200000, + 0x03ffffff, + 0x04000000, + 0x7fffffff +}; + +int +test_main(int /* argc */, char * /* argv */[]) { + std::locale old_loc; + std::locale * utf8_locale + = boost::archive::add_facet( + old_loc, + new boost::archive::detail::utf8_codecvt_facet + ); + + typedef char utf8_t; + typedef test_data td; + + // Send our test UTF-8 data to file + { + std::ofstream ofs; + ofs.open("test.dat", std::ios::binary); + std::copy( + td::utf8_encoding, + #if ! defined(__BORLANDC__) + // borland 5.60 complains about this + td::utf8_encoding + sizeof(td::utf8_encoding) / sizeof(unsigned char), + #else + // so use this instead + td::utf8_encoding + 12, + #endif + boost::archive::iterators::ostream_iterator(ofs) + ); + } + + // Read the test data back in, converting to UCS-4 on the way in + std::vector from_file; + { + std::wifstream ifs; + ifs.imbue(*utf8_locale); + ifs.open("test.dat"); + + wchar_t item = 0; + // note can't use normal vector from iterator constructor because + // dinkumware doesn't have it. + for(;;){ + item = ifs.get(); + if(item == WEOF) + break; + //ifs >> item; + //if(ifs.eof()) + // break; + from_file.push_back(item); + } + } + + // compare the data read back in with the orginal + #if ! defined(__BORLANDC__) + // borland 5.60 complains about this + BOOST_CHECK(from_file.size() == sizeof(td::wchar_encoding)/sizeof(wchar_t)); + #else + // so use this instead + BOOST_CHECK(from_file.size() == 6); + #endif + + BOOST_CHECK(std::equal(from_file.begin(), from_file.end(), td::wchar_encoding)); + + // Send the UCS4_data back out, converting to UTF-8 + { + std::wofstream ofs; + ofs.imbue(*utf8_locale); + ofs.open("test2.dat"); + std::copy( + from_file.begin(), + from_file.end(), + boost::archive::iterators::ostream_iterator(ofs) + ); + } + + // Make sure that both files are the same + { + typedef boost::archive::iterators::istream_iterator is_iter; + is_iter end_iter; + + std::ifstream ifs1("test.dat"); + is_iter it1(ifs1); + std::vector data1; + std::copy(it1, end_iter, std::back_inserter(data1)); + + std::ifstream ifs2("test2.dat"); + is_iter it2(ifs2); + std::vector data2; + std::copy(it2, end_iter, std::back_inserter(data2)); + + BOOST_CHECK(data1 == data2); + } + + // some libraries have trouble that only shows up with longer strings + + wchar_t * test3_data = L"\ + \ + \ + \ + \ + 1\ + 96953204\ + 177129195\ + 1\ + 5627\ + 23010\ + 7419\ +

16212

\ + 4086\ + 2749\ + -33\ + 124\ + 28\ + 32225\ + 17543\ + 0.84431422\ + 1.0170664757130923\ + tjbx\ + cuwjentqpkejp\ +
\ +
\ + "; + + // Send the UCS4_data back out, converting to UTF-8 + std::size_t l = std::wcslen(test3_data); + { + std::wofstream ofs; + ofs.imbue(*utf8_locale); + ofs.open("test3.dat"); + std::copy( + test3_data, + test3_data + l, + boost::archive::iterators::ostream_iterator(ofs) + ); + } + + // Make sure that both files are the same + { + std::wifstream ifs; + ifs.imbue(*utf8_locale); + ifs.open("test3.dat"); + BOOST_CHECK( + std::equal( + test3_data, + test3_data + l, + boost::archive::iterators::istream_iterator(ifs) + ) + ); + } + + delete utf8_locale; + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/performance/performance_vector.cpp b/src/boost/libs/serialization/performance/performance_vector.cpp new file mode 100644 index 000000000..f415c6ea2 --- /dev/null +++ b/src/boost/libs/serialization/performance/performance_vector.cpp @@ -0,0 +1,70 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_vector.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include + +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "../test/test_tools.hpp" +#include +// #include +// the following fails with (only!) gcc 3.4 +// #include BOOST_PP_STRINGIZE(BOOST_PP_CAT(../test/,BOOST_ARCHIVE_TEST)) +// just copy over the files from the test directory +#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST) +#include + +#include "../test/A.hpp" + +template +int test_vector(T) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + // test array of objects + std::vector avector; + avector.push_back(T()); + avector.push_back(T()); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("avector", avector); + } + std::vector avector1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("avector", avector1); + } + BOOST_CHECK(avector == avector1); + std::remove(testfile); + return EXIT_SUCCESS; +} + +int test_main( int /* argc */, char* /* argv */[] ) +{ + int res = test_vector(A()); + // test an int vector for which optimized versions should be available + if (res == EXIT_SUCCESS) + res = test_vector(0); + // test a bool vector + if (res == EXIT_SUCCESS) + res = test_vector(false); + return res; +} + +// EOF diff --git a/src/boost/libs/serialization/performance/polymorphic_array_binary_archive.hpp b/src/boost/libs/serialization/performance/polymorphic_array_binary_archive.hpp new file mode 100644 index 000000000..5097433aa --- /dev/null +++ b/src/boost/libs/serialization/performance/polymorphic_array_binary_archive.hpp @@ -0,0 +1,13 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +#include +typedef boost::archive::polymorphic_binary_oarchive test_oarchive; +typedef std::ofstream test_ostream; +#include +typedef boost::archive::polymorphic_binary_iarchive test_iarchive; +typedef std::ifstream test_istream; +#define TEST_STREAM_FLAGS std::ios::binary diff --git a/src/boost/libs/serialization/performance/polymorphic_binary_archive.hpp b/src/boost/libs/serialization/performance/polymorphic_binary_archive.hpp new file mode 100644 index 000000000..5097433aa --- /dev/null +++ b/src/boost/libs/serialization/performance/polymorphic_binary_archive.hpp @@ -0,0 +1,13 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +#include +typedef boost::archive::polymorphic_binary_oarchive test_oarchive; +typedef std::ofstream test_ostream; +#include +typedef boost::archive::polymorphic_binary_iarchive test_iarchive; +typedef std::ifstream test_istream; +#define TEST_STREAM_FLAGS std::ios::binary diff --git a/src/boost/libs/serialization/performance/polymorphic_text_archive.hpp b/src/boost/libs/serialization/performance/polymorphic_text_archive.hpp new file mode 100644 index 000000000..c8184b157 --- /dev/null +++ b/src/boost/libs/serialization/performance/polymorphic_text_archive.hpp @@ -0,0 +1,13 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +#include +typedef boost::archive::polymorphic_text_oarchive test_oarchive; +typedef std::ofstream test_ostream; +#include +typedef boost::archive::polymorphic_text_iarchive test_iarchive; +typedef std::ifstream test_istream; +#define TEST_STREAM_FLAGS (std::ios_base::openmode)0 diff --git a/src/boost/libs/serialization/performance/polymorphic_text_warchive.hpp b/src/boost/libs/serialization/performance/polymorphic_text_warchive.hpp new file mode 100644 index 000000000..4a5774c83 --- /dev/null +++ b/src/boost/libs/serialization/performance/polymorphic_text_warchive.hpp @@ -0,0 +1,18 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +#include +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else +#include +typedef boost::archive::polymorphic_text_woarchive test_oarchive; +typedef std::wofstream test_ostream; +#include +typedef boost::archive::polymorphic_text_wiarchive test_iarchive; +typedef std::wifstream test_istream; +#define TEST_STREAM_FLAGS (std::ios_base::openmode)0 +#endif diff --git a/src/boost/libs/serialization/performance/polymorphic_xml_archive.hpp b/src/boost/libs/serialization/performance/polymorphic_xml_archive.hpp new file mode 100644 index 000000000..849d1a02d --- /dev/null +++ b/src/boost/libs/serialization/performance/polymorphic_xml_archive.hpp @@ -0,0 +1,13 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +#include +typedef boost::archive::polymorphic_xml_oarchive test_oarchive; +typedef std::ofstream test_ostream; +#include +typedef boost::archive::polymorphic_xml_iarchive test_iarchive; +typedef std::ifstream test_istream; +#define TEST_STREAM_FLAGS (std::ios_base::openmode)0 diff --git a/src/boost/libs/serialization/performance/polymorphic_xml_warchive.hpp b/src/boost/libs/serialization/performance/polymorphic_xml_warchive.hpp new file mode 100644 index 000000000..1f5c5ff0a --- /dev/null +++ b/src/boost/libs/serialization/performance/polymorphic_xml_warchive.hpp @@ -0,0 +1,13 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +#include +typedef boost::archive::polymorphic_xml_woarchive test_oarchive; +typedef std::wofstream test_ostream; +#include +typedef boost::archive::polymorphic_xml_wiarchive test_iarchive; +typedef std::wifstream test_istream; +#define TEST_STREAM_FLAGS (std::ios_base::openmode)0 diff --git a/src/boost/libs/serialization/performance/portable_binary_archive.hpp b/src/boost/libs/serialization/performance/portable_binary_archive.hpp new file mode 100644 index 000000000..c1377c92e --- /dev/null +++ b/src/boost/libs/serialization/performance/portable_binary_archive.hpp @@ -0,0 +1,22 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history.// file includes for testing a custom archive. +// as an example this tests the portable binary archive + +// #include output archive header +#include "../example/portable_binary_oarchive.hpp" +// define output archive class to be used +typedef portable_binary_oarchive test_oarchive; +// and corresponding stream +typedef std::ofstream test_ostream; + +// repeat the above for correspondng input archive +#include "../example/portable_binary_iarchive.hpp" +typedef portable_binary_iarchive test_iarchive; +typedef std::ifstream test_istream; + +// and stream open flags +#define TEST_STREAM_FLAGS std::ios::binary diff --git a/src/boost/libs/serialization/performance/profile.sh b/src/boost/libs/serialization/performance/profile.sh new file mode 100755 index 000000000..95ae42022 --- /dev/null +++ b/src/boost/libs/serialization/performance/profile.sh @@ -0,0 +1,39 @@ +# build and run the tests leaving the executables in place + +# (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +# Use, modification and distribution is subject to the Boost Software +# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +# profile.sh --toolset=gcc preserve-test-targets=on variant=profile +if test $# -eq 0 +then + echo "Usage: $0 " + echo "Typical bjam arguements are:" + echo " toolset=msvc-7.1,gcc" + echo " link=static,shared" + echo " threading=single,multi" + echo " -sBOOST_ARCHIVE_LIST=" +else + bjam --dump-tests variant=profile preserve-test-targets=on $@ >bjam.log 2>&1 + process_jam_log --v2 $dir/profile.txt + done + done + + library_status library_status.html links.html +fi diff --git a/src/boost/libs/serialization/performance/text_archive.hpp b/src/boost/libs/serialization/performance/text_archive.hpp new file mode 100644 index 000000000..e7e1b3ca4 --- /dev/null +++ b/src/boost/libs/serialization/performance/text_archive.hpp @@ -0,0 +1,14 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +// text_archive +#include +typedef boost::archive::text_oarchive test_oarchive; +typedef std::ofstream test_ostream; +#include +typedef boost::archive::text_iarchive test_iarchive; +typedef std::ifstream test_istream; +#define TEST_STREAM_FLAGS (std::ios_base::openmode)0 diff --git a/src/boost/libs/serialization/performance/text_warchive.hpp b/src/boost/libs/serialization/performance/text_warchive.hpp new file mode 100644 index 000000000..de7dea01b --- /dev/null +++ b/src/boost/libs/serialization/performance/text_warchive.hpp @@ -0,0 +1,19 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +// text_warchive +#include +typedef boost::archive::text_woarchive test_oarchive; +typedef std::wofstream test_ostream; +#include +typedef boost::archive::text_wiarchive test_iarchive; +typedef std::wifstream test_istream; +#define TEST_STREAM_FLAGS (std::ios_base::openmode)0 + + + + + diff --git a/src/boost/libs/serialization/performance/xml/Jamfile.v2 b/src/boost/libs/serialization/performance/xml/Jamfile.v2 new file mode 100644 index 000000000..cdd792e55 --- /dev/null +++ b/src/boost/libs/serialization/performance/xml/Jamfile.v2 @@ -0,0 +1,35 @@ +################################################################################ +# +# (C) Copyright 2010 Bryce Lelbach +# +# Use, modification and distribution is subject to the Boost Software License, +# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +# +################################################################################ + +project bsl-xml-benchmark ; + +exe int4_test : int4_test.cpp + : gcc:"-lrt -lboost_serialization" ; + +exe int16_test : int16_test.cpp + : gcc:"-lrt -lboost_serialization" ; + +exe int64_test : int64_test.cpp + : gcc:"-lrt -lboost_serialization" ; + +exe int256_test : int256_test.cpp + : gcc:"-lrt -lboost_serialization" ; + +exe string4_test : string4_test.cpp + : gcc:"-lrt -lboost_serialization" ; + +exe string16_test : string16_test.cpp + : gcc:"-lrt -lboost_serialization" ; + +exe string64_test : string64_test.cpp + : gcc:"-lrt -lboost_serialization" ; + +exe string256_test : string256_test.cpp + : gcc:"-lrt -lboost_serialization" ; diff --git a/src/boost/libs/serialization/performance/xml/harness.hpp b/src/boost/libs/serialization/performance/xml/harness.hpp new file mode 100644 index 000000000..8955be216 --- /dev/null +++ b/src/boost/libs/serialization/performance/xml/harness.hpp @@ -0,0 +1,188 @@ +/* /libs/serialization/xml_performance/harness.hpp ***************************** + +(C) Copyright 2010 Bryce Lelbach + +Use, modification and distribution is subject to the Boost Software License, +Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) + +*******************************************************************************/ + +#if !defined(BOOST_SERIALIZATION_XML_PERFORMANCE_HARNESS_HPP) +#define BOOST_SERIALIZATION_XML_PERFORMANCE_HARNESS_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) + # pragma once +#endif + +#include +#include + +#include +#include +#include +#include + +#include + +#if defined(BOOST_NO_STDC_NAMESPACE) + namespace std { + using ::remove; + } +#endif + +#include +#include +#include + +#include + +#include + +#include + +#include +#include + +#include + +#include "high_resolution_timer.hpp" // from /libs/spirit/optimization + +#include "node.hpp" // includes macro.hpp + +namespace boost { +namespace archive { +namespace xml { + +template T random (void); + +template T +random (void) { + using namespace boost::uuids; + + hash hash; + basic_random_generator gen; + + return hash(gen()); +} + +template<> std::string +random (void) { + using namespace boost::uuids; + + basic_random_generator gen; + uuid u = gen(); + + return to_string(u); +} + +template std::string +save_archive (T const& s) { + std::string fn = random() + + "-" BOOST_PP_STRINGIZE(BSL_TYPE) + BOOST_PP_STRINGIZE(BSL_EXP(BSL_NODE_MAX, BSL_DEPTH)) + ".xml" + ; + + std::ofstream ofs(fn.c_str()); + + assert(ofs.good()); + + xml_oarchive oa(ofs); + oa << BOOST_SERIALIZATION_NVP(s); + + ofs.close(); + return fn; +} + +template std::pair +restore_archive (std::string fn) { + std::ifstream ifs(fn.c_str()); + T s; + + assert(ifs.good()); + + high_resolution_timer u; + + xml_iarchive ia(ifs); + ia >> BOOST_SERIALIZATION_NVP(s); + + ifs.close(); + return std::pair(u.elapsed(), s); +} + +class result_set_exception: public virtual archive_exception { + public: + enum exception_code { + invalid_archive_metadata + }; + + result_set_exception (exception_code c = invalid_archive_metadata){ } + + virtual const char* what() const throw() { + const char *msg = ""; + + switch (code) { + case invalid_archive_metadata: + msg = "result set was not created on this system"; + default: + archive_exception::what(); + } + + return msg; + } +}; + +struct entry { + std::string type; + std::size_t size; + double data; + + template + void serialize (ARC& ar, const unsigned int) { + ar & BOOST_SERIALIZATION_NVP(type) + & BOOST_SERIALIZATION_NVP(size) + & BOOST_SERIALIZATION_NVP(data) + ; + } + + entry (void) { } + + entry (std::string type, std::size_t size, double data): + type(type), size(size), data(data) { } +}; + +struct result_set { + std::string compiler; + std::string platform; + std::list entries; + + template + void serialize (ARC& ar, const unsigned int) { + ar & BOOST_SERIALIZATION_NVP(compiler) + & BOOST_SERIALIZATION_NVP(platform) + & BOOST_SERIALIZATION_NVP(entries) + ; + + if ( (compiler != BOOST_COMPILER) + || (platform != BOOST_PLATFORM)) + throw result_set_exception(); + } + + result_set (void): + compiler(BOOST_COMPILER), + platform(BOOST_PLATFORM) { } + + result_set (std::list entries): + compiler(BOOST_COMPILER), + platform(BOOST_PLATFORM), + entries(entries) { } +}; + +} // xml +} // archive +} // boost + +#endif // BOOST_SERIALIZATION_XML_PERFORMANCE_HARNESS_HPP + diff --git a/src/boost/libs/serialization/performance/xml/high_resolution_timer.hpp b/src/boost/libs/serialization/performance/xml/high_resolution_timer.hpp new file mode 100644 index 000000000..afa5495da --- /dev/null +++ b/src/boost/libs/serialization/performance/xml/high_resolution_timer.hpp @@ -0,0 +1,489 @@ +// Copyright (c) 2005-2010 Hartmut Kaiser +// Copyright (c) 2009 Edward Grace +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#if !defined(HIGH_RESOLUTION_TIMER_MAR_24_2008_1222PM) +#define HIGH_RESOLUTION_TIMER_MAR_24_2008_1222PM + +#include +#include + +#if defined(BOOST_HAS_UNISTD_H) +#include +#endif +#include +#include +#include + +#if defined(BOOST_WINDOWS) + +#include + +namespace boost { +namespace archive { +namespace xml { + /////////////////////////////////////////////////////////////////////////////// + // + // high_resolution_timer + // A timer object measures elapsed time. + // CAUTION: Windows only! + // + /////////////////////////////////////////////////////////////////////////////// + class high_resolution_timer + { + public: + high_resolution_timer() + { + restart(); + } + + high_resolution_timer(double t) + { + LARGE_INTEGER frequency; + if (!QueryPerformanceFrequency(&frequency)) + boost::throw_exception(std::runtime_error("Couldn't acquire frequency")); + + start_time.QuadPart = (LONGLONG)(t * frequency.QuadPart); + } + + high_resolution_timer(high_resolution_timer const& rhs) + : start_time(rhs.start_time) + { + } + + static double now() + { + SYSTEMTIME st; + GetSystemTime(&st); + + FILETIME ft; + SystemTimeToFileTime(&st, &ft); + + LARGE_INTEGER now; + now.LowPart = ft.dwLowDateTime; + now.HighPart = ft.dwHighDateTime; + + // FileTime is in 100ns increments, result needs to be in [s] + return now.QuadPart * 1e-7; + } + + void restart() + { + if (!QueryPerformanceCounter(&start_time)) + boost::throw_exception(std::runtime_error("Couldn't initialize start_time")); + } + double elapsed() const // return elapsed time in seconds + { + LARGE_INTEGER now; + if (!QueryPerformanceCounter(&now)) + boost::throw_exception(std::runtime_error("Couldn't get current time")); + + LARGE_INTEGER frequency; + if (!QueryPerformanceFrequency(&frequency)) + boost::throw_exception(std::runtime_error("Couldn't acquire frequency")); + + return double(now.QuadPart - start_time.QuadPart) / frequency.QuadPart; + } + + double elapsed_max() const // return estimated maximum value for elapsed() + { + LARGE_INTEGER frequency; + if (!QueryPerformanceFrequency(&frequency)) + boost::throw_exception(std::runtime_error("Couldn't acquire frequency")); + + return double((std::numeric_limits::max)() - start_time.QuadPart) / + double(frequency.QuadPart); + } + + double elapsed_min() const // return minimum value for elapsed() + { + LARGE_INTEGER frequency; + if (!QueryPerformanceFrequency(&frequency)) + boost::throw_exception(std::runtime_error("Couldn't acquire frequency")); + + return 1.0 / frequency.QuadPart; + } + + private: + LARGE_INTEGER start_time; + }; + +} // xml +} // archive +} // boost + +#elif defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0 && defined(_POSIX_THREAD_CPUTIME) + +#if _POSIX_THREAD_CPUTIME > 0 // timer always supported + +namespace boost { +namespace archive { +namespace xml { + + /////////////////////////////////////////////////////////////////////////////// + // + // high_resolution_timer + // A timer object measures elapsed time. + // + /////////////////////////////////////////////////////////////////////////////// + class high_resolution_timer + { + public: + high_resolution_timer() + { + start_time.tv_sec = 0; + start_time.tv_nsec = 0; + + restart(); + } + + high_resolution_timer(double t) + { + start_time.tv_sec = time_t(t); + start_time.tv_nsec = (t - start_time.tv_sec) * 1e9; + } + + high_resolution_timer(high_resolution_timer const& rhs) + : start_time(rhs.start_time) + { + } + + static double now() + { + timespec now; + if (-1 == clock_gettime(CLOCK_REALTIME, &now)) + boost::throw_exception(std::runtime_error("Couldn't get current time")); + return double(now.tv_sec) + double(now.tv_nsec) * 1e-9; + } + + void restart() + { + if (-1 == clock_gettime(CLOCK_REALTIME, &start_time)) + boost::throw_exception(std::runtime_error("Couldn't initialize start_time")); + } + double elapsed() const // return elapsed time in seconds + { + timespec now; + if (-1 == clock_gettime(CLOCK_REALTIME, &now)) + boost::throw_exception(std::runtime_error("Couldn't get current time")); + + if (now.tv_sec == start_time.tv_sec) + return double(now.tv_nsec - start_time.tv_nsec) * 1e-9; + + return double(now.tv_sec - start_time.tv_sec) + + (double(now.tv_nsec - start_time.tv_nsec) * 1e-9); + } + + double elapsed_max() const // return estimated maximum value for elapsed() + { + return double((std::numeric_limits::max)() - start_time.tv_sec); + } + + double elapsed_min() const // return minimum value for elapsed() + { + timespec resolution; + if (-1 == clock_getres(CLOCK_REALTIME, &resolution)) + boost::throw_exception(std::runtime_error("Couldn't get resolution")); + return double(resolution.tv_sec + resolution.tv_nsec * 1e-9); + } + + private: + timespec start_time; + }; + +} // xml +} // archive +} // boost + +#else // _POSIX_THREAD_CPUTIME > 0 + +#include + +// availability of high performance timers must be checked at runtime +namespace boost { +namespace archive { +namespace xml { + /////////////////////////////////////////////////////////////////////////////// + // + // high_resolution_timer + // A timer object measures elapsed time. + // + /////////////////////////////////////////////////////////////////////////////// + class high_resolution_timer + { + public: + high_resolution_timer() + : use_backup(sysconf(_SC_THREAD_CPUTIME) <= 0) + { + if (!use_backup) { + start_time.tv_sec = 0; + start_time.tv_nsec = 0; + } + restart(); + } + + high_resolution_timer(double t) + : use_backup(sysconf(_SC_THREAD_CPUTIME) <= 0) + { + if (!use_backup) { + start_time.tv_sec = time_t(t); + start_time.tv_nsec = (t - start_time.tv_sec) * 1e9; + } + } + + high_resolution_timer(high_resolution_timer const& rhs) + : use_backup(sysconf(_SC_THREAD_CPUTIME) <= 0), + start_time(rhs.start_time) + { + } + + static double now() + { + if (sysconf(_SC_THREAD_CPUTIME) <= 0) + return double(std::clock()); + + timespec now; + if (-1 == clock_gettime(CLOCK_REALTIME, &now)) + boost::throw_exception(std::runtime_error("Couldn't get current time")); + return double(now.tv_sec) + double(now.tv_nsec) * 1e-9; + } + + void restart() + { + if (use_backup) + start_time_backup.restart(); + else if (-1 == clock_gettime(CLOCK_REALTIME, &start_time)) + boost::throw_exception(std::runtime_error("Couldn't initialize start_time")); + } + double elapsed() const // return elapsed time in seconds + { + if (use_backup) + return start_time_backup.elapsed(); + + timespec now; + if (-1 == clock_gettime(CLOCK_REALTIME, &now)) + boost::throw_exception(std::runtime_error("Couldn't get current time")); + + if (now.tv_sec == start_time.tv_sec) + return double(now.tv_nsec - start_time.tv_nsec) * 1e-9; + + return double(now.tv_sec - start_time.tv_sec) + + (double(now.tv_nsec - start_time.tv_nsec) * 1e-9); + } + + double elapsed_max() const // return estimated maximum value for elapsed() + { + if (use_backup) + start_time_backup.elapsed_max(); + + return double((std::numeric_limits::max)() - start_time.tv_sec); + } + + double elapsed_min() const // return minimum value for elapsed() + { + if (use_backup) + start_time_backup.elapsed_min(); + + timespec resolution; + if (-1 == clock_getres(CLOCK_REALTIME, &resolution)) + boost::throw_exception(std::runtime_error("Couldn't get resolution")); + return double(resolution.tv_sec + resolution.tv_nsec * 1e-9); + } + + private: + bool use_backup; + timespec start_time; + boost::timer start_time_backup; + }; + +} // xml +} // archive +} // boost + +#endif // _POSIX_THREAD_CPUTIME > 0 + +#else // !defined(BOOST_WINDOWS) && (!defined(_POSIX_TIMERS) + // || _POSIX_TIMERS <= 0 + // || !defined(_POSIX_THREAD_CPUTIME) + // || _POSIX_THREAD_CPUTIME <= 0) + +#if defined(BOOST_HAS_GETTIMEOFDAY) + +// For platforms that do not support _POSIX_TIMERS but do have +// GETTIMEOFDAY, which is still preferable to std::clock() +#include + +namespace boost { +namespace archive { +namespace xml { + + /////////////////////////////////////////////////////////////////////////// + // + // high_resolution_timer + // A timer object measures elapsed time. + // + // Implemented with gettimeofday() for platforms that support it, + // such as Darwin (OS X) but do not support the previous options. + // + // Copyright (c) 2009 Edward Grace + // + /////////////////////////////////////////////////////////////////////////// + class high_resolution_timer + { + private: + template + static inline double unsigned_diff(const U &a, const U &b) + { + if (a > b) + return static_cast(a-b); + return -static_cast(b-a); + } + + // @brief Return the difference between two timeval types. + // + // @param t1 The most recent timeval. + // @param t0 The historical timeval. + // + // @return The difference between the two in seconds. + double elapsed(const timeval &t1, const timeval &t0) const + { + if (t1.tv_sec == t0.tv_sec) + return unsigned_diff(t1.tv_usec,t0.tv_usec) * 1e-6; + + // We do it this way as the result of the difference of the + // microseconds can be negative if the clock is implemented so + // that the seconds timer increases in large steps. + // + // Naive subtraction of the unsigned types and conversion to + // double can wreak havoc! + return unsigned_diff(t1.tv_sec,t0.tv_sec) + + unsigned_diff(t1.tv_usec,t0.tv_usec) * 1e-6; + } + + public: + high_resolution_timer() + { + start_time.tv_sec = 0; + start_time.tv_usec = 0; + + restart(); + } + + high_resolution_timer(double t) + { + start_time.tv_sec = time_t(t); + start_time.tv_usec = (t - start_time.tv_sec) * 1e6; + } + + high_resolution_timer(high_resolution_timer const& rhs) + : start_time(rhs.start_time) + { + } + + static double now() + { + // Under some implementations gettimeofday() will always + // return zero. If it returns anything else however then + // we accept this as evidence of an error. Note we are + // not assuming that -1 explicitly indicates the error + // condition, just that non zero is indicative of the + // error. + timeval now; + if (gettimeofday(&now, NULL)) + boost::throw_exception(std::runtime_error("Couldn't get current time")); + return double(now.tv_sec) + double(now.tv_usec) * 1e-6; + } + + void restart() + { + if (gettimeofday(&start_time, NULL)) + boost::throw_exception(std::runtime_error("Couldn't initialize start_time")); + } + + double elapsed() const // return elapsed time in seconds + { + timeval now; + if (gettimeofday(&now, NULL)) + boost::throw_exception(std::runtime_error("Couldn't get current time")); + return elapsed(now,start_time); + } + + double elapsed_max() const // return estimated maximum value for elapsed() + { + return double((std::numeric_limits::max)() - start_time.tv_sec); + } + + double elapsed_min() const // return minimum value for elapsed() + { + // On systems without an explicit clock_getres or similar + // we can only estimate an upper bound on the resolution + // by repeatedly calling the gettimeofday function. This + // is often likely to be indicative of the true + // resolution. + timeval t0, t1; + double delta(0); + + if (gettimeofday(&t0, NULL)) + boost::throw_exception(std::runtime_error("Couldn't get resolution.")); + + // Spin around in a tight loop until we observe a change + // in the reported timer value. + do { + if (gettimeofday(&t1, NULL)) + boost::throw_exception(std::runtime_error("Couldn't get resolution.")); + delta = elapsed(t1, t0); + } while (delta <= 0.0); + + return delta; + } + + private: + timeval start_time; + }; + +} // xml +} // archive +} // boost + +#else // BOOST_HAS_GETTIMEOFDAY + +// For platforms other than Windows or Linux, or not implementing gettimeofday +// simply fall back to boost::timer +#include + +namespace boost { +namespace archive { +namespace xml { + + struct high_resolution_timer + : boost::timer + { + static double now() + { + return double(std::clock()); + } + }; + +} // xml +} // archive +} // boost + + +#endif + +#endif + +#endif // HIGH_RESOLUTION_TIMER_AUG_14_2009_0425PM + +// +// $Log: high_resolution_timer.hpp,v $ +// Revision 1.4 2009/08/14 15:28:10 graceej +// * It is entirely possible for the updating clock to increment the +// * seconds and *decrement* the microseconds field. Consequently +// * when subtracting these unsigned microseconds fields a wrap-around +// * error can occur. For this reason elapsed(t1, t0) is used in a +// * similar maner to cycle.h this preserves the sign of the +// * difference. +// diff --git a/src/boost/libs/serialization/performance/xml/int16_results.xml b/src/boost/libs/serialization/performance/xml/int16_results.xml new file mode 100644 index 000000000..a3708b3d2 --- /dev/null +++ b/src/boost/libs/serialization/performance/xml/int16_results.xml @@ -0,0 +1,1291 @@ + + + + + GNU C++ version 4.5.1 20100617 (prerelease) + linux + + 256 + 0 + + int + 16 + 0.0091240829999999998 + + + int + 16 + 0.0039804419999999998 + + + int + 16 + 0.003975363 + + + int + 16 + 0.0041283230000000006 + + + int + 16 + 0.003973201 + + + int + 16 + 0.0039916819999999999 + + + int + 16 + 0.0039507209999999999 + + + int + 16 + 0.003963243 + + + int + 16 + 0.0039550010000000005 + + + int + 16 + 0.0039774010000000002 + + + int + 16 + 0.0040641210000000004 + + + int + 16 + 0.0040065630000000003 + + + int + 16 + 0.0039576810000000002 + + + int + 16 + 0.0039339209999999999 + + + int + 16 + 0.0039280410000000002 + + + int + 16 + 0.0039456830000000002 + + + int + 16 + 0.0039237630000000003 + + + int + 16 + 0.0039022810000000001 + + + int + 16 + 0.0039720409999999999 + + + int + 16 + 0.0039302410000000001 + + + int + 16 + 0.0040139630000000006 + + + int + 16 + 0.003958441 + + + int + 16 + 0.0039454820000000002 + + + int + 16 + 0.003940921 + + + int + 16 + 0.0039098830000000003 + + + int + 16 + 0.0039246010000000007 + + + int + 16 + 0.0039138010000000006 + + + int + 16 + 0.0039268810000000001 + + + int + 16 + 0.0039260830000000004 + + + int + 16 + 0.0039660830000000005 + + + int + 16 + 0.0039050410000000002 + + + int + 16 + 0.0039309610000000002 + + + int + 16 + 0.0039204830000000006 + + + int + 16 + 0.0039173630000000001 + + + int + 16 + 0.0039208010000000007 + + + int + 16 + 0.0039189620000000007 + + + int + 16 + 0.0039035220000000004 + + + int + 16 + 0.0039350030000000003 + + + int + 16 + 0.0039948810000000005 + + + int + 16 + 0.0039946010000000004 + + + int + 16 + 0.0039224820000000006 + + + int + 16 + 0.0039112830000000006 + + + int + 16 + 0.00392612 + + + int + 16 + 0.0039826410000000003 + + + int + 16 + 0.0039312010000000005 + + + int + 16 + 0.003906283 + + + int + 16 + 0.0040008029999999998 + + + int + 16 + 0.0039259610000000004 + + + int + 16 + 0.0039096820000000003 + + + int + 16 + 0.0039164009999999999 + + + int + 16 + 0.0039059230000000004 + + + int + 16 + 0.0039398410000000003 + + + int + 16 + 0.0039865610000000004 + + + int + 16 + 0.0039256410000000005 + + + int + 16 + 0.0039788829999999999 + + + int + 16 + 0.0040020799999999999 + + + int + 16 + 0.0039252410000000003 + + + int + 16 + 0.0039988810000000001 + + + int + 16 + 0.0039786029999999998 + + + int + 16 + 0.0039644430000000007 + + + int + 16 + 0.0039585210000000004 + + + int + 16 + 0.0039494420000000001 + + + int + 16 + 0.0039636020000000001 + + + int + 16 + 0.0039696430000000001 + + + int + 16 + 0.0039952010000000003 + + + int + 16 + 0.0039923210000000001 + + + int + 16 + 0.003981081 + + + int + 16 + 0.0039232429999999999 + + + int + 16 + 0.0039772010000000005 + + + int + 16 + 0.0040404009999999999 + + + int + 16 + 0.0039756820000000003 + + + int + 16 + 0.0039785230000000003 + + + int + 16 + 0.0040130030000000002 + + + int + 16 + 0.0039342810000000004 + + + int + 16 + 0.0039185610000000001 + + + int + 16 + 0.003929002 + + + int + 16 + 0.0039356030000000002 + + + int + 16 + 0.0039261210000000003 + + + int + 16 + 0.0039248010000000003 + + + int + 16 + 0.0039206010000000001 + + + int + 16 + 0.003921323 + + + int + 16 + 0.0039623610000000002 + + + int + 16 + 0.0039768010000000003 + + + int + 16 + 0.0039882810000000006 + + + int + 16 + 0.0039450430000000005 + + + int + 16 + 0.0039181229999999999 + + + int + 16 + 0.0039785210000000005 + + + int + 16 + 0.0039770420000000001 + + + int + 16 + 0.003920242 + + + int + 16 + 0.0040526030000000001 + + + int + 16 + 0.0039671610000000003 + + + int + 16 + 0.0039684009999999999 + + + int + 16 + 0.003951001 + + + int + 16 + 0.0039216429999999998 + + + int + 16 + 0.0039896410000000004 + + + int + 16 + 0.0039810010000000005 + + + int + 16 + 0.0039498020000000005 + + + int + 16 + 0.0039298430000000006 + + + int + 16 + 0.0039901630000000006 + + + int + 16 + 0.0039274410000000003 + + + int + 16 + 0.0039447610000000006 + + + int + 16 + 0.0039199630000000003 + + + int + 16 + 0.003965283 + + + int + 16 + 0.004002121 + + + int + 16 + 0.0040376020000000004 + + + int + 16 + 0.003977202 + + + int + 16 + 0.0039340830000000005 + + + int + 16 + 0.0039951610000000005 + + + int + 16 + 0.003941361 + + + int + 16 + 0.0039718420000000006 + + + int + 16 + 0.0039271230000000002 + + + int + 16 + 0.0039771630000000006 + + + int + 16 + 0.0039450810000000005 + + + int + 16 + 0.0039788410000000003 + + + int + 16 + 0.003906563 + + + int + 16 + 0.0039912430000000002 + + + int + 16 + 0.0039290410000000003 + + + int + 16 + 0.0040306020000000003 + + + int + 16 + 0.0039789200000000004 + + + int + 16 + 0.0039774830000000004 + + + int + 16 + 0.0039634810000000005 + + + int + 16 + 0.0039378010000000003 + + + int + 16 + 0.0039205619999999998 + + + int + 16 + 0.0039250830000000002 + + + int + 16 + 0.0039660609999999999 + + + int + 16 + 0.0039749609999999999 + + + int + 16 + 0.003934402 + + + int + 16 + 0.0039190830000000003 + + + int + 16 + 0.0039127229999999999 + + + int + 16 + 0.0039247610000000006 + + + int + 16 + 0.0039810010000000005 + + + int + 16 + 0.0039310410000000006 + + + int + 16 + 0.0039226830000000006 + + + int + 16 + 0.0039676010000000003 + + + int + 16 + 0.0039205200000000003 + + + int + 16 + 0.0039862420000000001 + + + int + 16 + 0.0039284430000000002 + + + int + 16 + 0.00398292 + + + int + 16 + 0.0039506810000000002 + + + int + 16 + 0.0040586010000000002 + + + int + 16 + 0.0039792030000000006 + + + int + 16 + 0.0040032829999999998 + + + int + 16 + 0.0039780409999999999 + + + int + 16 + 0.0039807620000000005 + + + int + 16 + 0.0039528810000000001 + + + int + 16 + 0.0039343630000000006 + + + int + 16 + 0.0039706810000000002 + + + int + 16 + 0.0039614810000000002 + + + int + 16 + 0.0039668810000000002 + + + int + 16 + 0.0040543630000000001 + + + int + 16 + 0.0039853600000000003 + + + int + 16 + 0.0039722410000000005 + + + int + 16 + 0.0040198410000000006 + + + int + 16 + 0.0039786029999999998 + + + int + 16 + 0.0039824430000000004 + + + int + 16 + 0.0039788010000000006 + + + int + 16 + 0.0039784420000000004 + + + int + 16 + 0.0039569219999999999 + + + int + 16 + 0.0039798429999999829 + + + int + 16 + 0.003989561 + + + int + 16 + 0.0039734410000000003 + + + int + 16 + 0.003959522 + + + int + 16 + 0.0039615230000000006 + + + int + 16 + 0.0039729209999999999 + + + int + 16 + 0.0040494010000000002 + + + int + 16 + 0.003996561 + + + int + 16 + 0.0039343630000000006 + + + int + 16 + 0.0039701229999999999 + + + int + 16 + 0.0039064010000000003 + + + int + 16 + 0.0039213620000000003 + + + int + 16 + 0.0039636419999999999 + + + int + 16 + 0.0039354030000000005 + + + int + 16 + 0.0039401610000000002 + + + int + 16 + 0.003979481 + + + int + 16 + 0.0039353210000000003 + + + int + 16 + 0.0039471230000000003 + + + int + 16 + 0.0039845210000000004 + + + int + 16 + 0.0040990010000000006 + + + int + 16 + 0.0039887210000000006 + + + int + 16 + 0.0039748830000000002 + + + int + 16 + 0.0039555630000000005 + + + int + 16 + 0.0039723610000000006 + + + int + 16 + 0.0039555220000000004 + + + int + 16 + 0.0039587630000000006 + + + int + 16 + 0.0039941630000000002 + + + int + 16 + 0.0039804410000000004 + + + int + 16 + 0.0039180810000000003 + + + int + 16 + 0.0039247220000000003 + + + int + 16 + 0.0039286830000000005 + + + int + 16 + 0.003925001 + + + int + 16 + 0.0039934810000000001 + + + int + 16 + 0.003982602 + + + int + 16 + 0.0039627230000000005 + + + int + 16 + 0.0039693430000000002 + + + int + 16 + 0.003979481 + + + int + 16 + 0.0039772420000000006 + + + int + 16 + 0.0039774830000000004 + + + int + 16 + 0.0039840029999999999 + + + int + 16 + 0.0039316810000000002 + + + int + 16 + 0.0039705210000000003 + + + int + 16 + 0.0040028810000000007 + + + int + 16 + 0.0039730830000000005 + + + int + 16 + 0.0040140410000000003 + + + int + 16 + 0.0039439610000000002 + + + int + 16 + 0.0039728410000000004 + + + int + 16 + 0.0039775629999999999 + + + int + 16 + 0.0039797600000000006 + + + int + 16 + 0.0039672409999999998 + + + int + 16 + 0.003991802 + + + int + 16 + 0.0039799230000000007 + + + int + 16 + 0.0040010829999999999 + + + int + 16 + 0.0039361209999999999 + + + int + 16 + 0.0039165210000000001 + + + int + 16 + 0.0040524020000000001 + + + int + 16 + 0.0039798030000000005 + + + int + 16 + 0.003964721 + + + int + 16 + 0.0039675610000000005 + + + int + 16 + 0.0040526010000000003 + + + int + 16 + 0.0039617630000000001 + + + int + 16 + 0.0040681210000000001 + + + int + 16 + 0.0039866010000000002 + + + int + 16 + 0.0039520010000000001 + + + int + 16 + 0.0039534430000000001 + + + int + 16 + 0.0039646030000000006 + + + int + 16 + 0.0039686809999999999 + + + int + 16 + 0.0039310810000000003 + + + int + 16 + 0.0039799610000000006 + + + int + 16 + 0.0039404429999999602 + + + int + 16 + 0.0040029610000000002 + + + int + 16 + 0.003971161 + + + int + 16 + 0.0039470020000000007 + + + int + 16 + 0.0039831630000000005 + + + int + 16 + 0.003932161 + + + int + 16 + 0.0039708410000000001 + + + int + 16 + 0.0039706020000000002 + + + int + 16 + 0.0039416830000000005 + + + int + 16 + 0.0039592830000000001 + + + int + 16 + 0.0039440410000000006 + + + int + 16 + 0.0039856819999999999 + + + int + 16 + 0.0039864810000000001 + + + int + 16 + 0.0039909230000000004 + + + int + 16 + 0.0039244409999999999 + + + int + 16 + 0.0040034810000000006 + + + int + 16 + 0.0039812010000000002 + + + int + 16 + 0.0039719230000000005 + + + int + 16 + 0.0040905210000000006 + + + int + 16 + 0.0039932810000000004 + + + int + 16 + 0.0039387220000000004 + + + int + 16 + 0.0039618029999999999 + + + int + 16 + 0.0040639630000000003 + + + int + 16 + 0.0039436410000000003 + + + int + 16 + 0.0039764420000000002 + + + int + 16 + 0.0039905230000000002 + + + int + 16 + 0.0040003629999999998 + + + int + 16 + 0.0039767610000000005 + + + int + 16 + 0.0039385219999999999 + + + diff --git a/src/boost/libs/serialization/performance/xml/int16_test.cpp b/src/boost/libs/serialization/performance/xml/int16_test.cpp new file mode 100644 index 000000000..bb633f648 --- /dev/null +++ b/src/boost/libs/serialization/performance/xml/int16_test.cpp @@ -0,0 +1,20 @@ +/* /libs/serialization/xml_performance/int25_test.cpp ************************** + +(C) Copyright 2010 Bryce Lelbach + +Use, modification and distribution is subject to the Boost Software License, +Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) + +*******************************************************************************/ + +#define BSL_TYPE int +#define BSL_DEPTH 2 +#define BSL_ROUNDS 256 +#define BSL_NODE_MAX 4 +#define BSL_SAVE_TMPFILE 0 + +#include "harness.hpp" + +BSL_MAIN + diff --git a/src/boost/libs/serialization/performance/xml/int256_results.xml b/src/boost/libs/serialization/performance/xml/int256_results.xml new file mode 100644 index 000000000..488ea9a61 --- /dev/null +++ b/src/boost/libs/serialization/performance/xml/int256_results.xml @@ -0,0 +1,1291 @@ + + + + + GNU C++ version 4.5.1 20100617 (prerelease) + linux + + 256 + 0 + + int + 256 + 0.15321624699999992 + + + int + 256 + 0.08650484 + + + int + 256 + 0.085920982000000007 + + + int + 256 + 0.085633820999999999 + + + int + 256 + 0.16989353200000001 + + + int + 256 + 0.068107577000000002 + + + int + 256 + 0.16393698700000001 + + + int + 256 + 0.151674061 + + + int + 256 + 0.085580072000000007 + + + int + 256 + 0.085237985000000002 + + + int + 256 + 0.17062496600000002 + + + int + 256 + 0.16267781100000001 + + + int + 256 + 0.16851917800000002 + + + int + 256 + 0.14782741100000002 + + + int + 256 + 0.086171551999999998 + + + int + 256 + 0.114132571 + + + int + 256 + 0.12319324500000001 + + + int + 256 + 0.110353244 + + + int + 256 + 0.097322675000000011 + + + int + 256 + 0.15796201600000001 + + + int + 256 + 0.086067782000000009 + + + int + 256 + 0.125855732 + + + int + 256 + 0.095308130999999907 + + + int + 256 + 0.085265061000000003 + + + int + 256 + 0.109543947 + + + int + 256 + 0.14504557000000001 + + + int + 256 + 0.14939509599999989 + + + int + 256 + 0.082221090999999968 + + + int + 256 + 0.109551042 + + + int + 256 + 0.12431112100000001 + + + int + 256 + 0.085782263000000011 + + + int + 256 + 0.15682879900000002 + + + int + 256 + 0.068575454000000008 + + + int + 256 + 0.15049496400000001 + + + int + 256 + 0.12869196700000002 + + + int + 256 + 0.17715746300000002 + + + int + 256 + 0.13313712599999999 + + + int + 256 + 0.08405491100000001 + + + int + 256 + 0.16982336199999992 + + + int + 256 + 0.1650644779999999 + + + int + 256 + 0.087539541000000012 + + + int + 256 + 0.144009527 + + + int + 256 + 0.084986318000000005 + + + int + 256 + 0.15154921200000002 + + + int + 256 + 0.089096928999999991 + + + int + 256 + 0.078815780000000002 + + + int + 256 + 0.15179225900000001 + + + int + 256 + 0.071424974000000002 + + + int + 256 + 0.17383854799999998 + + + int + 256 + 0.15968935400000001 + + + int + 256 + 0.15121306300000001 + + + int + 256 + 0.17404088399999995 + + + int + 256 + 0.14575297599999992 + + + int + 256 + 0.147578247 + + + int + 256 + 0.088792417999999929 + + + int + 256 + 0.13412004899999996 + + + int + 256 + 0.086281149000000001 + + + int + 256 + 0.10452476200000001 + + + int + 256 + 0.17052829600000002 + + + int + 256 + 0.12843396500000001 + + + int + 256 + 0.24160787 + + + int + 256 + 0.17276313100000001 + + + int + 256 + 0.08786999299999998 + + + int + 256 + 0.10957144100000001 + + + int + 256 + 0.18513253200000002 + + + int + 256 + 0.12825971899999999 + + + int + 256 + 0.14682889500000001 + + + int + 256 + 0.14917019100000001 + + + int + 256 + 0.13963762200000002 + + + int + 256 + 0.162242785 + + + int + 256 + 0.171921189 + + + int + 256 + 0.21192338600000002 + + + int + 256 + 0.16182439900000001 + + + int + 256 + 0.075873628999999998 + + + int + 256 + 0.091050645999999999 + + + int + 256 + 0.090728246000000012 + + + int + 256 + 0.16790991200000002 + + + int + 256 + 0.131269792 + + + int + 256 + 0.147774081 + + + int + 256 + 0.075707901000000008 + + + int + 256 + 0.085849350000000005 + + + int + 256 + 0.17120687700000001 + + + int + 256 + 0.18270776999999994 + + + int + 256 + 0.115657858 + + + int + 256 + 0.086130823000000009 + + + int + 256 + 0.08591346100000001 + + + int + 256 + 0.148075872 + + + int + 256 + 0.093777932000000008 + + + int + 256 + 0.170032617 + + + int + 256 + 0.078983854000000006 + + + int + 256 + 0.183002574 + + + int + 256 + 0.17499062400000001 + + + int + 256 + 0.16999298600000001 + + + int + 256 + 0.12343807900000001 + + + int + 256 + 0.17547888899999997 + + + int + 256 + 0.070078961000000009 + + + int + 256 + 0.184841536 + + + int + 256 + 0.089750393000000012 + + + int + 256 + 0.09077006 + + + int + 256 + 0.14565105699999992 + + + int + 256 + 0.17549457500000001 + + + int + 256 + 0.16971993600000002 + + + int + 256 + 0.086169903000000006 + + + int + 256 + 0.15882590900000002 + + + int + 256 + 0.087636622000000011 + + + int + 256 + 0.091248745000000006 + + + int + 256 + 0.17427003100000002 + + + int + 256 + 0.15880698700000001 + + + int + 256 + 0.131337537 + + + int + 256 + 0.17184867300000001 + + + int + 256 + 0.17884059400000002 + + + int + 256 + 0.18736676700000002 + + + int + 256 + 0.13111488800000001 + + + int + 256 + 0.10980652 + + + int + 256 + 0.20151995 + + + int + 256 + 0.10182866500000001 + + + int + 256 + 0.13558609700000002 + + + int + 256 + 0.085793494000000012 + + + int + 256 + 0.169369618 + + + int + 256 + 0.16526854600000002 + + + int + 256 + 0.172801116 + + + int + 256 + 0.170604694 + + + int + 256 + 0.085537078000000002 + + + int + 256 + 0.13368856099999993 + + + int + 256 + 0.13219763200000001 + + + int + 256 + 0.170200771 + + + int + 256 + 0.094924826000000004 + + + int + 256 + 0.086014382 + + + int + 256 + 0.101821225 + + + int + 256 + 0.11041902200000001 + + + int + 256 + 0.17392156399999992 + + + int + 256 + 0.14795049999999998 + + + int + 256 + 0.17319567400000002 + + + int + 256 + 0.177151848 + + + int + 256 + 0.17826678499999993 + + + int + 256 + 0.18706392999999999 + + + int + 256 + 0.097755478999999923 + + + int + 256 + 0.085452795000000012 + + + int + 256 + 0.17952716699999993 + + + int + 256 + 0.178897155 + + + int + 256 + 0.17744515400000002 + + + int + 256 + 0.18380319199999995 + + + int + 256 + 0.090120586000000003 + + + int + 256 + 0.20748273 + + + int + 256 + 0.121544734 + + + int + 256 + 0.097762067000000008 + + + int + 256 + 0.17140295499999991 + + + int + 256 + 0.17661355500000001 + + + int + 256 + 0.123409586 + + + int + 256 + 0.18124515800000002 + + + int + 256 + 0.17018973100000001 + + + int + 256 + 0.16837838000000002 + + + int + 256 + 0.090471122000000001 + + + int + 256 + 0.18274939500000001 + + + int + 256 + 0.170376201 + + + int + 256 + 0.086761270000000001 + + + int + 256 + 0.07082036600000001 + + + int + 256 + 0.090469033000000004 + + + int + 256 + 0.17457247199999992 + + + int + 256 + 0.085507465000000005 + + + int + 256 + 0.086006947 + + + int + 256 + 0.091171989000000009 + + + int + 256 + 0.087034903000000011 + + + int + 256 + 0.12438318900000001 + + + int + 256 + 0.091942750000000004 + + + int + 256 + 0.085740925000000009 + + + int + 256 + 0.11181491799999999 + + + int + 256 + 0.114592052 + + + int + 256 + 0.14088795500000001 + + + int + 256 + 0.11735219499999994 + + + int + 256 + 0.172994324 + + + int + 256 + 0.14173148300000002 + + + int + 256 + 0.13917877400000001 + + + int + 256 + 0.14680699700000002 + + + int + 256 + 0.10930996100000001 + + + int + 256 + 0.144352757 + + + int + 256 + 0.088056063000000004 + + + int + 256 + 0.086860233000000009 + + + int + 256 + 0.1702753629999999 + + + int + 256 + 0.086362106000000008 + + + int + 256 + 0.085859911000000011 + + + int + 256 + 0.085879831000000004 + + + int + 256 + 0.12267887299999991 + + + int + 256 + 0.098423322000000008 + + + int + 256 + 0.153468932 + + + int + 256 + 0.122094645 + + + int + 256 + 0.11257624400000001 + + + int + 256 + 0.160093242 + + + int + 256 + 0.10990803 + + + int + 256 + 0.16383646200000002 + + + int + 256 + 0.10992213000000001 + + + int + 256 + 0.15929886000000001 + + + int + 256 + 0.14134709300000001 + + + int + 256 + 0.08445474900000001 + + + int + 256 + 0.087441700000000011 + + + int + 256 + 0.085373326999999999 + + + int + 256 + 0.16715591000000002 + + + int + 256 + 0.151999576 + + + int + 256 + 0.17614413999999989 + + + int + 256 + 0.096750264000000002 + + + int + 256 + 0.085893666000000007 + + + int + 256 + 0.17629694000000001 + + + int + 256 + 0.16497436300000001 + + + int + 256 + 0.086379006000000008 + + + int + 256 + 0.08848594600000001 + + + int + 256 + 0.068952251000000006 + + + int + 256 + 0.177542798 + + + int + 256 + 0.12553706100000001 + + + int + 256 + 0.15891637 + + + int + 256 + 0.086406062000000006 + + + int + 256 + 0.085517463000000002 + + + int + 256 + 0.13787316499999991 + + + int + 256 + 0.085759060000000012 + + + int + 256 + 0.156784109 + + + int + 256 + 0.085655992 + + + int + 256 + 0.100888635 + + + int + 256 + 0.15356141700000001 + + + int + 256 + 0.15893653900000002 + + + int + 256 + 0.17356975800000002 + + + int + 256 + 0.15669519600000001 + + + int + 256 + 0.14556728399999996 + + + int + 256 + 0.14882284900000001 + + + int + 256 + 0.085451261000000001 + + + int + 256 + 0.144400527 + + + int + 256 + 0.14155816700000001 + + + int + 256 + 0.14364901800000002 + + + int + 256 + 0.16980553100000001 + + + int + 256 + 0.15952327000000002 + + + int + 256 + 0.087087096999999947 + + + int + 256 + 0.114074747 + + + int + 256 + 0.083433352000000002 + + + int + 256 + 0.109351719 + + + int + 256 + 0.087319604000000009 + + + int + 256 + 0.16535071099999998 + + + int + 256 + 0.085455526000000004 + + + int + 256 + 0.085924925999999999 + + + int + 256 + 0.088723519000000001 + + + int + 256 + 0.11805582100000001 + + + int + 256 + 0.086636225999999983 + + + int + 256 + 0.075564457000000002 + + + int + 256 + 0.074940988 + + + int + 256 + 0.093248515000000004 + + + int + 256 + 0.14556818800000002 + + + int + 256 + 0.12369044300000001 + + + int + 256 + 0.14557024000000002 + + + int + 256 + 0.1763824719999999 + + + int + 256 + 0.14606613100000002 + + + int + 256 + 0.14864195300000002 + + + int + 256 + 0.16122792900000002 + + + int + 256 + 0.18750939500000002 + + + int + 256 + 0.159254863 + + + int + 256 + 0.12342580800000001 + + + int + 256 + 0.069498242000000002 + + + int + 256 + 0.068196053000000006 + + + int + 256 + 0.08690642400000001 + + + int + 256 + 0.083593906000000009 + + + diff --git a/src/boost/libs/serialization/performance/xml/int256_test.cpp b/src/boost/libs/serialization/performance/xml/int256_test.cpp new file mode 100644 index 000000000..91bd8e5c6 --- /dev/null +++ b/src/boost/libs/serialization/performance/xml/int256_test.cpp @@ -0,0 +1,20 @@ +/* /libs/serialization/xml_performance/int25_test.cpp ************************** + +(C) Copyright 2010 Bryce Lelbach + +Use, modification and distribution is subject to the Boost Software License, +Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) + +*******************************************************************************/ + +#define BSL_TYPE int +#define BSL_DEPTH 4 +#define BSL_ROUNDS 256 +#define BSL_NODE_MAX 4 +#define BSL_SAVE_TMPFILE 0 + +#include "harness.hpp" + +BSL_MAIN + diff --git a/src/boost/libs/serialization/performance/xml/int4_results.xml b/src/boost/libs/serialization/performance/xml/int4_results.xml new file mode 100644 index 000000000..0c403eb13 --- /dev/null +++ b/src/boost/libs/serialization/performance/xml/int4_results.xml @@ -0,0 +1,1291 @@ + + + + + GNU C++ version 4.5.1 20100617 (prerelease) + linux + + 256 + 0 + + int + 4 + 0.0064683200000000005 + + + int + 4 + 0.0013484810000000001 + + + int + 4 + 0.0012968400000000001 + + + int + 4 + 0.0012938400000000001 + + + int + 4 + 0.001321881 + + + int + 4 + 0.0012813600000000001 + + + int + 4 + 0.0012798400000000002 + + + int + 4 + 0.00128432 + + + int + 4 + 0.0013019210000000002 + + + int + 4 + 0.0012802800000000002 + + + int + 4 + 0.00128484 + + + int + 4 + 0.001293043 + + + int + 4 + 0.00128148 + + + int + 4 + 0.0012812800000000001 + + + int + 4 + 0.0012898830000000001 + + + int + 4 + 0.0012836800000000002 + + + int + 4 + 0.00128812 + + + int + 4 + 0.001305481 + + + int + 4 + 0.00128188 + + + int + 4 + 0.00129484 + + + int + 4 + 0.0013052410000000002 + + + int + 4 + 0.0012850400000000001 + + + int + 4 + 0.0012983600000000001 + + + int + 4 + 0.0012958010000000001 + + + int + 4 + 0.0012928400000000002 + + + int + 4 + 0.0012897200000000001 + + + int + 4 + 0.0013186410000000002 + + + int + 4 + 0.00128724 + + + int + 4 + 0.0012884400000000001 + + + int + 4 + 0.001303963 + + + int + 4 + 0.0012984000000000001 + + + int + 4 + 0.0013423600000000001 + + + int + 4 + 0.00130412 + + + int + 4 + 0.0013056810000000002 + + + int + 4 + 0.00128388 + + + int + 4 + 0.0012844 + + + int + 4 + 0.0012939210000000002 + + + int + 4 + 0.0012815200000000002 + + + int + 4 + 0.0012848800000000002 + + + int + 4 + 0.0012886810000000001 + + + int + 4 + 0.0012767200000000001 + + + int + 4 + 0.0012861600000000002 + + + int + 4 + 0.0012976020000000001 + + + int + 4 + 0.00127812 + + + int + 4 + 0.00128808 + + + int + 4 + 0.0012958430000000001 + + + int + 4 + 0.0012735600000000002 + + + int + 4 + 0.00129024 + + + int + 4 + 0.0012937630000000001 + + + int + 4 + 0.001314801 + + + int + 4 + 0.00128812 + + + int + 4 + 0.0012858400000000001 + + + int + 4 + 0.001299681 + + + int + 4 + 0.00128736 + + + int + 4 + 0.0012926400000000001 + + + int + 4 + 0.0013075610000000001 + + + int + 4 + 0.0012856 + + + int + 4 + 0.0012841200000000001 + + + int + 4 + 0.0013007210000000001 + + + int + 4 + 0.0012770400000000001 + + + int + 4 + 0.0012774800000000001 + + + int + 4 + 0.0012995630000000001 + + + int + 4 + 0.0012760800000000002 + + + int + 4 + 0.0013167200000000002 + + + int + 4 + 0.001299803 + + + int + 4 + 0.00130152 + + + int + 4 + 0.0012791600000000001 + + + int + 4 + 0.00128444 + + + int + 4 + 0.0012910810000000001 + + + int + 4 + 0.0012824800000000001 + + + int + 4 + 0.0012862000000000001 + + + int + 4 + 0.0012863600000000001 + + + int + 4 + 0.0012840400000000002 + + + int + 4 + 0.0012963220000000001 + + + int + 4 + 0.0012926400000000001 + + + int + 4 + 0.00128604 + + + int + 4 + 0.001302683 + + + int + 4 + 0.0012925600000000001 + + + int + 4 + 0.0012863200000000001 + + + int + 4 + 0.0012868000000000001 + + + int + 4 + 0.001301803 + + + int + 4 + 0.0012945600000000002 + + + int + 4 + 0.0012883200000000001 + + + int + 4 + 0.0013074010000000001 + + + int + 4 + 0.00128652 + + + int + 4 + 0.00128524 + + + int + 4 + 0.0013003210000000001 + + + int + 4 + 0.001289 + + + int + 4 + 0.0012887600000000001 + + + int + 4 + 0.0012898010000000001 + + + int + 4 + 0.0012779200000000001 + + + int + 4 + 0.001284 + + + int + 4 + 0.0013036830000000001 + + + int + 4 + 0.0012790400000000002 + + + int + 4 + 0.00128232 + + + int + 4 + 0.0012894430000000001 + + + int + 4 + 0.0013535600000000002 + + + int + 4 + 0.0012924400000000002 + + + int + 4 + 0.001294201 + + + int + 4 + 0.0012804800000000001 + + + int + 4 + 0.00128228 + + + int + 4 + 0.001305081 + + + int + 4 + 0.0012888400000000001 + + + int + 4 + 0.0012826000000000001 + + + int + 4 + 0.0013026020000000001 + + + int + 4 + 0.0012876400000000001 + + + int + 4 + 0.0012842400000000001 + + + int + 4 + 0.001301321 + + + int + 4 + 0.0012849600000000001 + + + int + 4 + 0.0012959600000000001 + + + int + 4 + 0.0012933600000000001 + + + int + 4 + 0.0012845600000000001 + + + int + 4 + 0.0012874800000000001 + + + int + 4 + 0.0012894 + + + int + 4 + 0.001298881 + + + int + 4 + 0.0012834000000000001 + + + int + 4 + 0.00128652 + + + int + 4 + 0.0013008010000000001 + + + int + 4 + 0.00128472 + + + int + 4 + 0.00128644 + + + int + 4 + 0.0012989620000000001 + + + int + 4 + 0.0012816000000000001 + + + int + 4 + 0.0012825200000000001 + + + int + 4 + 0.0012950820000000001 + + + int + 4 + 0.00128012 + + + int + 4 + 0.0012857600000000002 + + + int + 4 + 0.001298883 + + + int + 4 + 0.00127972 + + + int + 4 + 0.0013221600000000002 + + + int + 4 + 0.001299283 + + + int + 4 + 0.0012888000000000001 + + + int + 4 + 0.0012896400000000001 + + + int + 4 + 0.001294601 + + + int + 4 + 0.0012852 + + + int + 4 + 0.0012851200000000001 + + + int + 4 + 0.001312281 + + + int + 4 + 0.0012859600000000001 + + + int + 4 + 0.00139204 + + + int + 4 + 0.001303081 + + + int + 4 + 0.0012967200000000001 + + + int + 4 + 0.0012925200000000001 + + + int + 4 + 0.0012986430000000001 + + + int + 4 + 0.0012917200000000001 + + + int + 4 + 0.0012922000000000001 + + + int + 4 + 0.001318963 + + + int + 4 + 0.00128648 + + + int + 4 + 0.001284 + + + int + 4 + 0.001299641 + + + int + 4 + 0.0014884800000000001 + + + int + 4 + 0.0012899600000000002 + + + int + 4 + 0.0012945610000000001 + + + int + 4 + 0.00128808 + + + int + 4 + 0.00137524 + + + int + 4 + 0.00129112 + + + int + 4 + 0.0012960020000000001 + + + int + 4 + 0.00127808 + + + int + 4 + 0.0012879200000000001 + + + int + 4 + 0.0012991210000000001 + + + int + 4 + 0.00128476 + + + int + 4 + 0.0012820400000000001 + + + int + 4 + 0.001311083 + + + int + 4 + 0.00136856 + + + int + 4 + 0.0013016800000000002 + + + int + 4 + 0.0012952410000000001 + + + int + 4 + 0.0012880000000000001 + + + int + 4 + 0.00128732 + + + int + 4 + 0.0012946000000000001 + + + int + 4 + 0.0013174810000000001 + + + int + 4 + 0.0012829200000000001 + + + int + 4 + 0.0012948 + + + int + 4 + 0.001307601 + + + int + 4 + 0.00128432 + + + int + 4 + 0.0012834000000000001 + + + int + 4 + 0.0012954820000000001 + + + int + 4 + 0.00128104 + + + int + 4 + 0.0012853200000000002 + + + int + 4 + 0.0013023630000000002 + + + int + 4 + 0.00127676 + + + int + 4 + 0.0012791600000000001 + + + int + 4 + 0.00128604 + + + int + 4 + 0.00127564 + + + int + 4 + 0.0012862800000000001 + + + int + 4 + 0.0012893610000000002 + + + int + 4 + 0.0012794400000000002 + + + int + 4 + 0.0012824800000000001 + + + int + 4 + 0.001308121 + + + int + 4 + 0.0012832000000000002 + + + int + 4 + 0.0012821200000000001 + + + int + 4 + 0.0012924810000000001 + + + int + 4 + 0.0012824800000000001 + + + int + 4 + 0.00127892 + + + int + 4 + 0.001298443 + + + int + 4 + 0.0012879600000000001 + + + int + 4 + 0.0012920800000000001 + + + int + 4 + 0.0028338400000000002 + + + int + 4 + 0.0013351200000000002 + + + int + 4 + 0.0013108810000000001 + + + int + 4 + 0.0012887600000000001 + + + int + 4 + 0.0012856 + + + int + 4 + 0.0012970010000000001 + + + int + 4 + 0.0012761200000000002 + + + int + 4 + 0.00127644 + + + int + 4 + 0.0012980820000000001 + + + int + 4 + 0.00127684 + + + int + 4 + 0.0012760800000000002 + + + int + 4 + 0.001297201 + + + int + 4 + 0.00127648 + + + int + 4 + 0.0012804800000000001 + + + int + 4 + 0.0012903230000000001 + + + int + 4 + 0.0012802800000000002 + + + int + 4 + 0.0012727600000000002 + + + int + 4 + 0.0012685050000000001 + + + int + 4 + 0.0012786400000000002 + + + int + 4 + 0.0012832400000000002 + + + int + 4 + 0.0012928410000000001 + + + int + 4 + 0.0012786800000000001 + + + int + 4 + 0.0012866400000000001 + + + int + 4 + 0.0012979200000000001 + + + int + 4 + 0.0013046820000000002 + + + int + 4 + 0.0012878000000000002 + + + int + 4 + 0.0012865600000000002 + + + int + 4 + 0.0012973220000000001 + + + int + 4 + 0.0012819600000000002 + + + int + 4 + 0.0012832000000000002 + + + int + 4 + 0.0013041630000000001 + + + int + 4 + 0.0012849200000000002 + + + int + 4 + 0.0013826000000000001 + + + int + 4 + 0.0013183230000000002 + + + int + 4 + 0.0012816800000000001 + + + int + 4 + 0.0012865600000000002 + + + int + 4 + 0.0012882010000000001 + + + int + 4 + 0.0012740000000000002 + + + int + 4 + 0.00127808 + + + int + 4 + 0.001292762 + + + int + 4 + 0.0012758000000000001 + + + int + 4 + 0.00127684 + + + int + 4 + 0.0012998010000000002 + + + int + 4 + 0.0012753200000000001 + + + int + 4 + 0.001276 + + + int + 4 + 0.0012916830000000001 + + + int + 4 + 0.0012774800000000001 + + + int + 4 + 0.0012794800000000002 + + + int + 4 + 0.0012958830000000001 + + + int + 4 + 0.0012859200000000001 + + + int + 4 + 0.0012798 + + + int + 4 + 0.001303401 + + + int + 4 + 0.00128304 + + + int + 4 + 0.0012883200000000001 + + + int + 4 + 0.001291761 + + + int + 4 + 0.0012875200000000001 + + + int + 4 + 0.0012957600000000002 + + + int + 4 + 0.00129184 + + + int + 4 + 0.0013144820000000001 + + + int + 4 + 0.0012892800000000001 + + + int + 4 + 0.0012874400000000002 + + + int + 4 + 0.0012954830000000001 + + + diff --git a/src/boost/libs/serialization/performance/xml/int4_test.cpp b/src/boost/libs/serialization/performance/xml/int4_test.cpp new file mode 100644 index 000000000..26db6a1f7 --- /dev/null +++ b/src/boost/libs/serialization/performance/xml/int4_test.cpp @@ -0,0 +1,20 @@ +/* /libs/serialization/xml_performance/int5_test.cpp *************************** + +(C) Copyright 2010 Bryce Lelbach + +Use, modification and distribution is subject to the Boost Software License, +Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) + +*******************************************************************************/ + +#define BSL_TYPE int +#define BSL_DEPTH 1 +#define BSL_ROUNDS 256 +#define BSL_NODE_MAX 4 +#define BSL_SAVE_TMPFILE 0 + +#include "harness.hpp" + +BSL_MAIN + diff --git a/src/boost/libs/serialization/performance/xml/int64_results.xml b/src/boost/libs/serialization/performance/xml/int64_results.xml new file mode 100644 index 000000000..0234be96e --- /dev/null +++ b/src/boost/libs/serialization/performance/xml/int64_results.xml @@ -0,0 +1,1291 @@ + + + + + GNU C++ version 4.5.1 20100617 (prerelease) + linux + + 256 + 0 + + int + 64 + 0.019669446 + + + int + 64 + 0.014487284000000001 + + + int + 64 + 0.014522886 + + + int + 64 + 0.014541604000000001 + + + int + 64 + 0.014511724 + + + int + 64 + 0.014433683000000001 + + + int + 64 + 0.014422160000000002 + + + int + 64 + 0.014430572000000001 + + + int + 64 + 0.014482052 + + + int + 64 + 0.014466769000000001 + + + int + 64 + 0.014473404 + + + int + 64 + 0.014467164000000001 + + + int + 64 + 0.014443046000000001 + + + int + 64 + 0.014502884000000001 + + + int + 64 + 0.014437164000000001 + + + int + 64 + 0.014470963000000002 + + + int + 64 + 0.014436202 + + + int + 64 + 0.014684172000000001 + + + int + 64 + 0.014476372000000001 + + + int + 64 + 0.014445972000000001 + + + int + 64 + 0.014496126000000002 + + + int + 64 + 0.014419045 + + + int + 64 + 0.014431766 + + + int + 64 + 0.014509245 + + + int + 64 + 0.014461203000000001 + + + int + 64 + 0.014438964 + + + int + 64 + 0.014516004000000001 + + + int + 64 + 0.014467052000000001 + + + int + 64 + 0.014451089 + + + int + 64 + 0.014470532000000001 + + + int + 64 + 0.014495084 + + + int + 64 + 0.014541806000000001 + + + int + 64 + 0.014538686 + + + int + 64 + 0.014557006000000001 + + + int + 64 + 0.014515684000000001 + + + int + 64 + 0.014478643000000001 + + + int + 64 + 0.014463043 + + + int + 64 + 0.014503089 + + + int + 64 + 0.014455809000000002 + + + int + 64 + 0.014486252000000002 + + + int + 64 + 0.014485492000000001 + + + int + 64 + 0.014489486000000001 + + + int + 64 + 0.014524406 + + + int + 64 + 0.014491006000000001 + + + int + 64 + 0.014503724000000001 + + + int + 64 + 0.014480844000000001 + + + int + 64 + 0.014498644000000002 + + + int + 64 + 0.014424628 + + + int + 64 + 0.014758172000000002 + + + int + 64 + 0.014486449 + + + int + 64 + 0.014480489000000001 + + + int + 64 + 0.014488966000000001 + + + int + 64 + 0.014479684000000001 + + + int + 64 + 0.014487846 + + + int + 64 + 0.014490003000000001 + + + int + 64 + 0.014495404000000002 + + + int + 64 + 0.014468323000000002 + + + int + 64 + 0.014482585000000001 + + + int + 64 + 0.014458649000000001 + + + int + 64 + 0.014433292 + + + int + 64 + 0.014510932000000001 + + + int + 64 + 0.014445526 + + + int + 64 + 0.014448486000000002 + + + int + 64 + 0.014487125000000002 + + + int + 64 + 0.014460044000000002 + + + int + 64 + 0.014419084 + + + int + 64 + 0.014461804000000002 + + + int + 64 + 0.014440065 + + + int + 64 + 0.014518092000000002 + + + int + 64 + 0.014421129000000001 + + + int + 64 + 0.014449812000000001 + + + int + 64 + 0.014491406 + + + int + 64 + 0.014498206000000001 + + + int + 64 + 0.014493726 + + + int + 64 + 0.014491084000000001 + + + int + 64 + 0.014521844000000001 + + + int + 64 + 0.014434484000000001 + + + int + 64 + 0.01446416 + + + int + 64 + 0.014464689000000001 + + + int + 64 + 0.014509292000000002 + + + int + 64 + 0.014446532000000002 + + + int + 64 + 0.014462526000000002 + + + int + 64 + 0.014507046000000001 + + + int + 64 + 0.014492486000000001 + + + int + 64 + 0.014478405000000001 + + + int + 64 + 0.014495164000000001 + + + int + 64 + 0.014410804000000001 + + + int + 64 + 0.014448363000000001 + + + int + 64 + 0.014446089 + + + int + 64 + 0.014426529 + + + int + 64 + 0.014439369000000001 + + + int + 64 + 0.014481006000000001 + + + int + 64 + 0.014549005 + + + int + 64 + 0.014524126 + + + int + 64 + 0.014579886 + + + int + 64 + 0.014504884000000001 + + + int + 64 + 0.014479804000000001 + + + int + 64 + 0.014504883000000001 + + + int + 64 + 0.014493212 + + + int + 64 + 0.01452561199999991 + + + int + 64 + 0.014501612000000001 + + + int + 64 + 0.014468292000000001 + + + int + 64 + 0.014477526000000001 + + + int + 64 + 0.014580486 + + + int + 64 + 0.014502485000000001 + + + int + 64 + 0.014492244000000001 + + + int + 64 + 0.014523443 + + + int + 64 + 0.014456803000000001 + + + int + 64 + 0.014578564 + + + int + 64 + 0.014513652 + + + int + 64 + 0.014602012000000001 + + + int + 64 + 0.014517612000000001 + + + int + 64 + 0.014438726000000001 + + + int + 64 + 0.014636246 + + + int + 64 + 0.014512446000000002 + + + int + 64 + 0.014496724000000001 + + + int + 64 + 0.014508804 + + + int + 64 + 0.014463284000000002 + + + int + 64 + 0.014476564000000001 + + + int + 64 + 0.014486652000000001 + + + int + 64 + 0.014519532000000002 + + + int + 64 + 0.014501529000000001 + + + int + 64 + 0.014499489000000001 + + + int + 64 + 0.014508846000000001 + + + int + 64 + 0.014486965000000001 + + + int + 64 + 0.014604445000000001 + + + int + 64 + 0.014466683000000001 + + + int + 64 + 0.014418044000000001 + + + int + 64 + 0.014486163000000002 + + + int + 64 + 0.014435129000000001 + + + int + 64 + 0.014433848999999888 + + + int + 64 + 0.014466412000000001 + + + int + 64 + 0.014421729000000001 + + + int + 64 + 0.014503366 + + + int + 64 + 0.014473445000000001 + + + int + 64 + 0.014462526000000002 + + + int + 64 + 0.014440163000000001 + + + int + 64 + 0.014511683000000001 + + + int + 64 + 0.014473923000000001 + + + int + 64 + 0.014486921000000002 + + + int + 64 + 0.014494692000000002 + + + int + 64 + 0.014464452000000001 + + + int + 64 + 0.014510572000000001 + + + int + 64 + 0.014450526000000002 + + + int + 64 + 0.014446524000000001 + + + int + 64 + 0.014475006 + + + int + 64 + 0.014495605000000002 + + + int + 64 + 0.014441004 + + + int + 64 + 0.014513924000000001 + + + int + 64 + 0.014508523000000001 + + + int + 64 + 0.014639452000000001 + + + int + 64 + 0.014492212000000001 + + + int + 64 + 0.014475649 + + + int + 64 + 0.014522406000000002 + + + int + 64 + 0.014492246 + + + int + 64 + 0.014547646000000001 + + + int + 64 + 0.014526446 + + + int + 64 + 0.014550083 + + + int + 64 + 0.014535804000000001 + + + int + 64 + 0.014513963000000001 + + + int + 64 + 0.014525052 + + + int + 64 + 0.014477651999999952 + + + int + 64 + 0.014536052000000001 + + + int + 64 + 0.014505209000000002 + + + int + 64 + 0.014549046000000001 + + + int + 64 + 0.014494046000000002 + + + int + 64 + 0.014543766000000001 + + + int + 64 + 0.014517763000000001 + + + int + 64 + 0.014560324000000001 + + + int + 64 + 0.014490044000000001 + + + int + 64 + 0.01452084 + + + int + 64 + 0.014468092 + + + int + 64 + 0.014456372 + + + int + 64 + 0.014464052000000002 + + + int + 64 + 0.014488444000000001 + + + int + 64 + 0.014533046000000001 + + + int + 64 + 0.014455205 + + + int + 64 + 0.014468363000000001 + + + int + 64 + 0.014420884 + + + int + 64 + 0.014514723 + + + int + 64 + 0.014476803000000002 + + + int + 64 + 0.014691652000000001 + + + int + 64 + 0.014528652000000001 + + + int + 64 + 0.014488212 + + + int + 64 + 0.014486725000000001 + + + int + 64 + 0.014492484000000002 + + + int + 64 + 0.014512206000000001 + + + int + 64 + 0.014477606000000001 + + + int + 64 + 0.014445083000000001 + + + int + 64 + 0.014434764000000001 + + + int + 64 + 0.014466163000000001 + + + int + 64 + 0.014462852000000002 + + + int + 64 + 0.014470572000000001 + + + int + 64 + 0.014492972000000002 + + + int + 64 + 0.014462692000000001 + + + int + 64 + 0.014505326000000001 + + + int + 64 + 0.014498126 + + + int + 64 + 0.014515127000000001 + + + int + 64 + 0.014505484000000001 + + + int + 64 + 0.014550483000000001 + + + int + 64 + 0.014492964000000001 + + + int + 64 + 0.014474105000000001 + + + int + 64 + 0.014491652000000001 + + + int + 64 + 0.014511252000000001 + + + int + 64 + 0.014481772 + + + int + 64 + 0.014490206 + + + int + 64 + 0.014557166000000002 + + + int + 64 + 0.014467925000000001 + + + int + 64 + 0.014520123000000001 + + + int + 64 + 0.014490163 + + + int + 64 + 0.014529804 + + + int + 64 + 0.014479643 + + + int + 64 + 0.014665332000000001 + + + int + 64 + 0.014451529000000001 + + + int + 64 + 0.014474492 + + + int + 64 + 0.014458326000000001 + + + int + 64 + 0.014478766000000001 + + + int + 64 + 0.014512045000000001 + + + int + 64 + 0.014480244000000001 + + + int + 64 + 0.014506004000000001 + + + int + 64 + 0.014465164000000001 + + + int + 64 + 0.014486164000000001 + + + int + 64 + 0.014495092000000001 + + + int + 64 + 0.014493612000000001 + + + int + 64 + 0.014517529000000001 + + + int + 64 + 0.014456050000000002 + + + int + 64 + 0.014505726 + + + int + 64 + 0.014472166000000002 + + + int + 64 + 0.014522446000000001 + + + int + 64 + 0.014501124000000001 + + + int + 64 + 0.014496084000000001 + + + int + 64 + 0.014433204000000002 + + + int + 64 + 0.015052948000000002 + + + int + 64 + 0.014451772000000002 + + + int + 64 + 0.014503892000000001 + + + int + 64 + 0.014487729000000001 + + + int + 64 + 0.014457845 + + + int + 64 + 0.014468924000000001 + + + int + 64 + 0.014471005 + + + int + 64 + 0.014513285000000001 + + + int + 64 + 0.014458324000000002 + + + int + 64 + 0.014509163 + + + int + 64 + 0.014488203000000002 + + + int + 64 + 0.014733972000000001 + + + int + 64 + 0.014396972000000001 + + + int + 64 + 0.014481252000000002 + + + int + 64 + 0.014464165000000001 + + + int + 64 + 0.014463646 + + + int + 64 + 0.014520247000000002 + + + int + 64 + 0.014405925000000002 + + + int + 64 + 0.014428203000000001 + + + int + 64 + 0.014457364 + + + int + 64 + 0.014505124000000001 + + + int + 64 + 0.014459212000000001 + + + int + 64 + 0.014439049000000001 + + + int + 64 + 0.014547252 + + + diff --git a/src/boost/libs/serialization/performance/xml/int64_test.cpp b/src/boost/libs/serialization/performance/xml/int64_test.cpp new file mode 100644 index 000000000..f7a51e333 --- /dev/null +++ b/src/boost/libs/serialization/performance/xml/int64_test.cpp @@ -0,0 +1,20 @@ +/* /libs/serialization/xml_performance/int25_test.cpp ************************** + +(C) Copyright 2010 Bryce Lelbach + +Use, modification and distribution is subject to the Boost Software License, +Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) + +*******************************************************************************/ + +#define BSL_TYPE int +#define BSL_DEPTH 3 +#define BSL_ROUNDS 256 +#define BSL_NODE_MAX 4 +#define BSL_SAVE_TMPFILE 0 + +#include "harness.hpp" + +BSL_MAIN + diff --git a/src/boost/libs/serialization/performance/xml/macro.hpp b/src/boost/libs/serialization/performance/xml/macro.hpp new file mode 100644 index 000000000..6f8cbf963 --- /dev/null +++ b/src/boost/libs/serialization/performance/xml/macro.hpp @@ -0,0 +1,229 @@ +/* /libs/serialization/xml_performance/macro.hpp ******************************* + +(C) Copyright 2010 Bryce Lelbach + +Use, modification and distribution is subject to the Boost Software License, +Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) + +*******************************************************************************/ + +#if !defined(BOOST_SERIALIZATION_XML_PERFORMANCE_MACRO_HPP) +#define BOOST_SERIALIZATION_XML_PERFORMANCE_MACRO_HPP + +#if defined(_MSC_VER) + #pragma once +#endif + +#include + +#if !defined(BSL_NODE_MAX) + #define BSL_NODE_MAX 4 +#endif + +#if !defined(BSL_DEPTH) + #define BSL_DEPTH 2 +#endif + +#if !defined(BSL_ROUNDS) + #define BSL_ROUNDS 256 +#endif + +#if !defined(BSL_TYPE) + #define BSL_TYPE int +#endif + +#if !defined(BSL_SAVE_TMPFILE) + #define BSL_SAVE_TMPFILE 0 +#endif + +#if !defined(BSL_RESULTS_FILE) + #define BSL_RESULTS_FILE \ + BOOST_PP_STRINGIZE(BSL_TYPE) \ + BOOST_PP_STRINGIZE(BSL_EXP(BSL_NODE_MAX, BSL_DEPTH)) \ + "_results.xml" \ + /**/ +#endif + +// utility print macro + +#define BSL_PRINT(Z, N, T) T + +// preprocessor power function, BSL_EXP + +#define BSL_EXP_PRED(B, D) BOOST_PP_TUPLE_ELEM(3, 0, D) + +#define BSL_EXP_OP(B, D) \ + ( \ + BOOST_PP_DEC(BOOST_PP_TUPLE_ELEM(3, 0, D)), \ + BOOST_PP_TUPLE_ELEM(3, 1, D), \ + BOOST_PP_MUL_D( \ + B, \ + BOOST_PP_TUPLE_ELEM(3, 2, D), \ + BOOST_PP_TUPLE_ELEM(3, 1, D) \ + ) \ + ) \ + /**/ + +#define BSL_EXP(X, N) \ + BOOST_PP_TUPLE_ELEM( \ + 3, 2, BOOST_PP_WHILE(BSL_EXP_PRED, BSL_EXP_OP, (N, X, 1)) \ + ) \ + /**/ + +// boost::archive::xml::node macros + +#define BSL_NODE_DECL_MEMBER(Z, N, _) T ## N element ## N ; +#define BSL_NODE_DECL_NONE(Z, N, _) unused_type element ## N ; +#define BSL_NODE_xDECL_CTOR() node (void) { } + +#define BSL_NODE_DECL_CTOR(P) \ + BOOST_PP_IF(P, \ + BSL_NODE_xDECL_CTOR, \ + BOOST_PP_EMPTY \ + )() \ + /**/ + +#define BSL_NODE_SERIALIZE(Z, N, _) \ + & BOOST_SERIALIZATION_NVP(BOOST_PP_CAT(element, N)) \ + /**/ + +#define BSL_NODE_INIT_LIST(Z, N, _) \ + BOOST_PP_COMMA_IF(N) BOOST_PP_CAT(element, N) \ + BOOST_PP_LPAREN() BOOST_PP_CAT(p, N) BOOST_PP_RPAREN() \ + /**/ + +#define BSL_NODE_DECL(Z, N, _) \ + template \ + struct node< \ + BOOST_PP_ENUM_PARAMS_Z(Z, N, T) \ + BOOST_PP_COMMA_IF(N) \ + BOOST_PP_ENUM_ ## Z(BOOST_PP_SUB(BSL_NODE_MAX, N), BSL_PRINT, unused_type) \ + > { \ + BOOST_PP_REPEAT_ ## Z(N, BSL_NODE_DECL_MEMBER, _) \ + \ + BOOST_PP_REPEAT_FROM_TO_ ## Z(N, BSL_NODE_MAX, BSL_NODE_DECL_NONE, _) \ + \ + template \ + void serialize (ARC& ar, const unsigned int) { \ + ar BOOST_PP_REPEAT_ ## Z(N, BSL_NODE_SERIALIZE, _); \ + } \ + \ + BSL_NODE_DECL_CTOR(N) \ + \ + node (BOOST_PP_ENUM_BINARY_PARAMS_Z(Z, N, T, p)): \ + BOOST_PP_REPEAT_ ## Z(N, BSL_NODE_INIT_LIST, _) { } \ + }; \ + /**/ + +// instantiation macros + +#define BSL_INST_BASE(Z, N, L) \ + T0 T0 ## _ ## N(BOOST_PP_ENUM_ ## Z( \ + BSL_NODE_MAX, BSL_PRINT, \ + boost::archive::xml::random BOOST_PP_LPAREN() BOOST_PP_RPAREN() \ + )); \ + /**/ + +#define BSL_INST_yNODES(Z, N, L) \ + BOOST_PP_COMMA_IF(N) \ + BOOST_PP_CAT(T, \ + BOOST_PP_CAT(BOOST_PP_LIST_AT(L, 1), \ + BOOST_PP_CAT(_, \ + BOOST_PP_ADD(N, \ + BOOST_PP_LIST_AT(L, 0) \ + ) \ + ) \ + ) \ + ) \ + /**/ + +#define BSL_INST_xNODES(Z, N, L) \ + T ## L T ## L ## _ ## N( \ + BOOST_PP_REPEAT_ ## Z( \ + BSL_NODE_MAX, BSL_INST_yNODES, \ + (BOOST_PP_MUL(N, BSL_NODE_MAX), (BOOST_PP_SUB(L, 1), BOOST_PP_NIL)) \ + ) \ + ); \ + /**/ + +#define BSL_INST_NODES(Z, N, L) \ + BOOST_PP_REPEAT_ ## Z( \ + BSL_EXP(BSL_NODE_MAX, BOOST_PP_SUB(BSL_DEPTH, N)), \ + BSL_INST_xNODES, N \ + ) \ + /**/ + +#define BSL_TYPEDEF_NODES(Z, N, L) \ + typedef boost::archive::xml::node< \ + BOOST_PP_ENUM_ ## Z( \ + BSL_NODE_MAX, BSL_PRINT, BOOST_PP_CAT(T, BOOST_PP_SUB(N, 1)) \ + ) \ + > T ## N; \ + /**/ + +// main macro + +#define BSL_MAIN \ + int main (void) { \ + using namespace boost::archive; \ + using namespace boost::archive::xml; \ + \ + typedef node T0; \ + \ + BOOST_PP_REPEAT_FROM_TO(1, BSL_DEPTH, BSL_TYPEDEF_NODES, _) \ + \ + typedef node HEAD; \ + \ + result_set results; \ + std::size_t rounds = BSL_ROUNDS; \ + \ + while (rounds --> 0) { \ + BOOST_PP_REPEAT(BSL_EXP(BSL_NODE_MAX, BSL_DEPTH), BSL_INST_BASE, _) \ + \ + BOOST_PP_REPEAT_FROM_TO(1, BSL_DEPTH, BSL_INST_NODES, _) \ + \ + HEAD h(BOOST_PP_ENUM_PARAMS( \ + BSL_NODE_MAX, \ + BOOST_PP_CAT(T, BOOST_PP_CAT(BOOST_PP_SUB(BSL_DEPTH, 1), _)) \ + )); \ + \ + std::string fn = save_archive(h); \ + \ + std::pair r = restore_archive(fn); \ + \ + std::cout << "round " \ + << ((BSL_ROUNDS - 1) - rounds) \ + << " -> " << fn << "\n"; \ + \ + BOOST_PP_IF(BSL_SAVE_TMPFILE, \ + BOOST_PP_EMPTY(), \ + std::remove(fn.c_str()); \ + ) \ + \ + results.entries.push_back(entry( \ + BOOST_PP_STRINGIZE(BSL_TYPE), \ + BSL_EXP(BSL_NODE_MAX, BSL_DEPTH), r.first \ + )); \ + } \ + \ + std::fstream fs(BSL_RESULTS_FILE, std::fstream::in); \ + \ + if (fs.good()) { \ + xml_iarchive ia(fs); \ + ia >> BOOST_SERIALIZATION_NVP(results); \ + fs.close(); \ + } \ + \ + fs.open(BSL_RESULTS_FILE, std::fstream::out | std::fstream::trunc); \ + xml_oarchive oa(fs); \ + oa << BOOST_SERIALIZATION_NVP(results); \ + \ + fs.close(); \ + } \ + /**/ + +#endif // BOOST_SERIALIZATION_XML_PERFORMANCE_MACRO_HPP diff --git a/src/boost/libs/serialization/performance/xml/node.hpp b/src/boost/libs/serialization/performance/xml/node.hpp new file mode 100644 index 000000000..99f367597 --- /dev/null +++ b/src/boost/libs/serialization/performance/xml/node.hpp @@ -0,0 +1,63 @@ +/* /libs/serialization/xml_performance/node.hpp ******************************** + +(C) Copyright 2010 Bryce Lelbach + +Use, modification and distribution is subject to the Boost Software License, +Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) + +*******************************************************************************/ + +#if !defined(BOOST_SERIALIZATION_XML_PERFORMANCE_NODE_HPP) +#define BOOST_SERIALIZATION_XML_PERFORMANCE_NODE_HPP + +#if defined(_MSC_VER) + #pragma once +#endif + +#include +#include +#include +#include + +#include "macro.hpp" + +namespace boost { +namespace archive { +namespace xml { + +struct unused_type { }; + +template< + typename T, + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + BOOST_PP_SUB(BSL_NODE_MAX, 1), typename T, unused_type + ) +> struct node; + +BOOST_PP_REPEAT_FROM_TO(1, BSL_NODE_MAX, BSL_NODE_DECL, _) + +template +struct node { + BOOST_PP_REPEAT(BSL_NODE_MAX, BSL_NODE_DECL_MEMBER, _) + + template + void serialize (ARC& ar, const unsigned int) { + ar + BOOST_PP_REPEAT(BSL_NODE_MAX, BSL_NODE_SERIALIZE, _) + ; + } + + BSL_NODE_xDECL_CTOR() + + node (BOOST_PP_ENUM_BINARY_PARAMS(BSL_NODE_MAX, T, p)): + BOOST_PP_REPEAT(BSL_NODE_MAX, BSL_NODE_INIT_LIST, _) + { } +}; + +} // xml +} // archive +} // boost + +#endif // BOOST_SERIALIZATION_XML_PERFORMANCE_NODE_HPP + diff --git a/src/boost/libs/serialization/performance/xml/string16_results.xml b/src/boost/libs/serialization/performance/xml/string16_results.xml new file mode 100644 index 000000000..4113087b3 --- /dev/null +++ b/src/boost/libs/serialization/performance/xml/string16_results.xml @@ -0,0 +1,1291 @@ + + + + + GNU C++ version 4.5.1 20100617 (prerelease) + linux + + 256 + 0 + + string + 16 + 0.012478289 + + + string + 16 + 0.0072560000000000003 + + + string + 16 + 0.0072030420000000006 + + + string + 16 + 0.0071682020000000003 + + + string + 16 + 0.0071778060000000001 + + + string + 16 + 0.0072362460000000009 + + + string + 16 + 0.0071869220000000001 + + + string + 16 + 0.0071878830000000008 + + + string + 16 + 0.0071994860000000006 + + + string + 16 + 0.007244566 + + + string + 16 + 0.0071920810000000003 + + + string + 16 + 0.0072397640000000001 + + + string + 16 + 0.0071930430000000005 + + + string + 16 + 0.0071888830000000001 + + + string + 16 + 0.0071856820000000005 + + + string + 16 + 0.0071798830000000006 + + + string + 16 + 0.0071797230000000007 + + + string + 16 + 0.0071992860000000001 + + + string + 16 + 0.0072556420000000005 + + + string + 16 + 0.0072098020000000004 + + + string + 16 + 0.007207321 + + + string + 16 + 0.0072045260000000002 + + + string + 16 + 0.0071889830000000004 + + + string + 16 + 0.0071904010000000008 + + + string + 16 + 0.0071754830000000007 + + + string + 16 + 0.0072048060000000002 + + + string + 16 + 0.0072293660000000001 + + + string + 16 + 0.0072043620000000006 + + + string + 16 + 0.0072351230000000004 + + + string + 16 + 0.0072088830000000001 + + + string + 16 + 0.0071613630000000005 + + + string + 16 + 0.0071968020000000004 + + + string + 16 + 0.0072091630000000002 + + + string + 16 + 0.0071625610000000004 + + + string + 16 + 0.0071758860000000002 + + + string + 16 + 0.0072168020000000005 + + + string + 16 + 0.0072034020000000002 + + + string + 16 + 0.0071784030000000007 + + + string + 16 + 0.0072256860000000003 + + + string + 16 + 0.0072109220000000007 + + + string + 16 + 0.0071665210000000003 + + + string + 16 + 0.0072158430000000004 + + + string + 16 + 0.0072299660000000009 + + + string + 16 + 0.0072064680000000006 + + + string + 16 + 0.0071831220000000001 + + + string + 16 + 0.0071800030000000008 + + + string + 16 + 0.0072292860000000006 + + + string + 16 + 0.0071624430000000001 + + + string + 16 + 0.0071836820000000003 + + + string + 16 + 0.0072084030000000004 + + + string + 16 + 0.0071665620000000005 + + + string + 16 + 0.0072477660000000001 + + + string + 16 + 0.0072076020000000005 + + + string + 16 + 0.0072072030000000006 + + + string + 16 + 0.0072176030000000004 + + + string + 16 + 0.0071833660000000001 + + + string + 16 + 0.0071831220000000001 + + + string + 16 + 0.0071601210000000002 + + + string + 16 + 0.0072026430000000008 + + + string + 16 + 0.0071991260000000001 + + + string + 16 + 0.0072078410000000004 + + + string + 16 + 0.0072082020000000004 + + + string + 16 + 0.0071928830000000006 + + + string + 16 + 0.0071964460000000004 + + + string + 16 + 0.0071826460000000009 + + + string + 16 + 0.0071702020000000005 + + + string + 16 + 0.0071683230000000007 + + + string + 16 + 0.0071388030000000009 + + + string + 16 + 0.0072348860000000003 + + + string + 16 + 0.0071883620000000002 + + + string + 16 + 0.0071758410000000005 + + + string + 16 + 0.0071781630000000004 + + + string + 16 + 0.0071760060000000004 + + + string + 16 + 0.0072201620000000005 + + + string + 16 + 0.0071673630000000004 + + + string + 16 + 0.0071732830000000008 + + + string + 16 + 0.0071706460000000001 + + + string + 16 + 0.0072266420000000001 + + + string + 16 + 0.0072288420000000001 + + + string + 16 + 0.0072125630000000008 + + + string + 16 + 0.0072115630000000007 + + + string + 16 + 0.0071812000000000004 + + + string + 16 + 0.007202122 + + + string + 16 + 0.007167362 + + + string + 16 + 0.0072384060000000002 + + + string + 16 + 0.0072055260000000003 + + + string + 16 + 0.0072029620000000003 + + + string + 16 + 0.0071922830000000007 + + + string + 16 + 0.0071877260000000002 + + + string + 16 + 0.0072153660000000008 + + + string + 16 + 0.0072294010000000008 + + + string + 16 + 0.0071974830000000002 + + + string + 16 + 0.0071855230000000001 + + + string + 16 + 0.0071989230000000003 + + + string + 16 + 0.0072465620000000007 + + + string + 16 + 0.0071857230000000006 + + + string + 16 + 0.0072022430000000005 + + + string + 16 + 0.0072071660000000001 + + + string + 16 + 0.0072090020000000008 + + + string + 16 + 0.0072011620000000005 + + + string + 16 + 0.0072017610000000001 + + + string + 16 + 0.0071964060000000007 + + + string + 16 + 0.0072420000000000002 + + + string + 16 + 0.0071690410000000001 + + + string + 16 + 0.0071992430000000001 + + + string + 16 + 0.0071818460000000004 + + + string + 16 + 0.0071558030000000005 + + + string + 16 + 0.0071756420000000003 + + + string + 16 + 0.0072259230000000004 + + + string + 16 + 0.0071872860000000002 + + + string + 16 + 0.0072312860000000008 + + + string + 16 + 0.0072287620000000006 + + + string + 16 + 0.0071818030000000005 + + + string + 16 + 0.0071858810000000007 + + + string + 16 + 0.0071967260000000005 + + + string + 16 + 0.0071914020000000004 + + + string + 16 + 0.0071645210000000001 + + + string + 16 + 0.0071816830000000003 + + + string + 16 + 0.0071695260000000007 + + + string + 16 + 0.0072521220000000006 + + + string + 16 + 0.0072282020000000004 + + + string + 16 + 0.0072272830000000001 + + + string + 16 + 0.0072088460000000005 + + + string + 16 + 0.0071882650000000001 + + + string + 16 + 0.007179922 + + + string + 16 + 0.0072016430000000006 + + + string + 16 + 0.0071915230000000009 + + + string + 16 + 0.0072753260000000004 + + + string + 16 + 0.0072302020000000007 + + + string + 16 + 0.007209923 + + + string + 16 + 0.007189122 + + + string + 16 + 0.0072191260000000002 + + + string + 16 + 0.0072180020000000003 + + + string + 16 + 0.0071952810000000004 + + + string + 16 + 0.0071876430000000005 + + + string + 16 + 0.0071936060000000008 + + + string + 16 + 0.0072690820000000005 + + + string + 16 + 0.0072184420000000003 + + + string + 16 + 0.0072203630000000005 + + + string + 16 + 0.0071952060000000009 + + + string + 16 + 0.0071918810000000007 + + + string + 16 + 0.0071836420000000005 + + + string + 16 + 0.0072154830000000008 + + + string + 16 + 0.0071770830000000008 + + + string + 16 + 0.0072342460000000006 + + + string + 16 + 0.0072119220000000008 + + + string + 16 + 0.007218683 + + + string + 16 + 0.0072250430000000004 + + + string + 16 + 0.0072196860000000003 + + + string + 16 + 0.0072206420000000002 + + + string + 16 + 0.0072086820000000001 + + + string + 16 + 0.0072429630000000007 + + + string + 16 + 0.0072798060000000006 + + + string + 16 + 0.0072191220000000006 + + + string + 16 + 0.0072123220000000002 + + + string + 16 + 0.0071857230000000006 + + + string + 16 + 0.0071828060000000008 + + + string + 16 + 0.0071980010000000007 + + + string + 16 + 0.0072397220000000005 + + + string + 16 + 0.0072392030000000005 + + + string + 16 + 0.007219446 + + + string + 16 + 0.0072401210000000004 + + + string + 16 + 0.0072177220000000002 + + + string + 16 + 0.0072424830000000001 + + + string + 16 + 0.0071834030000000005 + + + string + 16 + 0.0072027260000000004 + + + string + 16 + 0.0071956820000000001 + + + string + 16 + 0.0072182430000000001 + + + string + 16 + 0.0071804460000000001 + + + string + 16 + 0.0072502860000000008 + + + string + 16 + 0.0072154820000000005 + + + string + 16 + 0.0072068410000000003 + + + string + 16 + 0.0071990430000000005 + + + string + 16 + 0.0072062060000000006 + + + string + 16 + 0.0072053220000000001 + + + string + 16 + 0.0071906030000000003 + + + string + 16 + 0.0071940830000000004 + + + string + 16 + 0.0072020060000000004 + + + string + 16 + 0.0072318010000000004 + + + string + 16 + 0.0071934820000000002 + + + string + 16 + 0.0072077230000000001 + + + string + 16 + 0.0071936460000000006 + + + string + 16 + 0.0071854800000000002 + + + string + 16 + 0.0071955220000000002 + + + string + 16 + 0.0071776030000000003 + + + string + 16 + 0.0071916830000000008 + + + string + 16 + 0.0072421260000000006 + + + string + 16 + 0.007211322 + + + string + 16 + 0.0071732020000000001 + + + string + 16 + 0.0071748060000000006 + + + string + 16 + 0.0071980060000000007 + + + string + 16 + 0.0072117220000000003 + + + string + 16 + 0.0072090420000000006 + + + string + 16 + 0.0072236430000000001 + + + string + 16 + 0.0072546460000000009 + + + string + 16 + 0.0071919610000000002 + + + string + 16 + 0.0071797630000000005 + + + string + 16 + 0.007174723 + + + string + 16 + 0.0071845260000000001 + + + string + 16 + 0.0071910020000000002 + + + string + 16 + 0.0072310020000000003 + + + string + 16 + 0.0072686430000000008 + + + string + 16 + 0.0071835230000000007 + + + string + 16 + 0.0072432400000000006 + + + string + 16 + 0.007220962 + + + string + 16 + 0.0071698030000000006 + + + string + 16 + 0.0071864460000000008 + + + string + 16 + 0.0071785260000000002 + + + string + 16 + 0.0072036020000000008 + + + string + 16 + 0.0071802010000000006 + + + string + 16 + 0.0071924460000000008 + + + string + 16 + 0.0072578860000000007 + + + string + 16 + 0.0072124820000000001 + + + string + 16 + 0.0072392830000000009 + + + string + 16 + 0.0072244830000000003 + + + string + 16 + 0.0071948460000000004 + + + string + 16 + 0.0071743210000000009 + + + string + 16 + 0.007205922 + + + string + 16 + 0.0071905630000000005 + + + string + 16 + 0.0071846830000000007 + + + string + 16 + 0.0072338420000000007 + + + string + 16 + 0.0072037220000000001 + + + string + 16 + 0.0071850030000000006 + + + string + 16 + 0.0071687630000000007 + + + string + 16 + 0.0071699850000000002 + + + string + 16 + 0.0071892820000000008 + + + string + 16 + 0.0071742420000000008 + + + string + 16 + 0.0071893660000000009 + + + string + 16 + 0.0072221260000000006 + + + string + 16 + 0.0071861620000000003 + + + string + 16 + 0.0071887230000000002 + + + string + 16 + 0.0071893630000000007 + + + string + 16 + 0.0071844860000000003 + + + string + 16 + 0.0071784010000000001 + + + string + 16 + 0.0072017230000000002 + + + string + 16 + 0.0072007630000000006 + + + string + 16 + 0.0072040859999998874 + + + string + 16 + 0.0072226420000000005 + + + string + 16 + 0.0072083620000000003 + + + string + 16 + 0.0072103630000000009 + + + string + 16 + 0.0071846830000000007 + + + string + 16 + 0.0072017620000000004 + + + string + 16 + 0.0072684820000000006 + + + string + 16 + 0.0071865230000000002 + + + string + 16 + 0.0071598460000000001 + + + string + 16 + 0.0072246680000000001 + + + string + 16 + 0.0071868820000000003 + + + string + 16 + 0.0071647230000000004 + + + string + 16 + 0.0072765660000000008 + + + string + 16 + 0.0071751260000000004 + + + string + 16 + 0.0071459620000000005 + + + string + 16 + 0.0072247630000000004 + + + string + 16 + 0.0071712020000000007 + + + string + 16 + 0.0072490860000000001 + + + string + 16 + 0.0071670820000000008 + + + string + 16 + 0.0072127220000000004 + + + diff --git a/src/boost/libs/serialization/performance/xml/string16_test.cpp b/src/boost/libs/serialization/performance/xml/string16_test.cpp new file mode 100644 index 000000000..ad42eada0 --- /dev/null +++ b/src/boost/libs/serialization/performance/xml/string16_test.cpp @@ -0,0 +1,24 @@ +/* /libs/serialization/xml_performance/string25_test.cpp *********************** + +(C) Copyright 2010 Bryce Lelbach + +Use, modification and distribution is subject to the Boost Software License, +Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) + +*******************************************************************************/ + +#include + +typedef std::string string; + +#define BSL_TYPE string +#define BSL_DEPTH 2 +#define BSL_ROUNDS 256 +#define BSL_NODE_MAX 4 +#define BSL_SAVE_TMPFILE 0 + +#include "harness.hpp" + +BSL_MAIN + diff --git a/src/boost/libs/serialization/performance/xml/string256_results.xml b/src/boost/libs/serialization/performance/xml/string256_results.xml new file mode 100644 index 000000000..09e7cda0f --- /dev/null +++ b/src/boost/libs/serialization/performance/xml/string256_results.xml @@ -0,0 +1,1291 @@ + + + + + GNU C++ version 4.5.1 20100617 (prerelease) + linux + + 256 + 0 + + string + 256 + 0.24082843600000001 + + + string + 256 + 0.15478449400000002 + + + string + 256 + 0.14540435600000001 + + + string + 256 + 0.14332035000000001 + + + string + 256 + 0.14574748900000001 + + + string + 256 + 0.162143815 + + + string + 256 + 0.143199773 + + + string + 256 + 0.14591024800000002 + + + string + 256 + 0.148218763 + + + string + 256 + 0.26581049599999995 + + + string + 256 + 0.15119754200000002 + + + string + 256 + 0.25551917900000004 + + + string + 256 + 0.30426230999999992 + + + string + 256 + 0.23429972399999999 + + + string + 256 + 0.152736329 + + + string + 256 + 0.16095108700000002 + + + string + 256 + 0.257406205 + + + string + 256 + 0.21526160400000002 + + + string + 256 + 0.310253734 + + + string + 256 + 0.30385512799999992 + + + string + 256 + 0.277919476 + + + string + 256 + 0.15155350300000001 + + + string + 256 + 0.2247563669999999 + + + string + 256 + 0.311096769 + + + string + 256 + 0.18083700100000002 + + + string + 256 + 0.25365826600000002 + + + string + 256 + 0.146422422 + + + string + 256 + 0.31615557699999997 + + + string + 256 + 0.17431823499999999 + + + string + 256 + 0.30721216100000004 + + + string + 256 + 0.274691929 + + + string + 256 + 0.25493901099999999 + + + string + 256 + 0.24813491900000001 + + + string + 256 + 0.21902227400000002 + + + string + 256 + 0.182308211 + + + string + 256 + 0.14080317399999998 + + + string + 256 + 0.27130100700000004 + + + string + 256 + 0.141822905 + + + string + 256 + 0.234210945 + + + string + 256 + 0.18912357100000002 + + + string + 256 + 0.23694535000000003 + + + string + 256 + 0.30294369100000001 + + + string + 256 + 0.23246992800000002 + + + string + 256 + 0.15832027100000001 + + + string + 256 + 0.26319235099999994 + + + string + 256 + 0.147053033 + + + string + 256 + 0.30371506200000004 + + + string + 256 + 0.306945248 + + + string + 256 + 0.34078868499999992 + + + string + 256 + 0.16450026000000001 + + + string + 256 + 0.353907258 + + + string + 256 + 0.29755154299999997 + + + string + 256 + 0.31086977300000002 + + + string + 256 + 0.166196543 + + + string + 256 + 0.29479566800000001 + + + string + 256 + 0.29576432800000002 + + + string + 256 + 0.18159834400000002 + + + string + 256 + 0.19346430100000001 + + + string + 256 + 0.15868047100000002 + + + string + 256 + 0.18001983300000002 + + + string + 256 + 0.30650560900000001 + + + string + 256 + 0.16728085300000001 + + + string + 256 + 0.28264082199999996 + + + string + 256 + 0.23873842499999998 + + + string + 256 + 0.142975195 + + + string + 256 + 0.306175533 + + + string + 256 + 0.28568148900000001 + + + string + 256 + 0.27912233200000003 + + + string + 256 + 0.24095708900000001 + + + string + 256 + 0.29895117200000004 + + + string + 256 + 0.31077380700000001 + + + string + 256 + 0.22219352000000001 + + + string + 256 + 0.17159283699999994 + + + string + 256 + 0.18810837300000002 + + + string + 256 + 0.31016322400000002 + + + string + 256 + 0.24117843300000003 + + + string + 256 + 0.25069571300000004 + + + string + 256 + 0.35484542899999993 + + + string + 256 + 0.25646144200000004 + + + string + 256 + 0.23715143800000002 + + + string + 256 + 0.17434978100000001 + + + string + 256 + 0.22196388700000003 + + + string + 256 + 0.31783167000000001 + + + string + 256 + 0.44040980399999996 + + + string + 256 + 0.18985125600000002 + + + string + 256 + 0.16910165699999991 + + + string + 256 + 0.22861478000000002 + + + string + 256 + 0.32245771200000001 + + + string + 256 + 0.18971205300000002 + + + string + 256 + 0.34642208599999991 + + + string + 256 + 0.16614582600000002 + + + string + 256 + 0.29925598899999994 + + + string + 256 + 0.29850647600000002 + + + string + 256 + 0.172233461 + + + string + 256 + 0.21215700399999993 + + + string + 256 + 0.21100386000000002 + + + string + 256 + 0.24862557099999993 + + + string + 256 + 0.16703737700000001 + + + string + 256 + 0.25782752200000003 + + + string + 256 + 0.26164129199999997 + + + string + 256 + 0.57651874200000008 + + + string + 256 + 0.36986256299999998 + + + string + 256 + 0.21878367700000001 + + + string + 256 + 0.17820567400000001 + + + string + 256 + 0.24184889000000001 + + + string + 256 + 0.24552513400000001 + + + string + 256 + 0.33087374899999999 + + + string + 256 + 0.344138096 + + + string + 256 + 0.25427008900000003 + + + string + 256 + 0.33677569699999998 + + + string + 256 + 0.33239564400000005 + + + string + 256 + 0.29225137200000001 + + + string + 256 + 0.23854207300000002 + + + string + 256 + 0.21931018499999999 + + + string + 256 + 0.33166821100000005 + + + string + 256 + 0.33713559600000004 + + + string + 256 + 0.35802521499999995 + + + string + 256 + 0.21386164400000002 + + + string + 256 + 0.35509271800000003 + + + string + 256 + 0.16676263400000002 + + + string + 256 + 0.23069279500000001 + + + string + 256 + 0.33617436300000003 + + + string + 256 + 0.336949834 + + + string + 256 + 0.34125201800000005 + + + string + 256 + 0.33968717300000001 + + + string + 256 + 0.34125770800000005 + + + string + 256 + 0.32101234700000003 + + + string + 256 + 0.33470459899999994 + + + string + 256 + 0.18704252400000002 + + + string + 256 + 0.28705466900000004 + + + string + 256 + 0.29912810300000003 + + + string + 256 + 0.17272062800000001 + + + string + 256 + 0.20886833600000002 + + + string + 256 + 0.33794845900000003 + + + string + 256 + 0.264968284 + + + string + 256 + 0.26913011600000003 + + + string + 256 + 0.25145834900000003 + + + string + 256 + 0.33495682699999996 + + + string + 256 + 0.26798035000000003 + + + string + 256 + 0.24842696600000003 + + + string + 256 + 0.33503277800000003 + + + string + 256 + 0.30332787699999997 + + + string + 256 + 0.28991897599999999 + + + string + 256 + 0.33133644100000004 + + + string + 256 + 0.26798883300000004 + + + string + 256 + 0.291365229 + + + string + 256 + 0.34162038900000002 + + + string + 256 + 0.170376363 + + + string + 256 + 0.170955098 + + + string + 256 + 0.17217529200000001 + + + string + 256 + 0.2625844249999999 + + + string + 256 + 0.25749087800000003 + + + string + 256 + 0.214833564 + + + string + 256 + 0.20960021100000001 + + + string + 256 + 0.20222120200000002 + + + string + 256 + 0.28324146 + + + string + 256 + 0.303095801 + + + string + 256 + 0.31430344799999999 + + + string + 256 + 0.23109986400000002 + + + string + 256 + 0.20973660100000002 + + + string + 256 + 0.26268180499999999 + + + string + 256 + 0.34926366799999997 + + + string + 256 + 0.22327798399999998 + + + string + 256 + 0.16531669100000002 + + + string + 256 + 0.17791732599999999 + + + string + 256 + 0.16743454199999996 + + + string + 256 + 0.190363907 + + + string + 256 + 0.16638140000000001 + + + string + 256 + 0.31061568700000003 + + + string + 256 + 0.29818055100000002 + + + string + 256 + 0.16645938000000002 + + + string + 256 + 0.16849109600000001 + + + string + 256 + 0.19088629400000001 + + + string + 256 + 0.233309764 + + + string + 256 + 0.26293923899999999 + + + string + 256 + 0.20451668599999995 + + + string + 256 + 0.18545595400000001 + + + string + 256 + 0.33442231900000002 + + + string + 256 + 0.307385672 + + + string + 256 + 0.23357416 + + + string + 256 + 0.287179342 + + + string + 256 + 0.20827706400000001 + + + string + 256 + 0.42202693800000002 + + + string + 256 + 0.34912425000000002 + + + string + 256 + 0.241049968 + + + string + 256 + 0.21442900300000001 + + + string + 256 + 0.34573371899999999 + + + string + 256 + 0.31089394199999998 + + + string + 256 + 0.26286895299999991 + + + string + 256 + 0.28370315699999993 + + + string + 256 + 0.17465668500000001 + + + string + 256 + 0.348761398 + + + string + 256 + 0.166838869 + + + string + 256 + 0.26464613599999998 + + + string + 256 + 0.29856266600000003 + + + string + 256 + 0.24585868199999994 + + + string + 256 + 0.27416464800000001 + + + string + 256 + 0.33280198300000002 + + + string + 256 + 0.23629951400000002 + + + string + 256 + 0.31782385300000005 + + + string + 256 + 0.17180628100000001 + + + string + 256 + 0.31635188200000003 + + + string + 256 + 0.291131843 + + + string + 256 + 0.19067002899999996 + + + string + 256 + 0.23594924 + + + string + 256 + 0.32661452500000004 + + + string + 256 + 0.228596355 + + + string + 256 + 0.25246959299999999 + + + string + 256 + 0.34272192000000001 + + + string + 256 + 0.24635339900000003 + + + string + 256 + 0.23385871399999991 + + + string + 256 + 0.168213903 + + + string + 256 + 0.27104451799999996 + + + string + 256 + 0.28353989400000001 + + + string + 256 + 0.27119438400000001 + + + string + 256 + 0.31294787200000002 + + + string + 256 + 0.263878267 + + + string + 256 + 0.26840745700000002 + + + string + 256 + 0.19721746600000001 + + + string + 256 + 0.21171784800000001 + + + string + 256 + 0.31691192800000001 + + + string + 256 + 0.16284852300000002 + + + string + 256 + 0.206485163 + + + string + 256 + 0.17293324500000001 + + + string + 256 + 0.30097051599999991 + + + string + 256 + 0.18753556099999991 + + + string + 256 + 0.352919066 + + + string + 256 + 0.23880742000000002 + + + string + 256 + 0.21931351400000001 + + + string + 256 + 0.30510558200000004 + + + string + 256 + 0.306646945 + + + string + 256 + 0.19290866000000001 + + + string + 256 + 0.31661062500000003 + + + string + 256 + 0.15527985900000002 + + + string + 256 + 0.21309966899999999 + + + string + 256 + 0.25295672000000002 + + + string + 256 + 0.31927861000000002 + + + string + 256 + 0.28013629200000001 + + + string + 256 + 0.23187213000000001 + + + string + 256 + 0.241622844 + + + string + 256 + 0.28193659500000001 + + + string + 256 + 0.25082649800000001 + + + string + 256 + 0.21928747300000001 + + + string + 256 + 0.213718137 + + + string + 256 + 0.31063365000000004 + + + string + 256 + 0.16080174 + + + string + 256 + 0.30793034600000002 + + + string + 256 + 0.18621517200000001 + + + string + 256 + 0.31502906899999999 + + + string + 256 + 0.20341706500000001 + + + string + 256 + 0.16701237700000002 + + + string + 256 + 0.18218058300000001 + + + string + 256 + 0.31295746400000002 + + + string + 256 + 0.22039852299999996 + + + string + 256 + 0.16650589500000001 + + + string + 256 + 0.30901178699999998 + + + diff --git a/src/boost/libs/serialization/performance/xml/string256_test.cpp b/src/boost/libs/serialization/performance/xml/string256_test.cpp new file mode 100644 index 000000000..b68c51233 --- /dev/null +++ b/src/boost/libs/serialization/performance/xml/string256_test.cpp @@ -0,0 +1,24 @@ +/* /libs/serialization/xml_performance/string25_test.cpp *********************** + +(C) Copyright 2010 Bryce Lelbach + +Use, modification and distribution is subject to the Boost Software License, +Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) + +*******************************************************************************/ + +#include + +typedef std::string string; + +#define BSL_TYPE string +#define BSL_DEPTH 4 +#define BSL_ROUNDS 256 +#define BSL_NODE_MAX 4 +#define BSL_SAVE_TMPFILE 0 + +#include "harness.hpp" + +BSL_MAIN + diff --git a/src/boost/libs/serialization/performance/xml/string4_results.xml b/src/boost/libs/serialization/performance/xml/string4_results.xml new file mode 100644 index 000000000..6381eb69f --- /dev/null +++ b/src/boost/libs/serialization/performance/xml/string4_results.xml @@ -0,0 +1,1291 @@ + + + + + GNU C++ version 4.5.1 20100617 (prerelease) + linux + + 256 + 0 + + string + 4 + 0.0074473220000000001 + + + string + 4 + 0.0021171600000000003 + + + string + 4 + 0.0021249610000000003 + + + string + 4 + 0.0020889610000000003 + + + string + 4 + 0.0020989610000000003 + + + string + 4 + 0.0021022810000000001 + + + string + 4 + 0.0020897610000000003 + + + string + 4 + 0.00207932 + + + string + 4 + 0.0020796 + + + string + 4 + 0.00206676 + + + string + 4 + 0.0021010830000000001 + + + string + 4 + 0.0020941230000000003 + + + string + 4 + 0.0020960029999999999 + + + string + 4 + 0.0022728430000000001 + + + string + 4 + 0.0021422430000000003 + + + string + 4 + 0.0021111599999999999 + + + string + 4 + 0.0020897210000000001 + + + string + 4 + 0.0020777199999999999 + + + string + 4 + 0.00207756 + + + string + 4 + 0.0020766400000000003 + + + string + 4 + 0.0020919610000000003 + + + string + 4 + 0.0020888820000000002 + + + string + 4 + 0.0020911620000000001 + + + string + 4 + 0.002101922 + + + string + 4 + 0.00207456 + + + string + 4 + 0.0020878400000000001 + + + string + 4 + 0.0020859200000000002 + + + string + 4 + 0.002087963 + + + string + 4 + 0.0021150030000000003 + + + string + 4 + 0.0020946430000000002 + + + string + 4 + 0.002101323 + + + string + 4 + 0.0020741600000000002 + + + string + 4 + 0.00207048 + + + string + 4 + 0.0020697200000000002 + + + string + 4 + 0.0020688 + + + string + 4 + 0.0020761210000000002 + + + string + 4 + 0.0021957610000000001 + + + string + 4 + 0.002088922 + + + string + 4 + 0.0020608800000000002 + + + string + 4 + 0.00207632 + + + string + 4 + 0.0020790000000000001 + + + string + 4 + 0.0020759200000000002 + + + string + 4 + 0.002086563 + + + string + 4 + 0.0020913630000000002 + + + string + 4 + 0.0021061630000000003 + + + string + 4 + 0.0021424030000000002 + + + string + 4 + 0.0020861200000000003 + + + string + 4 + 0.0020792000000000002 + + + string + 4 + 0.0020831199999999999 + + + string + 4 + 0.0020748800000000003 + + + string + 4 + 0.0020908810000000002 + + + string + 4 + 0.0020839210000000003 + + + string + 4 + 0.0020882019999999999 + + + string + 4 + 0.0020667200000000002 + + + string + 4 + 0.0020760000000000002 + + + string + 4 + 0.0020742 + + + string + 4 + 0.0020731200000000003 + + + string + 4 + 0.002098721 + + + string + 4 + 0.002094963 + + + string + 4 + 0.0020910030000000001 + + + string + 4 + 0.0021128430000000001 + + + string + 4 + 0.0020812000000000001 + + + string + 4 + 0.0020832800000000003 + + + string + 4 + 0.0020760800000000001 + + + string + 4 + 0.0020872810000000003 + + + string + 4 + 0.002092801 + + + string + 4 + 0.0020863209999999999 + + + string + 4 + 0.002081641 + + + string + 4 + 0.0020940020000000002 + + + string + 4 + 0.0020796400000000002 + + + string + 4 + 0.00207428 + + + string + 4 + 0.0020808800000000002 + + + string + 4 + 0.002087401 + + + string + 4 + 0.002102881 + + + string + 4 + 0.0020912830000000002 + + + string + 4 + 0.002095043 + + + string + 4 + 0.0020720000000000001 + + + string + 4 + 0.0021351600000000001 + + + string + 4 + 0.0020774000000000001 + + + string + 4 + 0.0020770000000000003 + + + string + 4 + 0.0020883210000000002 + + + string + 4 + 0.002102521 + + + string + 4 + 0.0020871209999999999 + + + string + 4 + 0.0020829210000000002 + + + string + 4 + 0.0020788 + + + string + 4 + 0.0022383620000000003 + + + string + 4 + 0.0021013220000000001 + + + string + 4 + 0.0020742400000000002 + + + string + 4 + 0.0020818799999999999 + + + string + 4 + 0.00208304 + + + string + 4 + 0.0020769600000000001 + + + string + 4 + 0.0020958030000000002 + + + string + 4 + 0.002107083 + + + string + 4 + 0.0020970430000000003 + + + string + 4 + 0.002090083 + + + string + 4 + 0.0020642 + + + string + 4 + 0.00206924 + + + string + 4 + 0.0020811600000000003 + + + string + 4 + 0.0020840810000000002 + + + string + 4 + 0.0020956010000000003 + + + string + 4 + 0.0021117220000000003 + + + string + 4 + 0.002084762 + + + string + 4 + 0.0020757600000000003 + + + string + 4 + 0.0020830800000000002 + + + string + 4 + 0.0020730800000000001 + + + string + 4 + 0.0020841200000000001 + + + string + 4 + 0.0021030430000000002 + + + string + 4 + 0.002085763 + + + string + 4 + 0.0022383630000000002 + + + string + 4 + 0.0021111630000000001 + + + string + 4 + 0.0020823600000000001 + + + string + 4 + 0.0020833200000000001 + + + string + 4 + 0.0020757200000000001 + + + string + 4 + 0.0020928410000000002 + + + string + 4 + 0.0021011610000000003 + + + string + 4 + 0.0020833610000000002 + + + string + 4 + 0.0020972820000000002 + + + string + 4 + 0.0020638800000000001 + + + string + 4 + 0.0020747600000000001 + + + string + 4 + 0.0020711200000000001 + + + string + 4 + 0.0020848810000000002 + + + string + 4 + 0.0021020430000000001 + + + string + 4 + 0.002103443 + + + string + 4 + 0.0020883630000000002 + + + string + 4 + 0.0020817600000000002 + + + string + 4 + 0.0020656800000000003 + + + string + 4 + 0.0020790000000000001 + + + string + 4 + 0.0020752000000000001 + + + string + 4 + 0.002078641 + + + string + 4 + 0.0020934009999999999 + + + string + 4 + 0.0020846810000000001 + + + string + 4 + 0.0020884010000000001 + + + string + 4 + 0.00208224 + + + string + 4 + 0.0020734400000000002 + + + string + 4 + 0.0020746000000000002 + + + string + 4 + 0.0020917209999999999 + + + string + 4 + 0.002091561 + + + string + 4 + 0.002099643 + + + string + 4 + 0.0020947230000000002 + + + string + 4 + 0.0020736000000000001 + + + string + 4 + 0.0021564399999999999 + + + string + 4 + 0.0021086 + + + string + 4 + 0.0020864400000000002 + + + string + 4 + 0.0020888009999999999 + + + string + 4 + 0.0020872410000000001 + + + string + 4 + 0.0021153610000000001 + + + string + 4 + 0.0020850809999999999 + + + string + 4 + 0.0020748800000000003 + + + string + 4 + 0.0020727600000000003 + + + string + 4 + 0.00206544 + + + string + 4 + 0.0020935610000000003 + + + string + 4 + 0.0020951210000000001 + + + string + 4 + 0.0020952810000000001 + + + string + 4 + 0.002109203 + + + string + 4 + 0.0020785199999999999 + + + string + 4 + 0.0020814800000000001 + + + string + 4 + 0.00207932 + + + string + 4 + 0.0020870800000000003 + + + string + 4 + 0.0021083600000000001 + + + string + 4 + 0.0020882410000000002 + + + string + 4 + 0.0020863209999999999 + + + string + 4 + 0.0020938810000000001 + + + string + 4 + 0.0020698400000000003 + + + string + 4 + 0.00207412 + + + string + 4 + 0.0020688 + + + string + 4 + 0.00208376 + + + string + 4 + 0.0020955610000000001 + + + string + 4 + 0.0020943610000000003 + + + string + 4 + 0.0020893610000000001 + + + string + 4 + 0.0020961230000000001 + + + string + 4 + 0.0020729200000000002 + + + string + 4 + 0.00206996 + + + string + 4 + 0.0021200800000000003 + + + string + 4 + 0.0020985630000000003 + + + string + 4 + 0.0021015600000000001 + + + string + 4 + 0.002084481 + + + string + 4 + 0.0020864810000000003 + + + string + 4 + 0.0020774400000000003 + + + string + 4 + 0.0020692800000000002 + + + string + 4 + 0.00207136 + + + string + 4 + 0.0020879610000000002 + + + string + 4 + 0.002089441 + + + string + 4 + 0.0021005609999999999 + + + string + 4 + 0.0021022409999999999 + + + string + 4 + 0.0020743200000000002 + + + string + 4 + 0.0020792800000000002 + + + string + 4 + 0.0020774000000000001 + + + string + 4 + 0.0020765600000000003 + + + string + 4 + 0.0020830830000000003 + + + string + 4 + 0.0020838829999999999 + + + string + 4 + 0.0020982410000000003 + + + string + 4 + 0.0020833610000000002 + + + string + 4 + 0.0020726 + + + string + 4 + 0.0020782800000000001 + + + string + 4 + 0.0020529599999999999 + + + string + 4 + 0.0021279210000000001 + + + string + 4 + 0.002089161 + + + string + 4 + 0.0020892010000000002 + + + string + 4 + 0.00207544 + + + string + 4 + 0.0020828400000000003 + + + string + 4 + 0.0020691200000000002 + + + string + 4 + 0.00207704 + + + string + 4 + 0.0020880429999999999 + + + string + 4 + 0.0020918429999999999 + + + string + 4 + 0.0021526430000000001 + + + string + 4 + 0.002085323 + + + string + 4 + 0.0020922810000000001 + + + string + 4 + 0.0020669200000000003 + + + string + 4 + 0.00215372 + + + string + 4 + 0.00207304 + + + string + 4 + 0.002076601 + + + string + 4 + 0.0020949620000000001 + + + string + 4 + 0.002083321 + + + string + 4 + 0.002073961 + + + string + 4 + 0.0020738000000000002 + + + string + 4 + 0.0020674400000000002 + + + string + 4 + 0.00207888 + + + string + 4 + 0.0020933230000000002 + + + string + 4 + 0.0020924430000000003 + + + string + 4 + 0.0021093230000000002 + + + string + 4 + 0.0020860030000000003 + + + string + 4 + 0.0020732400000000001 + + + string + 4 + 0.0020663999999999999 + + + string + 4 + 0.00206828 + + + string + 4 + 0.0020734 + + + string + 4 + 0.0020888009999999999 + + + string + 4 + 0.0020840010000000003 + + + string + 4 + 0.0021071610000000002 + + + string + 4 + 0.0020698800000000001 + + + string + 4 + 0.002078 + + + string + 4 + 0.0020668800000000001 + + + string + 4 + 0.0020828000000000001 + + + string + 4 + 0.0021036430000000001 + + + string + 4 + 0.002105923 + + + string + 4 + 0.002094963 + + + string + 4 + 0.0022069630000000002 + + + string + 4 + 0.00209384 + + + string + 4 + 0.0020772 + + + string + 4 + 0.0020736800000000001 + + + string + 4 + 0.0020742 + + + string + 4 + 0.0020923210000000003 + + + string + 4 + 0.002086081 + + + string + 4 + 0.0020877210000000003 + + + string + 4 + 0.0020729200000000002 + + + string + 4 + 0.0021266810000000001 + + + string + 4 + 0.0020851610000000003 + + + string + 4 + 0.00208464 + + + string + 4 + 0.0020736400000000003 + + + string + 4 + 0.0020819600000000003 + + + string + 4 + 0.0020852399999999999 + + + string + 4 + 0.0020909230000000002 + + + string + 4 + 0.002100963 + + + string + 4 + 0.0020798030000000003 + + + string + 4 + 0.002048865 + + + string + 4 + 0.0020709600000000002 + + + string + 4 + 0.0020917600000000002 + + + diff --git a/src/boost/libs/serialization/performance/xml/string4_test.cpp b/src/boost/libs/serialization/performance/xml/string4_test.cpp new file mode 100644 index 000000000..a87c0bbca --- /dev/null +++ b/src/boost/libs/serialization/performance/xml/string4_test.cpp @@ -0,0 +1,24 @@ +/* /libs/serialization/xml_performance/string5_test.cpp ************************ + +(C) Copyright 2010 Bryce Lelbach + +Use, modification and distribution is subject to the Boost Software License, +Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) + +*******************************************************************************/ + +#include + +typedef std::string string; + +#define BSL_TYPE string +#define BSL_DEPTH 1 +#define BSL_ROUNDS 256 +#define BSL_NODE_MAX 4 +#define BSL_SAVE_TMPFILE 0 + +#include "harness.hpp" + +BSL_MAIN + diff --git a/src/boost/libs/serialization/performance/xml/string64_results.xml b/src/boost/libs/serialization/performance/xml/string64_results.xml new file mode 100644 index 000000000..0c6dd61b2 --- /dev/null +++ b/src/boost/libs/serialization/performance/xml/string64_results.xml @@ -0,0 +1,1291 @@ + + + + + GNU C++ version 4.5.1 20100617 (prerelease) + linux + + 256 + 0 + + string + 64 + 0.032849208000000005 + + + string + 64 + 0.027500566000000001 + + + string + 64 + 0.027451327000000001 + + + string + 64 + 0.027459310000000001 + + + string + 64 + 0.027409781000000001 + + + string + 64 + 0.027785380999999942 + + + string + 64 + 0.027489781000000001 + + + string + 64 + 0.027510701000000002 + + + string + 64 + 0.027549732 + + + string + 64 + 0.027456249000000002 + + + string + 64 + 0.027514171 + + + string + 64 + 0.02757565 + + + string + 64 + 0.027492611 + + + string + 64 + 0.027502767000000001 + + + string + 64 + 0.027517847000000002 + + + string + 64 + 0.027530807000000001 + + + string + 64 + 0.027565327000000001 + + + string + 64 + 0.027517444000000002 + + + string + 64 + 0.027542341000000001 + + + string + 64 + 0.027525541000000001 + + + string + 64 + 0.027602181000000003 + + + string + 64 + 0.027534101000000002 + + + string + 64 + 0.027491539000000002 + + + string + 64 + 0.027615651000000001 + + + string + 64 + 0.027528491000000002 + + + string + 64 + 0.027536010000000003 + + + string + 64 + 0.027506650000000001 + + + string + 64 + 0.027591449000000001 + + + string + 64 + 0.027568327 + + + string + 64 + 0.027615967000000002 + + + string + 64 + 0.027532167000000003 + + + string + 64 + 0.027549087000000003 + + + string + 64 + 0.027636750000000002 + + + string + 64 + 0.033203064000000004 + + + string + 64 + 0.027562501000000003 + + + string + 64 + 0.027484821000000003 + + + string + 64 + 0.027475901 + + + string + 64 + 0.027442895000000002 + + + string + 64 + 0.027424131000000001 + + + string + 64 + 0.027452170000000001 + + + string + 64 + 0.027489530000000002 + + + string + 64 + 0.027491611000000003 + + + string + 64 + 0.027540329000000002 + + + string + 64 + 0.027551367 + + + string + 64 + 0.027500207000000002 + + + string + 64 + 0.027557087000000001 + + + string + 64 + 0.027513927000000001 + + + string + 64 + 0.027486718 + + + string + 64 + 0.027924781000000003 + + + string + 64 + 0.027442101 + + + string + 64 + 0.027467501000000002 + + + string + 64 + 0.027566061000000003 + + + string + 64 + 0.027441051000000001 + + + string + 64 + 0.027590011000000001 + + + string + 64 + 0.027544210000000003 + + + string + 64 + 0.02752425 + + + string + 64 + 0.027618371000000003 + + + string + 64 + 0.027548727000000002 + + + string + 64 + 0.027522687000000001 + + + string + 64 + 0.027526447000000002 + + + string + 64 + 0.027556727000000003 + + + string + 64 + 0.027505950000000001 + + + string + 64 + 0.027557421000000002 + + + string + 64 + 0.027538700999999888 + + + string + 64 + 0.027576901000000001 + + + string + 64 + 0.027507901000000001 + + + string + 64 + 0.027592498 + + + string + 64 + 0.027575250000000003 + + + string + 64 + 0.027515571000000003 + + + string + 64 + 0.027482651 + + + string + 64 + 0.027488170000000003 + + + string + 64 + 0.027652449000000003 + + + string + 64 + 0.027509127000000001 + + + string + 64 + 0.027598727000000003 + + + string + 64 + 0.027549807000000003 + + + string + 64 + 0.027606287 + + + string + 64 + 0.027548792000000003 + + + string + 64 + 0.027512221000000003 + + + string + 64 + 0.027756460999999955 + + + string + 64 + 0.027540181 + + + string + 64 + 0.027546621 + + + string + 64 + 0.027576093000000003 + + + string + 64 + 0.027483489000000003 + + + string + 64 + 0.027560690000000002 + + + string + 64 + 0.027573130000000001 + + + string + 64 + 0.027519331000000001 + + + string + 64 + 0.027563687000000003 + + + string + 64 + 0.027538127000000003 + + + string + 64 + 0.027482087000000002 + + + string + 64 + 0.027507527 + + + string + 64 + 0.027609726000000001 + + + string + 64 + 0.027489240000000002 + + + string + 64 + 0.027490021000000003 + + + string + 64 + 0.027504140999999982 + + + string + 64 + 0.027508021000000001 + + + string + 64 + 0.027476421000000001 + + + string + 64 + 0.027566891000000003 + + + string + 64 + 0.027467090000000003 + + + string + 64 + 0.027596731000000003 + + + string + 64 + 0.027603850000000003 + + + string + 64 + 0.027543370000000001 + + + string + 64 + 0.027497287000000002 + + + string + 64 + 0.027564527000000002 + + + string + 64 + 0.027462127000000003 + + + string + 64 + 0.027475286000000002 + + + string + 64 + 0.027454365000000001 + + + string + 64 + 0.027497301000000002 + + + string + 64 + 0.027490581 + + + string + 64 + 0.027542981000000001 + + + string + 64 + 0.027498461000000002 + + + string + 64 + 0.027499541000000002 + + + string + 64 + 0.027512971000000001 + + + string + 64 + 0.027546411000000003 + + + string + 64 + 0.027550209000000003 + + + string + 64 + 0.027480250000000001 + + + string + 64 + 0.027508009000000003 + + + string + 64 + 0.027507007 + + + string + 64 + 0.027574567000000001 + + + string + 64 + 0.027455566000000001 + + + string + 64 + 0.027504607 + + + string + 64 + 0.027463672000000001 + + + string + 64 + 0.027678861000000003 + + + string + 64 + 0.027500861000000001 + + + string + 64 + 0.027479541000000003 + + + string + 64 + 0.027560741000000003 + + + string + 64 + 0.027520495000000002 + + + string + 64 + 0.027470051000000002 + + + string + 64 + 0.027435090000000002 + + + string + 64 + 0.027529330000000001 + + + string + 64 + 0.027526049 + + + string + 64 + 0.027518048000000003 + + + string + 64 + 0.027476686 + + + string + 64 + 0.027496167000000002 + + + string + 64 + 0.027677887000000002 + + + string + 64 + 0.027653447000000001 + + + string + 64 + 0.027444680000000003 + + + string + 64 + 0.027470621000000001 + + + string + 64 + 0.027427941000000001 + + + string + 64 + 0.027514701000000003 + + + string + 64 + 0.027530581000000002 + + + string + 64 + 0.02742785 + + + string + 64 + 0.027486410000000003 + + + string + 64 + 0.027441931000000003 + + + string + 64 + 0.027472611000000001 + + + string + 64 + 0.027543169000000003 + + + string + 64 + 0.027448767000000002 + + + string + 64 + 0.027436287 + + + string + 64 + 0.027571407000000003 + + + string + 64 + 0.027521287000000002 + + + string + 64 + 0.027472364000000003 + + + string + 64 + 0.027511181000000003 + + + string + 64 + 0.028075300999999886 + + + string + 64 + 0.027459541000000001 + + + string + 64 + 0.027472981 + + + string + 64 + 0.027476179000000003 + + + string + 64 + 0.027502249000000003 + + + string + 64 + 0.027453571000000003 + + + string + 64 + 0.027541969000000003 + + + string + 64 + 0.027626410000000001 + + + string + 64 + 0.027644890000000002 + + + string + 64 + 0.027532927000000002 + + + string + 64 + 0.027655526000000003 + + + string + 64 + 0.027602647000000001 + + + string + 64 + 0.027518967000000002 + + + string + 64 + 0.027523947 + + + string + 64 + 0.027511461000000001 + + + string + 64 + 0.027583540999999934 + + + string + 64 + 0.027469901000000001 + + + string + 64 + 0.027504741000000003 + + + string + 64 + 0.027594818 + + + string + 64 + 0.027498931000000001 + + + string + 64 + 0.02751605 + + + string + 64 + 0.027519130000000003 + + + string + 64 + 0.027566811 + + + string + 64 + 0.02766093 + + + string + 64 + 0.027595167 + + + string + 64 + 0.027505447000000002 + + + string + 64 + 0.027495406 + + + string + 64 + 0.027481407000000003 + + + string + 64 + 0.027461713000000002 + + + string + 64 + 0.027512301000000003 + + + string + 64 + 0.027660660999999975 + + + string + 64 + 0.027531381000000001 + + + string + 64 + 0.027476181000000002 + + + string + 64 + 0.027551693000000002 + + + string + 64 + 0.02747109 + + + string + 64 + 0.027675011000000003 + + + string + 64 + 0.027477691000000002 + + + string + 64 + 0.027453569000000001 + + + string + 64 + 0.027546848000000002 + + + string + 64 + 0.027615687000000003 + + + string + 64 + 0.027535927000000002 + + + string + 64 + 0.027526766000000001 + + + string + 64 + 0.027491245000000001 + + + string + 64 + 0.027559138 + + + string + 64 + 0.027477061000000001 + + + string + 64 + 0.027517181000000002 + + + string + 64 + 0.027551421000000003 + + + string + 64 + 0.027533621000000001 + + + string + 64 + 0.027495289000000003 + + + string + 64 + 0.027478930000000002 + + + string + 64 + 0.027494170000000002 + + + string + 64 + 0.027549171000000001 + + + string + 64 + 0.027530529000000001 + + + string + 64 + 0.027580927000000002 + + + string + 64 + 0.027560406000000003 + + + string + 64 + 0.027538047000000003 + + + string + 64 + 0.027684046 + + + string + 64 + 0.027510467 + + + string + 64 + 0.027602541000000001 + + + string + 64 + 0.027593101000000002 + + + string + 64 + 0.027597261000000001 + + + string + 64 + 0.027524541000000003 + + + string + 64 + 0.027597696000000001 + + + string + 64 + 0.027612531000000003 + + + string + 64 + 0.027652890000000003 + + + string + 64 + 0.027569450000000002 + + + string + 64 + 0.027542971000000003 + + + string + 64 + 0.027531930000000003 + + + string + 64 + 0.027596847000000001 + + + string + 64 + 0.027515367000000002 + + + string + 64 + 0.027395526000000003 + + + string + 64 + 0.027510847000000001 + + + string + 64 + 0.027532389000000001 + + + string + 64 + 0.027653221000000002 + + + string + 64 + 0.027480381000000002 + + + string + 64 + 0.027523341000000003 + + + string + 64 + 0.027545901000000001 + + + string + 64 + 0.027552058000000001 + + + string + 64 + 0.027556891 + + + string + 64 + 0.02759725 + + + string + 64 + 0.027615211000000001 + + + string + 64 + 0.027532371000000003 + + + string + 64 + 0.027467209000000003 + + + string + 64 + 0.027508167 + + + string + 64 + 0.027547567000000002 + + + string + 64 + 0.027625847000000002 + + + string + 64 + 0.027527047000000002 + + + string + 64 + 0.027561192000000002 + + + string + 64 + 0.027590181000000002 + + + string + 64 + 0.027565781000000001 + + + string + 64 + 0.027491221000000003 + + + string + 64 + 0.027549341000000001 + + + string + 64 + 0.027529575000000001 + + + string + 64 + 0.027578011000000003 + + + string + 64 + 0.027560330000000001 + + + string + 64 + 0.027543449000000001 + + + string + 64 + 0.027562091 + + + string + 64 + 0.027551447000000003 + + + string + 64 + 0.027531247000000002 + + + string + 64 + 0.027608247000000002 + + + string + 64 + 0.027568047000000002 + + + string + 64 + 0.027576647000000003 + + + string + 64 + 0.027502877000000002 + + + string + 64 + 0.027854221000000002 + + + string + 64 + 0.027568421000000003 + + + diff --git a/src/boost/libs/serialization/performance/xml/string64_test.cpp b/src/boost/libs/serialization/performance/xml/string64_test.cpp new file mode 100644 index 000000000..2934084f6 --- /dev/null +++ b/src/boost/libs/serialization/performance/xml/string64_test.cpp @@ -0,0 +1,24 @@ +/* /libs/serialization/xml_performance/string25_test.cpp *********************** + +(C) Copyright 2010 Bryce Lelbach + +Use, modification and distribution is subject to the Boost Software License, +Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) + +*******************************************************************************/ + +#include + +typedef std::string string; + +#define BSL_TYPE string +#define BSL_DEPTH 3 +#define BSL_ROUNDS 256 +#define BSL_NODE_MAX 4 +#define BSL_SAVE_TMPFILE 0 + +#include "harness.hpp" + +BSL_MAIN + diff --git a/src/boost/libs/serialization/performance/xml_archive.hpp b/src/boost/libs/serialization/performance/xml_archive.hpp new file mode 100644 index 000000000..1e3bdc1ac --- /dev/null +++ b/src/boost/libs/serialization/performance/xml_archive.hpp @@ -0,0 +1,16 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +// xml_archive +#include +typedef boost::archive::xml_oarchive test_oarchive; +typedef std::ofstream test_ostream; +#include +typedef boost::archive::xml_iarchive test_iarchive; +typedef std::ifstream test_istream; +#define TEST_STREAM_FLAGS (std::ios_base::openmode)0 + + diff --git a/src/boost/libs/serialization/performance/xml_warchive.hpp b/src/boost/libs/serialization/performance/xml_warchive.hpp new file mode 100644 index 000000000..3483e2257 --- /dev/null +++ b/src/boost/libs/serialization/performance/xml_warchive.hpp @@ -0,0 +1,16 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +// xml_warchive +#include +typedef boost::archive::xml_woarchive test_oarchive; +typedef std::wofstream test_ostream; +#include +typedef boost::archive::xml_wiarchive test_iarchive; +typedef std::wifstream test_istream; +#define TEST_STREAM_FLAGS (std::ios_base::openmode)0 + + diff --git a/src/boost/libs/serialization/src/archive_exception.cpp b/src/boost/libs/serialization/src/archive_exception.cpp new file mode 100644 index 000000000..729a4edb2 --- /dev/null +++ b/src/boost/libs/serialization/src/archive_exception.cpp @@ -0,0 +1,154 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// archive_exception.cpp: + +// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#include +#include +#include + +#define BOOST_ARCHIVE_SOURCE +#include +#include + +namespace boost { +namespace archive { + +BOOST_ARCHIVE_DECL +unsigned int +archive_exception::append(unsigned int l, const char * a){ + while(l < (sizeof(m_buffer) - 1)){ + char c = *a++; + if('\0' == c) + break; + m_buffer[l++] = c; + } + m_buffer[l] = '\0'; + return l; +} + +BOOST_ARCHIVE_DECL +archive_exception::archive_exception( + exception_code c, + const char * e1, + const char * e2 +) BOOST_NOEXCEPT : + code(c) +{ + unsigned int length = 0; + switch(code){ + case no_exception: + length = append(length, "uninitialized exception"); + break; + case unregistered_class: + length = append(length, "unregistered class"); + if(NULL != e1){ + length = append(length, " - "); + length = append(length, e1); + } + break; + case invalid_signature: + length = append(length, "invalid signature"); + break; + case unsupported_version: + length = append(length, "unsupported version"); + break; + case pointer_conflict: + length = append(length, "pointer conflict"); + break; + case incompatible_native_format: + length = append(length, "incompatible native format"); + if(NULL != e1){ + length = append(length, " - "); + length = append(length, e1); + } + break; + case array_size_too_short: + length = append(length, "array size too short"); + break; + case input_stream_error: + length = append(length, "input stream error"); + if(NULL != e1){ + length = append(length, "-"); + length = append(length, e1); + } + if(NULL != e2){ + length = append(length, "-"); + length = append(length, e2); + } + break; + case invalid_class_name: + length = append(length, "class name too long"); + break; + case unregistered_cast: + length = append(length, "unregistered void cast "); + length = append(length, (NULL != e1) ? e1 : "?"); + length = append(length, "<-"); + length = append(length, (NULL != e2) ? e2 : "?"); + break; + case unsupported_class_version: + length = append(length, "class version "); + length = append(length, (NULL != e1) ? e1 : ""); + break; + case other_exception: + // if get here - it indicates a derived exception + // was sliced by passing by value in catch + length = append(length, "unknown derived exception"); + break; + case multiple_code_instantiation: + length = append(length, "code instantiated in more than one module"); + if(NULL != e1){ + length = append(length, " - "); + length = append(length, e1); + } + break; + case output_stream_error: + length = append(length, "output stream error"); + if(NULL != e1){ + length = append(length, "-"); + length = append(length, e1); + } + if(NULL != e2){ + length = append(length, "-"); + length = append(length, e2); + } + break; + default: + BOOST_ASSERT(false); + length = append(length, "programming error"); + break; + } +} + +BOOST_ARCHIVE_DECL +archive_exception::archive_exception(archive_exception const & oth) BOOST_NOEXCEPT : + std::exception(oth), + code(oth.code) +{ + std::memcpy(m_buffer,oth.m_buffer,sizeof m_buffer); +} + +BOOST_ARCHIVE_DECL +archive_exception::~archive_exception() BOOST_NOEXCEPT_OR_NOTHROW {} + +BOOST_ARCHIVE_DECL const char * +archive_exception::what() const BOOST_NOEXCEPT_OR_NOTHROW { + return m_buffer; +} + +BOOST_ARCHIVE_DECL +archive_exception::archive_exception() BOOST_NOEXCEPT : + code(no_exception) +{} + +} // archive +} // boost diff --git a/src/boost/libs/serialization/src/basic_archive.cpp b/src/boost/libs/serialization/src/basic_archive.cpp new file mode 100644 index 000000000..0649388bf --- /dev/null +++ b/src/boost/libs/serialization/src/basic_archive.cpp @@ -0,0 +1,93 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_archive.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +////////////////////////////////////////////////////////////////////// +// +// objects are stored as +// +// class_id* // -1 for a null pointer +// if a new class id +// [ +// exported key - class name* +// tracking level - always/never +// class version +// ] +// +// if tracking +// [ +// object_id +// ] +// +// [ // if a new object id +// data... +// ] +// +// * required only for pointers - optional for objects + +#define BOOST_ARCHIVE_SOURCE +#include +#include + +namespace boost { +namespace archive { + +/////////////////////////////////////////////////////////////////////// +// constants used in archive signature +//This should never ever change. note that is not an std::string +// string. +BOOST_SYMBOL_VISIBLE const char * +BOOST_ARCHIVE_SIGNATURE(){ + return "serialization::archive"; +} + +// this should change if the capabilities are added to the library +// such that archives can be created which can't be read by previous +// versions of this library +// 1 - initial version +// 2 - made address tracking optional +// 3 - numerous changes - can't guarentee compatibility with previous versions +// 4 - Boost 1.34 +// added item_version to properly support versioning for collections +// 5 - Boost 1.36 +// changed serialization of collections: adding version even for primitive +// types caused backwards compatibility breaking change in 1.35 +// 6 - Boost 1.41 17 Nov 2009 +// serializing collection sizes as std::size_t +// 7 Boost 1.42 2 Feb 2010 +// error - changed binary version to 16 bits w/o changing library version # +// That is - binary archives are recorded with #6 even though they are +// different from the previous versions. This means that binary archives +// created with versions 1.42 and 1.43 will have to be fixed with a special +// program which fixes the library version # in the header +// Boost 1.43 6 May 2010 +// no change +// 8 - Boost 1.44 +// separated version_type into library_version_type and class_version_type +// changed version_type to be stored as 8 bits. +// 10- fixed base64 output/input. +// 11- not changes +// 12- improved serialization of collections +// 13- simplified visibility, removed Borland, removed pfto +// 14- improved visibility, refactor map/set +// 15- corrections to optional and collection loading +// 16- eliminated dependency on which is buggy in some libraries +// and now officially deprecated in the standard +// 17- Boost 1.68 August 2018 +// 18- addressed undefined behavior in archive constuctors. +// init() called from base wrote archive header before archive +// was fully constructed. + +BOOST_SYMBOL_VISIBLE library_version_type +BOOST_ARCHIVE_VERSION(){ + return library_version_type(18); +} + +} // namespace archive +} // namespace boost diff --git a/src/boost/libs/serialization/src/basic_iarchive.cpp b/src/boost/libs/serialization/src/basic_iarchive.cpp new file mode 100644 index 000000000..86299714d --- /dev/null +++ b/src/boost/libs/serialization/src/basic_iarchive.cpp @@ -0,0 +1,601 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_archive.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include // msvc 6.0 needs this to suppress warnings + +#include +#include +#include +#include +#include // size_t, NULL + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} // namespace std +#endif + +#include + +#define BOOST_ARCHIVE_SOURCE +// include this to prevent linker errors when the +// same modules are marked export and import. +#define BOOST_SERIALIZATION_SOURCE +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +using namespace boost::serialization; + +namespace boost { +namespace archive { +namespace detail { + +class basic_iarchive_impl { + friend class basic_iarchive; + library_version_type m_archive_library_version; + unsigned int m_flags; + + ////////////////////////////////////////////////////////////////////// + // information about each serialized object loaded + // indexed on object_id + struct aobject + { + void * address; + bool loaded_as_pointer; + class_id_type class_id; + aobject( + void *a, + class_id_type class_id_ + ) : + address(a), + loaded_as_pointer(false), + class_id(class_id_) + {} + aobject() : + address(NULL), + loaded_as_pointer(false), + class_id(-2) + {} + }; + typedef std::vector object_id_vector_type; + object_id_vector_type object_id_vector; + + ////////////////////////////////////////////////////////////////////// + // used to implement the reset_object_address operation. + struct moveable_objects { + object_id_type start; + object_id_type end; + object_id_type recent; + bool is_pointer; + moveable_objects() : + start(0), + end(0), + recent(0), + is_pointer(false) + {} + } m_moveable_objects; + + void reset_object_address( + const void * new_address, + const void *old_address + ); + + ////////////////////////////////////////////////////////////////////// + // used by load object to look up class id given basic_serializer + struct cobject_type + { + const basic_iserializer * m_bis; + const class_id_type m_class_id; + cobject_type( + std::size_t class_id, + const basic_iserializer & bis + ) : + m_bis(& bis), + m_class_id(class_id) + {} + cobject_type(const cobject_type & rhs) : + m_bis(rhs.m_bis), + m_class_id(rhs.m_class_id) + {} + // the following cannot be defined because of the const + // member. This will generate a link error if an attempt + // is made to assign. This should never be necessary + cobject_type & operator=(const cobject_type & rhs); + bool operator<(const cobject_type &rhs) const + { + return *m_bis < *(rhs.m_bis); + } + }; + typedef std::set cobject_info_set_type; + cobject_info_set_type cobject_info_set; + + ////////////////////////////////////////////////////////////////////// + // information about each serialized class indexed on class_id + class cobject_id + { + public: + cobject_id & operator=(const cobject_id & rhs){ + bis_ptr = rhs.bis_ptr; + bpis_ptr = rhs.bpis_ptr; + file_version = rhs.file_version; + tracking_level = rhs.tracking_level; + initialized = rhs.initialized; + return *this; + } + const basic_iserializer * bis_ptr; + const basic_pointer_iserializer * bpis_ptr; + version_type file_version; + tracking_type tracking_level; + bool initialized; + + cobject_id(const basic_iserializer & bis_) : + bis_ptr(& bis_), + bpis_ptr(NULL), + file_version(0), + tracking_level(track_never), + initialized(false) + {} + cobject_id(const cobject_id &rhs): + bis_ptr(rhs.bis_ptr), + bpis_ptr(rhs.bpis_ptr), + file_version(rhs.file_version), + tracking_level(rhs.tracking_level), + initialized(rhs.initialized) + {} + }; + typedef std::vector cobject_id_vector_type; + cobject_id_vector_type cobject_id_vector; + + ////////////////////////////////////////////////////////////////////// + // address of the most recent object serialized as a poiner + // whose data itself is now pending serialization + struct pending { + void * object; + const basic_iserializer * bis; + version_type version; + pending() : + object(NULL), + bis(NULL), + version(0) + {} + } m_pending; + + basic_iarchive_impl(unsigned int flags) : + m_archive_library_version(BOOST_ARCHIVE_VERSION()), + m_flags(flags) + {} + void set_library_version(library_version_type archive_library_version){ + m_archive_library_version = archive_library_version; + } + bool + track( + basic_iarchive & ar, + void * & t + ); + void + load_preamble( + basic_iarchive & ar, + cobject_id & co + ); + class_id_type register_type( + const basic_iserializer & bis + ); + + // redirect through virtual functions to load functions for this archive + template + void load(basic_iarchive & ar, T & t){ + ar.vload(t); + } + +//public: + void + next_object_pointer(void * t){ + m_pending.object = t; + } + void delete_created_pointers(); + class_id_type register_type( + const basic_pointer_iserializer & bpis + ); + void load_object( + basic_iarchive & ar, + void * t, + const basic_iserializer & bis + ); + const basic_pointer_iserializer * load_pointer( + basic_iarchive & ar, + void * & t, + const basic_pointer_iserializer * bpis, + const basic_pointer_iserializer * (*finder)( + const boost::serialization::extended_type_info & type + ) + ); +}; + +inline void +basic_iarchive_impl::reset_object_address( + void const * const new_address, + void const * const old_address +){ + if(m_moveable_objects.is_pointer) + return; + + // this code handles a couple of situations. + // a) where reset_object_address is applied to an untracked object. + // In such a case the call is really superfluous and its really an + // an error. But we don't have access to the types here so we can't + // know that. However, this code will effectively turn this situation + // into a no-op and every thing will work fine - albeat with a small + // execution time penalty. + // b) where the call to reset_object_address doesn't immediatly follow + // the << operator to which it corresponds. This would be a bad idea + // but the code may work anyway. Naturally, a bad practice on the part + // of the programmer but we can't detect it - as above. So maybe we + // can save a few more people from themselves as above. + object_id_type i = m_moveable_objects.recent; + for(; i < m_moveable_objects.end; ++i){ + if(old_address == object_id_vector[i].address) + break; + } + for(; i < m_moveable_objects.end; ++i){ + const aobject & ao = object_id_vector[i]; + if(ao.loaded_as_pointer) + continue; + void const * const this_address = ao.address; + // calculate displacement from this level + // warning - pointer arithmetic on void * is in herently non-portable + // but expected to work on all platforms in current usage + if(this_address > old_address){ + std::size_t member_displacement + = reinterpret_cast(this_address) + - reinterpret_cast(old_address); + object_id_vector[i].address = reinterpret_cast( + reinterpret_cast(new_address) + member_displacement + ); + } + else{ + std::size_t member_displacement + = reinterpret_cast(old_address) + - reinterpret_cast(this_address); + object_id_vector[i].address = reinterpret_cast( + reinterpret_cast(new_address) - member_displacement + ); + } + } +} + +inline void +basic_iarchive_impl::delete_created_pointers() +{ + object_id_vector_type::iterator i; + for( + i = object_id_vector.begin(); + i != object_id_vector.end(); + ++i + ){ + if(i->loaded_as_pointer){ + // borland complains without this minor hack + const int j = i->class_id; + const cobject_id & co = cobject_id_vector[j]; + //const cobject_id & co = cobject_id_vector[i->class_id]; + // with the appropriate input serializer, + // delete the indicated object + co.bis_ptr->destroy(i->address); + } + } +} + +inline class_id_type +basic_iarchive_impl::register_type( + const basic_iserializer & bis +){ + class_id_type cid(cobject_info_set.size()); + cobject_type co(cid, bis); + std::pair + result = cobject_info_set.insert(co); + + if(result.second){ + cobject_id_vector.push_back(cobject_id(bis)); + BOOST_ASSERT(cobject_info_set.size() == cobject_id_vector.size()); + } + cid = result.first->m_class_id; + // borland complains without this minor hack + const int tid = cid; + cobject_id & coid = cobject_id_vector[tid]; + coid.bpis_ptr = bis.get_bpis_ptr(); + return cid; +} + +void +basic_iarchive_impl::load_preamble( + basic_iarchive & ar, + cobject_id & co +){ + if(! co.initialized){ + if(co.bis_ptr->class_info()){ + class_id_optional_type cid(class_id_type(0)); + load(ar, cid); // to be thrown away + load(ar, co.tracking_level); + load(ar, co.file_version); + } + else{ + // override tracking with indicator from class information + co.tracking_level = co.bis_ptr->tracking(m_flags); + co.file_version = version_type( + co.bis_ptr->version() + ); + } + co.initialized = true; + } +} + +bool +basic_iarchive_impl::track( + basic_iarchive & ar, + void * & t +){ + object_id_type oid; + load(ar, oid); + + // if its a reference to a old object + if(object_id_type(object_id_vector.size()) > oid){ + // we're done + t = object_id_vector[oid].address; + return false; + } + return true; +} + +inline void +basic_iarchive_impl::load_object( + basic_iarchive & ar, + void * t, + const basic_iserializer & bis +){ + m_moveable_objects.is_pointer = false; + serialization::state_saver ss_is_pointer(m_moveable_objects.is_pointer); + // if its been serialized through a pointer and the preamble's been done + if(t == m_pending.object && & bis == m_pending.bis){ + // read data + (bis.load_object_data)(ar, t, m_pending.version); + return; + } + + const class_id_type cid = register_type(bis); + const int i = cid; + cobject_id & co = cobject_id_vector[i]; + + load_preamble(ar, co); + + // save the current move stack position in case we want to truncate it + boost::serialization::state_saver ss_start(m_moveable_objects.start); + + // note: extra line used to evade borland issue + const bool tracking = co.tracking_level; + + object_id_type this_id; + m_moveable_objects.start = + this_id = object_id_type(object_id_vector.size()); + + // if we tracked this object when the archive was saved + if(tracking){ + // if it was already read + if(!track(ar, t)) + // we're done + return; + // add a new enty into the tracking list + object_id_vector.push_back(aobject(t, cid)); + // and add an entry for this object + m_moveable_objects.end = object_id_type(object_id_vector.size()); + } + // read data + (bis.load_object_data)(ar, t, co.file_version); + m_moveable_objects.recent = this_id; +} + +inline const basic_pointer_iserializer * +basic_iarchive_impl::load_pointer( + basic_iarchive &ar, + void * & t, + const basic_pointer_iserializer * bpis_ptr, + const basic_pointer_iserializer * (*finder)( + const boost::serialization::extended_type_info & type_ + ) +){ + m_moveable_objects.is_pointer = true; + serialization::state_saver w(m_moveable_objects.is_pointer); + + class_id_type cid; + load(ar, cid); + + if(BOOST_SERIALIZATION_NULL_POINTER_TAG == cid){ + t = NULL; + return bpis_ptr; + } + + // if its a new class type - i.e. never been registered + if(class_id_type(cobject_info_set.size()) <= cid){ + // if its either abstract + if(NULL == bpis_ptr + // or polymorphic + || bpis_ptr->get_basic_serializer().is_polymorphic()){ + // is must have been exported + char key[BOOST_SERIALIZATION_MAX_KEY_SIZE]; + class_name_type class_name(key); + load(ar, class_name); + // if it has a class name + const serialization::extended_type_info *eti = NULL; + if(0 != key[0]) + eti = serialization::extended_type_info::find(key); + if(NULL == eti) + boost::serialization::throw_exception( + archive_exception(archive_exception::unregistered_class) + ); + bpis_ptr = (*finder)(*eti); + } + BOOST_ASSERT(NULL != bpis_ptr); + // class_id_type new_cid = register_type(bpis_ptr->get_basic_serializer()); + BOOST_VERIFY(register_type(bpis_ptr->get_basic_serializer()) == cid); + int i = cid; + cobject_id_vector[i].bpis_ptr = bpis_ptr; + } + int i = cid; + cobject_id & co = cobject_id_vector[i]; + bpis_ptr = co.bpis_ptr; + + if (bpis_ptr == NULL) { + boost::serialization::throw_exception( + archive_exception(archive_exception::unregistered_class) + ); + } + + load_preamble(ar, co); + + // extra line to evade borland issue + const bool tracking = co.tracking_level; + // if we're tracking and the pointer has already been read + if(tracking && ! track(ar, t)) + // we're done + return bpis_ptr; + + // save state + serialization::state_saver w_start(m_moveable_objects.start); + + // allocate space on the heap for the object - to be constructed later + t = bpis_ptr->heap_allocation(); + BOOST_ASSERT(NULL != t); + + if(! tracking){ + bpis_ptr->load_object_ptr(ar, t, co.file_version); + } + else{ + serialization::state_saver x(m_pending.object); + serialization::state_saver y(m_pending.bis); + serialization::state_saver z(m_pending.version); + + m_pending.bis = & bpis_ptr->get_basic_serializer(); + m_pending.version = co.file_version; + + // predict next object id to be created + const size_t ui = object_id_vector.size(); + + serialization::state_saver w_end(m_moveable_objects.end); + + // add to list of serialized objects so that we can properly handle + // cyclic strucures + object_id_vector.push_back(aobject(t, cid)); + + // remember that that the address of these elements could change + // when we make another call so don't use the address + bpis_ptr->load_object_ptr( + ar, + t, + m_pending.version + ); + object_id_vector[ui].loaded_as_pointer = true; + } + + return bpis_ptr; +} + +} // namespace detail +} // namespace archive +} // namespace boost + +////////////////////////////////////////////////////////////////////// +// implementation of basic_iarchive functions +namespace boost { +namespace archive { +namespace detail { + +BOOST_ARCHIVE_DECL void +basic_iarchive::next_object_pointer(void *t){ + pimpl->next_object_pointer(t); +} + +BOOST_ARCHIVE_DECL +basic_iarchive::basic_iarchive(unsigned int flags) : + pimpl(new basic_iarchive_impl(flags)) +{} + +BOOST_ARCHIVE_DECL +basic_iarchive::~basic_iarchive() +{} + +BOOST_ARCHIVE_DECL void +basic_iarchive::set_library_version(library_version_type archive_library_version){ + pimpl->set_library_version(archive_library_version); +} + +BOOST_ARCHIVE_DECL void +basic_iarchive::reset_object_address( + const void * new_address, + const void * old_address +){ + pimpl->reset_object_address(new_address, old_address); +} + +BOOST_ARCHIVE_DECL void +basic_iarchive::load_object( + void *t, + const basic_iserializer & bis +){ + pimpl->load_object(*this, t, bis); +} + +// load a pointer object +BOOST_ARCHIVE_DECL const basic_pointer_iserializer * +basic_iarchive::load_pointer( + void * &t, + const basic_pointer_iserializer * bpis_ptr, + const basic_pointer_iserializer * (*finder)( + const boost::serialization::extended_type_info & type_ + ) + +){ + return pimpl->load_pointer(*this, t, bpis_ptr, finder); +} + +BOOST_ARCHIVE_DECL void +basic_iarchive::register_basic_serializer(const basic_iserializer & bis){ + pimpl->register_type(bis); +} + +BOOST_ARCHIVE_DECL void +basic_iarchive::delete_created_pointers() +{ + pimpl->delete_created_pointers(); +} + +BOOST_ARCHIVE_DECL boost::archive::library_version_type +basic_iarchive::get_library_version() const{ + return pimpl->m_archive_library_version; +} + +BOOST_ARCHIVE_DECL unsigned int +basic_iarchive::get_flags() const{ + return pimpl->m_flags; +} + +} // namespace detail +} // namespace archive +} // namespace boost diff --git a/src/boost/libs/serialization/src/basic_iserializer.cpp b/src/boost/libs/serialization/src/basic_iserializer.cpp new file mode 100644 index 000000000..3898a6a72 --- /dev/null +++ b/src/boost/libs/serialization/src/basic_iserializer.cpp @@ -0,0 +1,34 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_iserializer.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include // NULL + +#define BOOST_ARCHIVE_SOURCE +#include +#include + +namespace boost { +namespace archive { +namespace detail { + +BOOST_ARCHIVE_DECL +basic_iserializer::basic_iserializer( + const boost::serialization::extended_type_info & eti +) : + basic_serializer(eti), + m_bpis(NULL) +{} + +BOOST_ARCHIVE_DECL +basic_iserializer::~basic_iserializer(){} + +} // namespace detail +} // namespace archive +} // namespace boost diff --git a/src/boost/libs/serialization/src/basic_oarchive.cpp b/src/boost/libs/serialization/src/basic_oarchive.cpp new file mode 100644 index 000000000..4df648dc4 --- /dev/null +++ b/src/boost/libs/serialization/src/basic_oarchive.cpp @@ -0,0 +1,470 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_oarchive.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include // msvc 6.0 needs this for warning suppression + +#include +#include +#include // NULL + +#include + +// including this here to work around an ICC in intel 7.0 +// normally this would be part of basic_oarchive.hpp below. +#define BOOST_ARCHIVE_SOURCE +// include this to prevent linker errors when the +// same modules are marked export and import. +#define BOOST_SERIALIZATION_SOURCE +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4251 4231 4660 4275) +#endif + +using namespace boost::serialization; + +namespace boost { +namespace archive { +namespace detail { + +class basic_oarchive_impl { + friend class basic_oarchive; + unsigned int m_flags; + + ////////////////////////////////////////////////////////////////////// + // information about each serialized object saved + // keyed on address, class_id + struct aobject + { + const void * address; + class_id_type class_id; + object_id_type object_id; + + bool operator<(const aobject &rhs) const + { + BOOST_ASSERT(NULL != address); + BOOST_ASSERT(NULL != rhs.address); + if( address < rhs.address ) + return true; + if( address > rhs.address ) + return false; + return class_id < rhs.class_id; + } + aobject & operator=(const aobject & rhs) + { + address = rhs.address; + class_id = rhs.class_id; + object_id = rhs.object_id; + return *this; + } + aobject( + const void *a, + class_id_type class_id_, + object_id_type object_id_ + ) : + address(a), + class_id(class_id_), + object_id(object_id_) + {} + aobject() : address(NULL){} + }; + // keyed on class_id, address + typedef std::set object_set_type; + object_set_type object_set; + + ////////////////////////////////////////////////////////////////////// + // information about each serialized class saved + // keyed on type_info + struct cobject_type + { + const basic_oserializer * m_bos_ptr; + const class_id_type m_class_id; + bool m_initialized; + cobject_type( + std::size_t class_id, + const basic_oserializer & bos + ) : + m_bos_ptr(& bos), + m_class_id(class_id), + m_initialized(false) + {} + cobject_type(const basic_oserializer & bos) : + m_bos_ptr(& bos), + m_initialized(false) + {} + cobject_type( + const cobject_type & rhs + ) : + m_bos_ptr(rhs.m_bos_ptr), + m_class_id(rhs.m_class_id), + m_initialized(rhs.m_initialized) + {} + // the following cannot be defined because of the const + // member. This will generate a link error if an attempt + // is made to assign. This should never be necessary + // use this only for lookup argument + cobject_type & operator=(const cobject_type &rhs); + bool operator<(const cobject_type &rhs) const { + return *m_bos_ptr < *(rhs.m_bos_ptr); + } + }; + // keyed on type_info + typedef std::set cobject_info_set_type; + cobject_info_set_type cobject_info_set; + + // list of objects initially stored as pointers - used to detect errors + // keyed on object id + std::set stored_pointers; + + // address of the most recent object serialized as a poiner + // whose data itself is now pending serialization + const void * pending_object; + const basic_oserializer * pending_bos; + + basic_oarchive_impl(unsigned int flags) : + m_flags(flags), + pending_object(NULL), + pending_bos(NULL) + {} + + const cobject_type & + find(const basic_oserializer & bos); + const basic_oserializer * + find(const serialization::extended_type_info &ti) const; + +//public: + const cobject_type & + register_type(const basic_oserializer & bos); + void save_object( + basic_oarchive & ar, + const void *t, + const basic_oserializer & bos + ); + void save_pointer( + basic_oarchive & ar, + const void * t, + const basic_pointer_oserializer * bpos + ); +}; + +////////////////////////////////////////////////////////////////////// +// basic_oarchive implementation functions + +// given a type_info - find its bos +// return NULL if not found +inline const basic_oserializer * +basic_oarchive_impl::find(const serialization::extended_type_info & ti) const { + #ifdef BOOST_MSVC + # pragma warning(push) + # pragma warning(disable : 4511 4512) + #endif + class bosarg : + public basic_oserializer + { + bool class_info() const { + BOOST_ASSERT(false); + return false; + } + // returns true if objects should be tracked + bool tracking(const unsigned int) const { + BOOST_ASSERT(false); + return false; + } + // returns class version + version_type version() const { + BOOST_ASSERT(false); + return version_type(0); + } + // returns true if this class is polymorphic + bool is_polymorphic() const{ + BOOST_ASSERT(false); + return false; + } + void save_object_data( + basic_oarchive & /*ar*/, const void * /*x*/ + ) const { + BOOST_ASSERT(false); + } + public: + bosarg(const serialization::extended_type_info & eti) : + boost::archive::detail::basic_oserializer(eti) + {} + }; + #ifdef BOOST_MSVC + #pragma warning(pop) + #endif + bosarg bos(ti); + cobject_info_set_type::const_iterator cit + = cobject_info_set.find(cobject_type(bos)); + // it should already have been "registered" - see below + if(cit == cobject_info_set.end()){ + // if an entry is not found in the table it is because a pointer + // of a derived class has been serialized through its base class + // but the derived class hasn't been "registered" + return NULL; + } + // return pointer to the real class + return cit->m_bos_ptr; +} + +inline const basic_oarchive_impl::cobject_type & +basic_oarchive_impl::find(const basic_oserializer & bos) +{ + std::pair cresult = + cobject_info_set.insert(cobject_type(cobject_info_set.size(), bos)); + return *(cresult.first); +} + +inline const basic_oarchive_impl::cobject_type & +basic_oarchive_impl::register_type( + const basic_oserializer & bos +){ + cobject_type co(cobject_info_set.size(), bos); + std::pair + result = cobject_info_set.insert(co); + return *(result.first); +} + +inline void +basic_oarchive_impl::save_object( + basic_oarchive & ar, + const void *t, + const basic_oserializer & bos +){ + // if its been serialized through a pointer and the preamble's been done + if(t == pending_object && pending_bos == & bos){ + // just save the object data + ar.end_preamble(); + (bos.save_object_data)(ar, t); + return; + } + + // get class information for this object + const cobject_type & co = register_type(bos); + if(bos.class_info()){ + if( ! co.m_initialized){ + ar.vsave(class_id_optional_type(co.m_class_id)); + ar.vsave(tracking_type(bos.tracking(m_flags))); + ar.vsave(version_type(bos.version())); + (const_cast(co)).m_initialized = true; + } + } + + // we're not tracking this type of object + if(! bos.tracking(m_flags)){ + // just windup the preamble - no object id to write + ar.end_preamble(); + // and save the data + (bos.save_object_data)(ar, t); + return; + } + + // look for an existing object id + object_id_type oid(object_set.size()); + // lookup to see if this object has already been written to the archive + basic_oarchive_impl::aobject ao(t, co.m_class_id, oid); + std::pair + aresult = object_set.insert(ao); + oid = aresult.first->object_id; + + // if its a new object + if(aresult.second){ + // write out the object id + ar.vsave(oid); + ar.end_preamble(); + // and data + (bos.save_object_data)(ar, t); + return; + } + + // check that it wasn't originally stored through a pointer + if(stored_pointers.end() != stored_pointers.find(oid)){ + // this has to be a user error. loading such an archive + // would create duplicate objects + boost::serialization::throw_exception( + archive_exception(archive_exception::pointer_conflict) + ); + } + // just save the object id + ar.vsave(object_reference_type(oid)); + ar.end_preamble(); + return; +} + +// colle +inline void +basic_oarchive_impl::save_pointer( + basic_oarchive & ar, + const void * t, + const basic_pointer_oserializer * bpos_ptr +){ + const basic_oserializer & bos = bpos_ptr->get_basic_serializer(); + std::size_t original_count = cobject_info_set.size(); + const cobject_type & co = register_type(bos); + if(! co.m_initialized){ + ar.vsave(co.m_class_id); + // if its a previously unregistered class + if((cobject_info_set.size() > original_count)){ + if(bos.is_polymorphic()){ + const serialization::extended_type_info *eti = & bos.get_eti(); + const char * key = NULL; + if(NULL != eti) + key = eti->get_key(); + if(NULL != key){ + // the following is required by IBM C++ compiler which + // makes a copy when passing a non-const to a const. This + // is permitted by the standard but rarely seen in practice + const class_name_type cn(key); + if(cn.size() > (BOOST_SERIALIZATION_MAX_KEY_SIZE - 1)) + boost::serialization::throw_exception( + boost::archive::archive_exception( + boost::archive::archive_exception:: + invalid_class_name) + ); + // write out the external class identifier + ar.vsave(cn); + } + else + // without an external class name + // we won't be able to de-serialize it so bail now + boost::serialization::throw_exception( + archive_exception(archive_exception::unregistered_class) + ); + } + } + if(bos.class_info()){ + ar.vsave(tracking_type(bos.tracking(m_flags))); + ar.vsave(version_type(bos.version())); + } + (const_cast(co)).m_initialized = true; + } + else{ + ar.vsave(class_id_reference_type(co.m_class_id)); + } + + // if we're not tracking + if(! bos.tracking(m_flags)){ + // just save the data itself + ar.end_preamble(); + serialization::state_saver x(pending_object); + serialization::state_saver y(pending_bos); + pending_object = t; + pending_bos = & bpos_ptr->get_basic_serializer(); + bpos_ptr->save_object_ptr(ar, t); + return; + } + + object_id_type oid(object_set.size()); + // lookup to see if this object has already been written to the archive + basic_oarchive_impl::aobject ao(t, co.m_class_id, oid); + std::pair + aresult = object_set.insert(ao); + oid = aresult.first->object_id; + // if the saved object already exists + if(! aresult.second){ + // append the object id to he preamble + ar.vsave(object_reference_type(oid)); + // and windup. + ar.end_preamble(); + return; + } + + // append id of this object to preamble + ar.vsave(oid); + ar.end_preamble(); + + // and save the object itself + serialization::state_saver x(pending_object); + serialization::state_saver y(pending_bos); + pending_object = t; + pending_bos = & bpos_ptr->get_basic_serializer(); + bpos_ptr->save_object_ptr(ar, t); + // add to the set of object initially stored through pointers + stored_pointers.insert(oid); +} + +} // namespace detail +} // namespace archive +} // namespace boost + +////////////////////////////////////////////////////////////////////// +// implementation of basic_oarchive functions + +namespace boost { +namespace archive { +namespace detail { + +BOOST_ARCHIVE_DECL +basic_oarchive::basic_oarchive(unsigned int flags) + : pimpl(new basic_oarchive_impl(flags)) +{} + +BOOST_ARCHIVE_DECL +basic_oarchive::~basic_oarchive() +{} + +BOOST_ARCHIVE_DECL void +basic_oarchive::save_object( + const void *x, + const basic_oserializer & bos +){ + pimpl->save_object(*this, x, bos); +} + +BOOST_ARCHIVE_DECL void +basic_oarchive::save_pointer( + const void * t, + const basic_pointer_oserializer * bpos_ptr +){ + pimpl->save_pointer(*this, t, bpos_ptr); +} + +BOOST_ARCHIVE_DECL void +basic_oarchive::register_basic_serializer(const basic_oserializer & bos){ + pimpl->register_type(bos); +} + +BOOST_ARCHIVE_DECL library_version_type +basic_oarchive::get_library_version() const{ + return BOOST_ARCHIVE_VERSION(); +} + +BOOST_ARCHIVE_DECL unsigned int +basic_oarchive::get_flags() const{ + return pimpl->m_flags; +} + +BOOST_ARCHIVE_DECL void +basic_oarchive::end_preamble(){ +} + +BOOST_ARCHIVE_DECL helper_collection & +basic_oarchive::get_helper_collection(){ + return *this; +} + +} // namespace detail +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif diff --git a/src/boost/libs/serialization/src/basic_oserializer.cpp b/src/boost/libs/serialization/src/basic_oserializer.cpp new file mode 100644 index 000000000..afe08c4bb --- /dev/null +++ b/src/boost/libs/serialization/src/basic_oserializer.cpp @@ -0,0 +1,34 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_oserializer.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include // NULL + +#define BOOST_ARCHIVE_SOURCE +#include +#include + +namespace boost { +namespace archive { +namespace detail { + +BOOST_ARCHIVE_DECL +basic_oserializer::basic_oserializer( + const boost::serialization::extended_type_info & eti +) : + basic_serializer(eti), + m_bpos(NULL) +{} + +BOOST_ARCHIVE_DECL +basic_oserializer::~basic_oserializer(){} + +} // namespace detail +} // namespace archive +} // namespace boost diff --git a/src/boost/libs/serialization/src/basic_pointer_iserializer.cpp b/src/boost/libs/serialization/src/basic_pointer_iserializer.cpp new file mode 100644 index 000000000..7cf63f306 --- /dev/null +++ b/src/boost/libs/serialization/src/basic_pointer_iserializer.cpp @@ -0,0 +1,31 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_pointer_iserializer.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#define BOOST_ARCHIVE_SOURCE +#include +#include + +namespace boost { +namespace archive { +namespace detail { + +BOOST_ARCHIVE_DECL +basic_pointer_iserializer::basic_pointer_iserializer( + const boost::serialization::extended_type_info & eti +) : + basic_serializer(eti) +{} + +BOOST_ARCHIVE_DECL +basic_pointer_iserializer::~basic_pointer_iserializer() {} + +} // namespace detail +} // namespace archive +} // namespace boost diff --git a/src/boost/libs/serialization/src/basic_pointer_oserializer.cpp b/src/boost/libs/serialization/src/basic_pointer_oserializer.cpp new file mode 100644 index 000000000..e86f7b78e --- /dev/null +++ b/src/boost/libs/serialization/src/basic_pointer_oserializer.cpp @@ -0,0 +1,31 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_pointer_oserializer.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#define BOOST_ARCHIVE_SOURCE +#include +#include + +namespace boost { +namespace archive { +namespace detail { + +BOOST_ARCHIVE_DECL +basic_pointer_oserializer::basic_pointer_oserializer( + const boost::serialization::extended_type_info & eti +) : + basic_serializer(eti) +{} + +BOOST_ARCHIVE_DECL +basic_pointer_oserializer::~basic_pointer_oserializer() {} + +} // namespace detail +} // namespace archive +} // namespace boost diff --git a/src/boost/libs/serialization/src/basic_serializer_map.cpp b/src/boost/libs/serialization/src/basic_serializer_map.cpp new file mode 100644 index 000000000..5b7910772 --- /dev/null +++ b/src/boost/libs/serialization/src/basic_serializer_map.cpp @@ -0,0 +1,112 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// serializer_map.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#include +#include + +#define BOOST_ARCHIVE_SOURCE +// include this to prevent linker errors when the +// same modules are marked export and import. +#define BOOST_SERIALIZATION_SOURCE +#include +#include + +#include +#include +#include + +namespace boost { + namespace serialization { + class extended_type_info; + } +namespace archive { +namespace detail { + +bool +basic_serializer_map::type_info_pointer_compare::operator()( + const basic_serializer * lhs, const basic_serializer * rhs +) const { + return *lhs < *rhs; +} + +BOOST_ARCHIVE_DECL bool +basic_serializer_map::insert(const basic_serializer * bs){ + // attempt to insert serializer into it's map + // the following is commented out - rather than being just + // deleted as a reminder not to try this. + + // const std::pair result = + m_map.insert(bs); + + // At first it seemed like a good idea. It enforced the + // idea that a type be exported from at most one code module + // (DLL or mainline). This would enforce a "one definition rule" + // across code modules. This seems a good idea to me. + // But it seems that it's just too hard for many users to implement. + + // Ideally, I would like to make this exception a warning - + // but there isn't anyway to do that. + + // if this fails, it's because it's been instantiated + // in multiple modules - DLLS - a recipe for problems. + // So trap this here + // if(!result.second){ + // boost::serialization::throw_exception( + // archive_exception( + // archive_exception::multiple_code_instantiation, + // bs->get_debug_info() + // ) + // ); + // } + return true; +} + +BOOST_ARCHIVE_DECL void +basic_serializer_map::erase(const basic_serializer * bs){ + map_type::iterator it = m_map.begin(); + map_type::iterator it_end = m_map.end(); + + while(it != it_end){ + // note item 9 from Effective STL !!! it++ + if(*it == bs) + m_map.erase(it++); + else + it++; + } + // note: we can't do this since some of the eti records + // we're pointing to might be expired and the comparison + // won't work. Leave this as a reminder not to "optimize" this. + //it = m_map.find(bs); + //assert(it != m_map.end()); + //if(*it == bs) + // m_map.erase(it); +} +BOOST_ARCHIVE_DECL const basic_serializer * +basic_serializer_map::find( + const boost::serialization::extended_type_info & eti +) const { + const basic_serializer_arg bs(eti); + map_type::const_iterator it; + it = m_map.find(& bs); + if(it == m_map.end()){ + BOOST_ASSERT(false); + return 0; + } + return *it; +} + +} // namespace detail +} // namespace archive +} // namespace boost + diff --git a/src/boost/libs/serialization/src/basic_text_iprimitive.cpp b/src/boost/libs/serialization/src/basic_text_iprimitive.cpp new file mode 100644 index 000000000..c0b7f7668 --- /dev/null +++ b/src/boost/libs/serialization/src/basic_text_iprimitive.cpp @@ -0,0 +1,29 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_text_iprimitive.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#include + +#define BOOST_ARCHIVE_SOURCE +#include +#include +#include + +namespace boost { +namespace archive { + +// explicitly instantiate for this type of text stream +template class basic_text_iprimitive ; + +} // namespace archive +} // namespace boost diff --git a/src/boost/libs/serialization/src/basic_text_oprimitive.cpp b/src/boost/libs/serialization/src/basic_text_oprimitive.cpp new file mode 100644 index 000000000..601662294 --- /dev/null +++ b/src/boost/libs/serialization/src/basic_text_oprimitive.cpp @@ -0,0 +1,29 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_text_oprimitive.cpp: + +// (C) Copyright 2004 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#include + +#define BOOST_ARCHIVE_SOURCE +#include +#include +#include + +namespace boost { +namespace archive { + +// explicitly instantiate for this type of text stream +template class basic_text_oprimitive ; + +} // namespace archive +} // namespace boost diff --git a/src/boost/libs/serialization/src/basic_text_wiprimitive.cpp b/src/boost/libs/serialization/src/basic_text_wiprimitive.cpp new file mode 100644 index 000000000..28250007b --- /dev/null +++ b/src/boost/libs/serialization/src/basic_text_wiprimitive.cpp @@ -0,0 +1,36 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_text_wiprimitive.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#include + +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_WARCHIVE_SOURCE +#include +#include +#include + +namespace boost { +namespace archive { + +template class basic_text_iprimitive ; + +} // namespace archive +} // namespace boost + +#endif // BOOST_NO_STD_WSTREAMBUF diff --git a/src/boost/libs/serialization/src/basic_text_woprimitive.cpp b/src/boost/libs/serialization/src/basic_text_woprimitive.cpp new file mode 100644 index 000000000..6c0caa979 --- /dev/null +++ b/src/boost/libs/serialization/src/basic_text_woprimitive.cpp @@ -0,0 +1,36 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_text_woprimitive.cpp: + +// (C) Copyright 2004 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#include + +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_WARCHIVE_SOURCE +#include +#include +#include + +namespace boost { +namespace archive { + +template class basic_text_oprimitive ; + +} // namespace archive +} // namespace boost + +#endif // BOOST_NO_STD_WSTREAMBUF diff --git a/src/boost/libs/serialization/src/basic_xml_archive.cpp b/src/boost/libs/serialization/src/basic_xml_archive.cpp new file mode 100644 index 000000000..23ab1819d --- /dev/null +++ b/src/boost/libs/serialization/src/basic_xml_archive.cpp @@ -0,0 +1,52 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_xml_archive.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#define BOOST_ARCHIVE_SOURCE +#include +#include + +namespace boost { +namespace archive { + +BOOST_SYMBOL_VISIBLE const char * +BOOST_ARCHIVE_XML_OBJECT_ID(){ + return "object_id"; +} +BOOST_SYMBOL_VISIBLE const char * +BOOST_ARCHIVE_XML_OBJECT_REFERENCE(){ + return "object_id_reference"; +} +BOOST_SYMBOL_VISIBLE const char * +BOOST_ARCHIVE_XML_CLASS_ID(){ + return "class_id"; +} +BOOST_SYMBOL_VISIBLE const char * +BOOST_ARCHIVE_XML_CLASS_ID_REFERENCE(){ + return "class_id_reference"; +} +BOOST_SYMBOL_VISIBLE const char * +BOOST_ARCHIVE_XML_CLASS_NAME(){ + return "class_name"; +} +BOOST_SYMBOL_VISIBLE const char * +BOOST_ARCHIVE_XML_TRACKING(){ + return "tracking_level"; +} +BOOST_SYMBOL_VISIBLE const char * +BOOST_ARCHIVE_XML_VERSION(){ + return "version"; +} +BOOST_SYMBOL_VISIBLE const char * +BOOST_ARCHIVE_XML_SIGNATURE(){ + return "signature"; +} + +}// namespace archive +}// namespace boost diff --git a/src/boost/libs/serialization/src/basic_xml_grammar.ipp b/src/boost/libs/serialization/src/basic_xml_grammar.ipp new file mode 100644 index 000000000..dcec1cc6b --- /dev/null +++ b/src/boost/libs/serialization/src/basic_xml_grammar.ipp @@ -0,0 +1,468 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// basic_xml_grammar.ipp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#include +#include +#include // typename + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4244 4511 4512) +#endif + +#include // errno +#include // strerror(errno) + +// spirit stuff +#include +#include +#include + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +// for head_iterator test +#include + +#include +#include +#include +#include +#include +#include + +using namespace boost::spirit::classic; + +namespace boost { +namespace archive { + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// template code for basic_xml_grammar of both wchar_t and char types + +namespace xml { // anonymous + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +template +struct assign_impl { + T & t; + void operator()(const T t_) const { + t = t_; + } + assign_impl(T & t_) + : t(t_) + {} +}; + +template<> +struct assign_impl { + std::string & t; + void operator()( + std::string::const_iterator b, + std::string::const_iterator e + ) const { + t.resize(0); + while(b != e){ + t += * b; + ++b; + } + } + assign_impl & operator=( + assign_impl & rhs + ); + assign_impl(std::string & t_) + : t(t_) + {} +}; + +#ifndef BOOST_NO_STD_WSTRING +template<> +struct assign_impl { + std::wstring & t; + void operator()( + std::wstring::const_iterator b, + std::wstring::const_iterator e + ) const { + t.resize(0); + while(b != e){ + t += * b; + ++b; + } + } + assign_impl(std::wstring & t_) + : t(t_) + {} +}; +#endif + +template +assign_impl assign_object(T &t){ + return assign_impl(t); +} + +struct assign_level { + tracking_type & tracking_level; + void operator()(const unsigned int tracking_level_) const { + tracking_level = (0 == tracking_level_) ? false : true; + } + assign_level(tracking_type & tracking_level_) + : tracking_level(tracking_level_) + {} +}; + +template +struct append_string { + String & contents; + void operator()(Iterator start, Iterator end) const { + #if 0 + typedef boost::archive::iterators::xml_unescape translator; + contents.append( + translator(BOOST_MAKE_PFTO_WRAPPER(start)), + translator(BOOST_MAKE_PFTO_WRAPPER(end)) + ); + #endif + contents.append(start, end); + } + append_string(String & contents_) + : contents(contents_) + {} +}; + +template +struct append_char { + String & contents; + void operator()(const unsigned int char_value) const { + contents += static_cast(char_value); + } + append_char(String & contents_) + : contents(contents_) + {} +}; + +template +struct append_lit { + String & contents; + template + void operator()(const X & /*x*/, const Y & /*y*/) const { + const typename String::value_type z = c; + contents += z; + } + append_lit(String & contents_) + : contents(contents_) + {} +}; + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +} // namespace anonymous + +template +bool basic_xml_grammar::my_parse( + typename basic_xml_grammar::IStream & is, + const rule_t & rule_, + CharType delimiter +) const { + if(is.fail()){ + return false; + } + + is >> std::noskipws; + + std::basic_string arg; + + for(;;){ + CharType result; + is.get(result); + if(is.fail()){ + boost::serialization::throw_exception( + boost::archive::archive_exception( + archive_exception::input_stream_error, + std::strerror(errno) + ) + ); + } + if(is.eof()) + return false; + arg += result; + if(result == delimiter) + break; + } + + // read just one more character. This will be the newline after the tag + // this is so that the next operation will return fail if the archive + // is terminated. This will permit the archive to be used for debug + // and transaction data logging in the standard way. + + parse_info::iterator> + result = boost::spirit::classic::parse(arg.begin(), arg.end(), rule_); + return result.hit; +} + +template +bool basic_xml_grammar::parse_start_tag( + typename basic_xml_grammar::IStream & is +){ + rv.class_name.resize(0); + return my_parse(is, STag); +} + +template +bool basic_xml_grammar::parse_end_tag(IStream & is) const { + return my_parse(is, ETag); +} + +template +bool basic_xml_grammar::parse_string(IStream & is, StringType & s){ + rv.contents.resize(0); + bool result = my_parse(is, content, '<'); + // note: unget caused a problem with dinkumware. replace with + // is.unget(); + // putback another delimiter instead + is.putback('<'); + if(result) + s = rv.contents; + return result; +} + +template +basic_xml_grammar::basic_xml_grammar(){ + init_chset(); + + S = + +(Sch) + ; + + // refactoring to workaround template depth on darwin + NameHead = (Letter | '_' | ':'); + NameTail = *NameChar ; + Name = + NameHead >> NameTail + ; + + Eq = + !S >> '=' >> !S + ; + + AttributeList = + *(S >> Attribute) + ; + + STag = + !S + >> '<' + >> Name [xml::assign_object(rv.object_name)] + >> AttributeList + >> !S + >> '>' + ; + + ETag = + !S + >> "> Name [xml::assign_object(rv.object_name)] + >> !S + >> '>' + ; + + // refactoring to workaround template depth on darwin + CharDataChars = +(anychar_p - chset_p(L"&<")); + CharData = + CharDataChars [ + xml::append_string< + StringType, + typename std::basic_string::const_iterator + >(rv.contents) + ] + ; + + // slight factoring works around ICE in msvc 6.0 + CharRef1 = + str_p(L"&#") >> uint_p [xml::append_char(rv.contents)] >> L';' + ; + CharRef2 = + str_p(L"&#x") >> hex_p [xml::append_char(rv.contents)] >> L';' + ; + CharRef = CharRef1 | CharRef2 ; + + AmpRef = str_p(L"&")[xml::append_lit(rv.contents)]; + LTRef = str_p(L"<")[xml::append_lit(rv.contents)]; + GTRef = str_p(L">")[xml::append_lit'>(rv.contents)]; + AposRef = str_p(L"'")[xml::append_lit(rv.contents)]; + QuoteRef = str_p(L""")[xml::append_lit(rv.contents)]; + + Reference = + AmpRef + | LTRef + | GTRef + | AposRef + | QuoteRef + | CharRef + ; + + content = + L"<" // should be end_p + | +(Reference | CharData) >> L"<" + ; + + ClassIDAttribute = + str_p(BOOST_ARCHIVE_XML_CLASS_ID()) >> NameTail + >> Eq + >> L'"' + >> int_p [xml::assign_object(rv.class_id)] + >> L'"' + ; + + ObjectIDAttribute = ( + str_p(BOOST_ARCHIVE_XML_OBJECT_ID()) + | + str_p(BOOST_ARCHIVE_XML_OBJECT_REFERENCE()) + ) + >> NameTail + >> Eq + >> L'"' + >> L'_' + >> uint_p [xml::assign_object(rv.object_id)] + >> L'"' + ; + + AmpName = str_p(L"&")[xml::append_lit(rv.class_name)]; + LTName = str_p(L"<")[xml::append_lit(rv.class_name)]; + GTName = str_p(L">")[xml::append_lit'>(rv.class_name)]; + ClassNameChar = + AmpName + | LTName + | GTName + | (anychar_p - chset_p(L"\"")) [xml::append_char(rv.class_name)] + ; + + ClassName = + * ClassNameChar + ; + + ClassNameAttribute = + str_p(BOOST_ARCHIVE_XML_CLASS_NAME()) + >> Eq + >> L'"' + >> ClassName + >> L'"' + ; + + TrackingAttribute = + str_p(BOOST_ARCHIVE_XML_TRACKING()) + >> Eq + >> L'"' + >> uint_p [xml::assign_level(rv.tracking_level)] + >> L'"' + ; + + VersionAttribute = + str_p(BOOST_ARCHIVE_XML_VERSION()) + >> Eq + >> L'"' + >> uint_p [xml::assign_object(rv.version)] + >> L'"' + ; + + UnusedAttribute = + Name + >> Eq + >> L'"' + >> !CharData + >> L'"' + ; + + Attribute = + ClassIDAttribute + | ObjectIDAttribute + | ClassNameAttribute + | TrackingAttribute + | VersionAttribute + | UnusedAttribute + ; + + XMLDeclChars = *(anychar_p - chset_p(L"?>")); + XMLDecl = + !S + >> str_p(L"> S + >> str_p(L"version") + >> Eq + >> str_p(L"\"1.0\"") + >> XMLDeclChars + >> !S + >> str_p(L"?>") + ; + + DocTypeDeclChars = *(anychar_p - chset_p(L">")); + DocTypeDecl = + !S + >> str_p(L"> DocTypeDeclChars + >> L'>' + ; + + SignatureAttribute = + str_p(L"signature") + >> Eq + >> L'"' + >> Name [xml::assign_object(rv.class_name)] + >> L'"' + ; + + SerializationWrapper = + !S + >> str_p(L"> S + >> ( (SignatureAttribute >> S >> VersionAttribute) + | (VersionAttribute >> S >> SignatureAttribute) + ) + >> !S + >> L'>' + ; +} + +template +void basic_xml_grammar::init(IStream & is){ + init_chset(); + if(! my_parse(is, XMLDecl)) + boost::serialization::throw_exception( + xml_archive_exception(xml_archive_exception::xml_archive_parsing_error) + ); + if(! my_parse(is, DocTypeDecl)) + boost::serialization::throw_exception( + xml_archive_exception(xml_archive_exception::xml_archive_parsing_error) + ); + if(! my_parse(is, SerializationWrapper)) + boost::serialization::throw_exception( + xml_archive_exception(xml_archive_exception::xml_archive_parsing_error) + ); + if(! std::equal(rv.class_name.begin(), rv.class_name.end(), BOOST_ARCHIVE_SIGNATURE())) + boost::serialization::throw_exception( + archive_exception(archive_exception::invalid_signature) + ); +} + +template +bool basic_xml_grammar::windup(IStream & is) { + return my_parse(is, ETag); +} + +} // namespace archive +} // namespace boost diff --git a/src/boost/libs/serialization/src/binary_iarchive.cpp b/src/boost/libs/serialization/src/binary_iarchive.cpp new file mode 100644 index 000000000..41aad8413 --- /dev/null +++ b/src/boost/libs/serialization/src/binary_iarchive.cpp @@ -0,0 +1,40 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// binary_iarchive.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#define BOOST_ARCHIVE_SOURCE +#include +#include +#include + +#include +#include +#include + +namespace boost { +namespace archive { + +// explicitly instantiate for this type of stream +template class detail::archive_serializer_map; +template class basic_binary_iprimitive< + binary_iarchive, + std::istream::char_type, + std::istream::traits_type +>; +template class basic_binary_iarchive ; +template class binary_iarchive_impl< + binary_iarchive, + std::istream::char_type, + std::istream::traits_type +>; + +} // namespace archive +} // namespace boost diff --git a/src/boost/libs/serialization/src/binary_oarchive.cpp b/src/boost/libs/serialization/src/binary_oarchive.cpp new file mode 100644 index 000000000..8b86d2cb3 --- /dev/null +++ b/src/boost/libs/serialization/src/binary_oarchive.cpp @@ -0,0 +1,40 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// binary_oarchive.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#define BOOST_ARCHIVE_SOURCE +#include +#include +#include + +// explicitly instantiate for this type of binary stream +#include +#include +#include + +namespace boost { +namespace archive { + +template class detail::archive_serializer_map; +template class basic_binary_oprimitive< + binary_oarchive, + std::ostream::char_type, + std::ostream::traits_type +>; +template class basic_binary_oarchive ; +template class binary_oarchive_impl< + binary_oarchive, + std::ostream::char_type, + std::ostream::traits_type +>; + +} // namespace archive +} // namespace boost diff --git a/src/boost/libs/serialization/src/binary_wiarchive.cpp b/src/boost/libs/serialization/src/binary_wiarchive.cpp new file mode 100644 index 000000000..720d469d7 --- /dev/null +++ b/src/boost/libs/serialization/src/binary_wiarchive.cpp @@ -0,0 +1,47 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// binary_wiarchive.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else + +#define BOOST_WARCHIVE_SOURCE +#include +#include + +// explicitly instantiate for this type of text stream +#include +#include +#include + +namespace boost { +namespace archive { + +// explicitly instantiate for this type of text stream +template class detail::archive_serializer_map; +template class basic_binary_iprimitive< + binary_wiarchive, + wchar_t, + std::char_traits +>; +template class basic_binary_iarchive ; +template class binary_iarchive_impl< + binary_wiarchive, + wchar_t, + std::char_traits +>; + +} // namespace archive +} // namespace boost + +#endif // BOOST_NO_STD_WSTREAMBUF + diff --git a/src/boost/libs/serialization/src/binary_woarchive.cpp b/src/boost/libs/serialization/src/binary_woarchive.cpp new file mode 100644 index 000000000..905a319d6 --- /dev/null +++ b/src/boost/libs/serialization/src/binary_woarchive.cpp @@ -0,0 +1,44 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// binary_woarchive.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else + +#define BOOST_WARCHIVE_SOURCE +#include + +// explicitly instantiate for this type of text stream +#include +#include +#include + +namespace boost { +namespace archive { + +template class detail::archive_serializer_map; +template class basic_binary_oprimitive< + binary_woarchive, + wchar_t, + std::char_traits +>; +template class basic_binary_oarchive ; +template class binary_oarchive_impl< + binary_woarchive, + wchar_t, + std::char_traits +>; + +} // namespace archive +} // namespace boost + +#endif // BOOST_NO_STD_WSTREAMBUF diff --git a/src/boost/libs/serialization/src/codecvt_null.cpp b/src/boost/libs/serialization/src/codecvt_null.cpp new file mode 100644 index 000000000..624afc216 --- /dev/null +++ b/src/boost/libs/serialization/src/codecvt_null.cpp @@ -0,0 +1,84 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// codecvt_null.cpp + +// Copyright (c) 2004 Robert Ramey, Indiana University (garcia@osl.iu.edu) +// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu). +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_WARCHIVE_SOURCE +#include +#include + +// codecvt implementation for passing wchar_t objects to char output +// without any translation whatever. Used to implement binary output +// of wchar_t objects. + +namespace boost { +namespace archive { + +std::codecvt_base::result +codecvt_null::do_out( + std::mbstate_t & /*state*/, + const wchar_t * first1, + const wchar_t * last1, + const wchar_t * & next1, + char * first2, + char * last2, + char * & next2 +) const { + while(first1 != last1){ + // Per std::22.2.1.5.2/2, we can store no more that + // last2-first2 characters. If we need to more encode + // next internal char type, return 'partial'. + if(static_cast(sizeof(wchar_t)) > (last2 - first2)){ + next1 = first1; + next2 = first2; + return std::codecvt_base::partial; + } + * reinterpret_cast(first2) = * first1++; + first2 += sizeof(wchar_t); + + } + next1 = first1; + next2 = first2; + return std::codecvt_base::ok; +} + +std::codecvt_base::result +codecvt_null::do_in( + std::mbstate_t & /*state*/, + const char * first1, + const char * last1, + const char * & next1, + wchar_t * first2, + wchar_t * last2, + wchar_t * & next2 +) const { + // Process input characters until we've run of them, + // or the number of remaining characters is not + // enough to construct another output character, + // or we've run out of place for output characters. + while(first2 != last2){ + // Have we converted all input characters? + // Return with 'ok', if so. + if (first1 == last1) + break; + // Do we have less input characters than needed + // for a single output character? + if(static_cast(sizeof(wchar_t)) > (last1 - first1)){ + next1 = first1; + next2 = first2; + return std::codecvt_base::partial; + } + *first2++ = * reinterpret_cast(first1); + first1 += sizeof(wchar_t); + } + next1 = first1; + next2 = first2; + return std::codecvt_base::ok; +} + +} // namespace archive +} // namespace boost diff --git a/src/boost/libs/serialization/src/extended_type_info.cpp b/src/boost/libs/serialization/src/extended_type_info.cpp new file mode 100644 index 000000000..573336c86 --- /dev/null +++ b/src/boost/libs/serialization/src/extended_type_info.cpp @@ -0,0 +1,196 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// extended_type_info.cpp: implementation for portable version of type_info + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#include +#include +#include +#include +#include // NULL + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ using ::strcmp; } +#endif + +#include // msvc needs this to suppress warning + +#include + +// it marks our code with proper attributes as being exported when +// we're compiling it while marking it import when just the headers +// is being included. +#define BOOST_SERIALIZATION_SOURCE +#include +#include +#include +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace serialization { +namespace detail { + +struct key_compare +{ + bool + operator()( + const extended_type_info * lhs, + const extended_type_info * rhs + ) const { + // performance shortcut + if(lhs == rhs) + return false; + const char * l = lhs->get_key(); + BOOST_ASSERT(NULL != l); + const char * r = rhs->get_key(); + BOOST_ASSERT(NULL != r); + // performance shortcut + // shortcut to exploit string pooling + if(l == r) + return false; + // for exported types, use the string key so that + // multiple instances in different translation units + // can be matched up + return std::strcmp(l, r) < 0; + } +}; + +typedef std::multiset ktmap; + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +class extended_type_info_arg : public extended_type_info +{ + virtual bool + is_less_than(const extended_type_info & /*rhs*/) const { + BOOST_ASSERT(false); + return false; + }; + virtual bool + is_equal(const extended_type_info & /*rhs*/) const { + BOOST_ASSERT(false); + return false; + }; + virtual const char * get_debug_info() const { + return get_key(); + } + virtual void * construct(unsigned int /*count*/, ...) const{ + BOOST_ASSERT(false); + return NULL; + } + virtual void destroy(void const * const /*p*/) const { + BOOST_ASSERT(false); + } +public: + extended_type_info_arg(const char * key) : + extended_type_info(0, key) + {} + + ~extended_type_info_arg(){ + } +}; + +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + +} // namespace detail + +BOOST_SERIALIZATION_DECL void +extended_type_info::key_register() const{ + if(NULL == get_key()) + return; + singleton::get_mutable_instance().insert(this); +} + +BOOST_SERIALIZATION_DECL void +extended_type_info::key_unregister() const{ + if(NULL == get_key()) + return; + // note: it's been discovered that at least one platform is not guaranteed + // to destroy singletons reverse order of construction. So we can't + // use a runtime assert here. Leave this in a reminder not to do this! + // BOOST_ASSERT(! singleton::is_destroyed()); + if(! singleton::is_destroyed()){ + detail::ktmap & x = singleton::get_mutable_instance(); + detail::ktmap::iterator start = x.lower_bound(this); + detail::ktmap::iterator end = x.upper_bound(this); + // remove entry in map which corresponds to this type + for(;start != end; ++start){ + if(this == *start){ + x.erase(start); + break; + } + } + } +} + +BOOST_SERIALIZATION_DECL const extended_type_info * +extended_type_info::find(const char *key) { + BOOST_ASSERT(NULL != key); + const detail::ktmap & k = singleton::get_const_instance(); + const detail::extended_type_info_arg eti_key(key); + const detail::ktmap::const_iterator it = k.find(& eti_key); + if(k.end() == it) + return NULL; + return *(it); +} + +BOOST_SERIALIZATION_DECL +extended_type_info::extended_type_info( + const unsigned int type_info_key, + const char * key +) : + m_type_info_key(type_info_key), + m_key(key) +{ +} + +BOOST_SERIALIZATION_DECL +extended_type_info::~extended_type_info(){ +} + +BOOST_SERIALIZATION_DECL bool +extended_type_info::operator<(const extended_type_info &rhs) const { + // short cut for a common cases + if(this == & rhs) + return false; + if(m_type_info_key == rhs.m_type_info_key){ + return is_less_than(rhs); + } + if(m_type_info_key < rhs.m_type_info_key) + return true; + return false; +} + +BOOST_SERIALIZATION_DECL bool +extended_type_info::operator==(const extended_type_info &rhs) const { + // short cut for a common cases + if(this == & rhs) + return true; + if(m_type_info_key != rhs.m_type_info_key){ + return false; + } + return is_equal(rhs); +} + +} // namespace serialization +} // namespace boost diff --git a/src/boost/libs/serialization/src/extended_type_info_no_rtti.cpp b/src/boost/libs/serialization/src/extended_type_info_no_rtti.cpp new file mode 100644 index 000000000..0a8d2a078 --- /dev/null +++ b/src/boost/libs/serialization/src/extended_type_info_no_rtti.cpp @@ -0,0 +1,89 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// extended_type_info_no_rtti.cpp: specific implementation of type info +// that is NOT based on typeid + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include // NULL +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ using ::strcmp; } +#endif + +// it marks our code with proper attributes as being exported when +// we're compiling it while marking it import when just the headers +// is being included. +#define BOOST_SERIALIZATION_SOURCE +#include +#include + +#define EXTENDED_TYPE_INFO_NO_RTTI_KEY 2 + +namespace boost { +namespace serialization { +namespace no_rtti_system { + +BOOST_SERIALIZATION_DECL +extended_type_info_no_rtti_0::extended_type_info_no_rtti_0( + const char * key +) : + extended_type_info(EXTENDED_TYPE_INFO_NO_RTTI_KEY, key) +{} + +BOOST_SERIALIZATION_DECL bool +extended_type_info_no_rtti_0::is_less_than( + const boost::serialization::extended_type_info &rhs) const +{ + // shortcut for common case + if(this == & rhs) + return false; + const char * l = get_key(); + const char * r = rhs.get_key(); + // if this assertion is triggered, it could mean one of the following + // a) This class was never exported - make sure all calls which use + // this method of type id are in fact exported. + // b) This class was used (e.g. serialized through a pointer) before + // it was exported. Make sure that classes which use this method + // of type id are NOT "automatically" registered by serializating + // through a pointer to the to most derived class. OR make sure + // that the BOOST_CLASS_EXPORT is included in every file + // which does this. + BOOST_ASSERT(NULL != l); + BOOST_ASSERT(NULL != r); + return std::strcmp(l, r) < 0; +} + +BOOST_SERIALIZATION_DECL bool +extended_type_info_no_rtti_0::is_equal( + const boost::serialization::extended_type_info &rhs) const +{ + // shortcut for common case + if(this == & rhs) + return true; + // null keys don't match with anything + const char * l = get_key(); + BOOST_ASSERT(NULL != l); + if(NULL == l) + return false; + const char * r = rhs.get_key(); + BOOST_ASSERT(NULL != r); + if(NULL == r) + return false; + return 0 == std::strcmp(l, r); +} + +BOOST_SERIALIZATION_DECL +extended_type_info_no_rtti_0::~extended_type_info_no_rtti_0() +{} + +} // namespece detail +} // namespace serialization +} // namespace boost diff --git a/src/boost/libs/serialization/src/extended_type_info_typeid.cpp b/src/boost/libs/serialization/src/extended_type_info_typeid.cpp new file mode 100644 index 000000000..91ace4c36 --- /dev/null +++ b/src/boost/libs/serialization/src/extended_type_info_typeid.cpp @@ -0,0 +1,167 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// extended_type_info_typeid.cpp: specific implementation of type info +// that is based on typeid + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include +#include +#include // NULL + +#include + +// it marks our code with proper attributes as being exported when +// we're compiling it while marking it import when just the headers +// is being included. +#define BOOST_SERIALIZATION_SOURCE +#include +#include +#include + +namespace boost { +namespace serialization { +namespace typeid_system { + +#define EXTENDED_TYPE_INFO_TYPE_KEY 1 + +struct type_compare +{ + bool + operator()( + const extended_type_info_typeid_0 * lhs, + const extended_type_info_typeid_0 * rhs + ) const { + return lhs->is_less_than(*rhs); + } +}; + +typedef std::multiset< + const extended_type_info_typeid_0 *, + type_compare +> tkmap; + +BOOST_SERIALIZATION_DECL bool +extended_type_info_typeid_0::is_less_than( + const boost::serialization::extended_type_info & rhs +) const { + // shortcut for common case + if(this == & rhs) + return false; + return 0 != m_ti->before( + *(static_cast(rhs).m_ti) + ); +} + +BOOST_SERIALIZATION_DECL bool +extended_type_info_typeid_0::is_equal( + const boost::serialization::extended_type_info & rhs +) const { + return + // note: std::type_info == operator returns an int !!! + // the following permits conversion to bool without a warning. + ! ( + * m_ti + != *(static_cast(rhs).m_ti) + ) + ; +} + +BOOST_SERIALIZATION_DECL +extended_type_info_typeid_0::extended_type_info_typeid_0( + const char * key +) : + extended_type_info(EXTENDED_TYPE_INFO_TYPE_KEY, key), + m_ti(NULL) +{} + +BOOST_SERIALIZATION_DECL +extended_type_info_typeid_0::~extended_type_info_typeid_0() +{} + +BOOST_SERIALIZATION_DECL void +extended_type_info_typeid_0::type_register(const std::type_info & ti){ + m_ti = & ti; + singleton::get_mutable_instance().insert(this); +} + +BOOST_SERIALIZATION_DECL void +extended_type_info_typeid_0::type_unregister() +{ + if(NULL != m_ti){ + // note: previously this conditional was a runtime assertion with + // BOOST_ASSERT. We've changed it because we've discovered that at + // least one platform is not guaranteed to destroy singletons in + // reverse order of distruction. + // BOOST_ASSERT(! singleton::is_destroyed()); + if(! singleton::is_destroyed()){ + tkmap & x = singleton::get_mutable_instance(); + + // remove all entries in map which corresponds to this type + // make sure that we don't use any invalidated iterators + for(;;){ + const tkmap::iterator & it = x.find(this); + if(it == x.end()) + break; + x.erase(it); + }; + } + } + m_ti = NULL; +} + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +// this derivation is used for creating search arguments +class extended_type_info_typeid_arg : + public extended_type_info_typeid_0 +{ + virtual void * construct(unsigned int /*count*/, ...) const{ + BOOST_ASSERT(false); + return NULL; + } + virtual void destroy(void const * const /*p*/) const { + BOOST_ASSERT(false); + } +public: + extended_type_info_typeid_arg(const std::type_info & ti) : + extended_type_info_typeid_0(NULL) + { + // note absense of self register and key as this is used only as + // search argument given a type_info reference and is not to + // be added to the map. + m_ti = & ti; + } + ~extended_type_info_typeid_arg(){ + m_ti = NULL; + } +}; + +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + +BOOST_SERIALIZATION_DECL const extended_type_info * +extended_type_info_typeid_0::get_extended_type_info( + const std::type_info & ti +) const { + typeid_system::extended_type_info_typeid_arg etia(ti); + const tkmap & t = singleton::get_const_instance(); + const tkmap::const_iterator it = t.find(& etia); + if(t.end() == it) + return NULL; + return *(it); +} + +} // namespace detail +} // namespace serialization +} // namespace boost diff --git a/src/boost/libs/serialization/src/polymorphic_binary_iarchive.cpp b/src/boost/libs/serialization/src/polymorphic_binary_iarchive.cpp new file mode 100644 index 000000000..7fcca705a --- /dev/null +++ b/src/boost/libs/serialization/src/polymorphic_binary_iarchive.cpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_binary_iarchive.cpp: + +// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include +#include + +// explicitly instantiate for this type of text stream +#include + +namespace boost { +namespace archive { +namespace detail { + +template class archive_serializer_map; + +} // detail +} // archive +} // boost diff --git a/src/boost/libs/serialization/src/polymorphic_binary_oarchive.cpp b/src/boost/libs/serialization/src/polymorphic_binary_oarchive.cpp new file mode 100644 index 000000000..8b66c5cb5 --- /dev/null +++ b/src/boost/libs/serialization/src/polymorphic_binary_oarchive.cpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_binary_oarchive.cpp: + +// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include +#include + +// explicitly instantiate for this type of text stream +#include + +namespace boost { +namespace archive { +namespace detail { + +template class detail::archive_serializer_map; + +} // detail +} // archive +} // boost diff --git a/src/boost/libs/serialization/src/polymorphic_iarchive.cpp b/src/boost/libs/serialization/src/polymorphic_iarchive.cpp new file mode 100644 index 000000000..249363b8e --- /dev/null +++ b/src/boost/libs/serialization/src/polymorphic_iarchive.cpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_iarchive.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include +#include + +#include +#include + +namespace boost { +namespace archive { +namespace detail { + +template class archive_serializer_map; + +} // detail +} // archive +} // boost diff --git a/src/boost/libs/serialization/src/polymorphic_oarchive.cpp b/src/boost/libs/serialization/src/polymorphic_oarchive.cpp new file mode 100644 index 000000000..f63296be5 --- /dev/null +++ b/src/boost/libs/serialization/src/polymorphic_oarchive.cpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_oarchive.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include +#include + +#include +#include + +namespace boost { +namespace archive { +namespace detail { + +template class archive_serializer_map; + +} // detail +} // archive +} // boost diff --git a/src/boost/libs/serialization/src/polymorphic_text_iarchive.cpp b/src/boost/libs/serialization/src/polymorphic_text_iarchive.cpp new file mode 100644 index 000000000..6404ec83b --- /dev/null +++ b/src/boost/libs/serialization/src/polymorphic_text_iarchive.cpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_text_iarchive.cpp: + +// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include +#include + +// explicitly instantiate for this type of text stream +#include + +namespace boost { +namespace archive { +namespace detail { + +template class archive_serializer_map; + +} // detail +} // archive +} // boost diff --git a/src/boost/libs/serialization/src/polymorphic_text_oarchive.cpp b/src/boost/libs/serialization/src/polymorphic_text_oarchive.cpp new file mode 100644 index 000000000..4160a621a --- /dev/null +++ b/src/boost/libs/serialization/src/polymorphic_text_oarchive.cpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_text_oarchive.cpp: + +// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include +#include + +// explicitly instantiate for this type of text stream +#include + +namespace boost { +namespace archive { +namespace detail { + +template class detail::archive_serializer_map; + +} // detail +} // archive +} // boost diff --git a/src/boost/libs/serialization/src/polymorphic_text_wiarchive.cpp b/src/boost/libs/serialization/src/polymorphic_text_wiarchive.cpp new file mode 100644 index 000000000..2089195a3 --- /dev/null +++ b/src/boost/libs/serialization/src/polymorphic_text_wiarchive.cpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_text_wiarchive.cpp: + +// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include +#include + +// explicitly instantiate for this type of text stream +#include + +namespace boost { +namespace archive { +namespace detail { + +template class archive_serializer_map; + +} // detail +} // archive +} // boost diff --git a/src/boost/libs/serialization/src/polymorphic_text_woarchive.cpp b/src/boost/libs/serialization/src/polymorphic_text_woarchive.cpp new file mode 100644 index 000000000..514f14477 --- /dev/null +++ b/src/boost/libs/serialization/src/polymorphic_text_woarchive.cpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_text_woarchive.cpp: + +// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include +#include + +// explicitly instantiate for this type of text stream +#include + +namespace boost { +namespace archive { +namespace detail { + +template class detail::archive_serializer_map; + +} // detail +} // archive +} // boost diff --git a/src/boost/libs/serialization/src/polymorphic_xml_iarchive.cpp b/src/boost/libs/serialization/src/polymorphic_xml_iarchive.cpp new file mode 100644 index 000000000..17ec7917d --- /dev/null +++ b/src/boost/libs/serialization/src/polymorphic_xml_iarchive.cpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_xml_iarchive.cpp: + +// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include +#include + +// explicitly instantiate for this type of text stream +#include + +namespace boost { +namespace archive { +namespace detail { + +template class archive_serializer_map; + +} // detail +} // archive +} // boost diff --git a/src/boost/libs/serialization/src/polymorphic_xml_oarchive.cpp b/src/boost/libs/serialization/src/polymorphic_xml_oarchive.cpp new file mode 100644 index 000000000..124f899f9 --- /dev/null +++ b/src/boost/libs/serialization/src/polymorphic_xml_oarchive.cpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_xml_oarchive.cpp: + +// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include +#include + +// explicitly instantiate for this type of text stream +#include + +namespace boost { +namespace archive { +namespace detail { + +template class detail::archive_serializer_map; + +} // detail +} // archive +} // boost diff --git a/src/boost/libs/serialization/src/polymorphic_xml_wiarchive.cpp b/src/boost/libs/serialization/src/polymorphic_xml_wiarchive.cpp new file mode 100644 index 000000000..1548c9ed9 --- /dev/null +++ b/src/boost/libs/serialization/src/polymorphic_xml_wiarchive.cpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_xml_wiarchive.cpp: + +// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include +#include + +// explicitly instantiate for this type of text stream +#include + +namespace boost { +namespace archive { +namespace detail { + +template class archive_serializer_map; + +} // detail +} // archive +} // boost diff --git a/src/boost/libs/serialization/src/polymorphic_xml_woarchive.cpp b/src/boost/libs/serialization/src/polymorphic_xml_woarchive.cpp new file mode 100644 index 000000000..479894566 --- /dev/null +++ b/src/boost/libs/serialization/src/polymorphic_xml_woarchive.cpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_xml_woarchive.cpp: + +// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include +#include + +// explicitly instantiate for this type of text stream +#include + +namespace boost { +namespace archive { +namespace detail { + +template class detail::archive_serializer_map; + +} // detail +} // archive +} // boost diff --git a/src/boost/libs/serialization/src/stl_port.cpp b/src/boost/libs/serialization/src/stl_port.cpp new file mode 100644 index 000000000..343faa6d1 --- /dev/null +++ b/src/boost/libs/serialization/src/stl_port.cpp @@ -0,0 +1,42 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// stl_port.cpp: implementation of run-time casting of void pointers + +// (C) Copyright 2005 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +// this befuddles the msvc 6 compiler so we can't use it +#if ! ((defined _MSC_VER) && (_MSC_VER <= 1300)) + +#include + +#if defined(__SGI_STL_PORT) && (__SGI_STL_PORT < 0x500) + +#include + +// explicit instantiation + +namespace std { + +template +locale::locale( + const locale& __loc, boost::archive::codecvt_null * __f +); + +template +locale::locale( + const locale& __loc, boost::archive::codecvt_null * __f +); + +} // namespace std + +#endif + +#endif diff --git a/src/boost/libs/serialization/src/text_iarchive.cpp b/src/boost/libs/serialization/src/text_iarchive.cpp new file mode 100644 index 000000000..dfcff4e14 --- /dev/null +++ b/src/boost/libs/serialization/src/text_iarchive.cpp @@ -0,0 +1,33 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// text_iarchive.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include +#include +#include + +// explicitly instantiate for this type of text stream +#include +#include +#include + +namespace boost { +namespace archive { + +template class detail::archive_serializer_map; +template class basic_text_iarchive ; +template class text_iarchive_impl ; + +} // namespace archive +} // namespace boost diff --git a/src/boost/libs/serialization/src/text_oarchive.cpp b/src/boost/libs/serialization/src/text_oarchive.cpp new file mode 100644 index 000000000..ae24a0bf7 --- /dev/null +++ b/src/boost/libs/serialization/src/text_oarchive.cpp @@ -0,0 +1,34 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// text_oarchive.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include +#include +#include + +// explicitly instantiate for this type of text stream +#include +#include +#include + +namespace boost { +namespace archive { + +//template class basic_text_oprimitive ; +template class detail::archive_serializer_map; +template class basic_text_oarchive ; +template class text_oarchive_impl ; + +} // namespace serialization +} // namespace boost diff --git a/src/boost/libs/serialization/src/text_wiarchive.cpp b/src/boost/libs/serialization/src/text_wiarchive.cpp new file mode 100644 index 000000000..6b6e592f7 --- /dev/null +++ b/src/boost/libs/serialization/src/text_wiarchive.cpp @@ -0,0 +1,38 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// text_wiarchive.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else + +#define BOOST_WARCHIVE_SOURCE +#include +#include +#include + +// explicitly instantiate for this type of text stream +#include +#include +#include + +namespace boost { +namespace archive { + +template class detail::archive_serializer_map; +template class basic_text_iarchive ; +template class text_wiarchive_impl ; + +} // namespace archive +} // namespace boost + +#endif // BOOST_NO_STD_WSTREAMBUF + diff --git a/src/boost/libs/serialization/src/text_woarchive.cpp b/src/boost/libs/serialization/src/text_woarchive.cpp new file mode 100644 index 000000000..46441694e --- /dev/null +++ b/src/boost/libs/serialization/src/text_woarchive.cpp @@ -0,0 +1,36 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// text_woarchive.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else + +#define BOOST_WARCHIVE_SOURCE +#include +#include +#include + +// explicitly instantiate for this type of text stream +#include +#include +#include + +namespace boost { +namespace archive { + +template class detail::archive_serializer_map; +template class basic_text_oarchive ; +template class text_woarchive_impl ; + +} // namespace archive +} // namespace boost + +#endif // BOOST_NO_STD_WSTREAMBUF diff --git a/src/boost/libs/serialization/src/utf8_codecvt_facet.cpp b/src/boost/libs/serialization/src/utf8_codecvt_facet.cpp new file mode 100644 index 000000000..f6550d07d --- /dev/null +++ b/src/boost/libs/serialization/src/utf8_codecvt_facet.cpp @@ -0,0 +1,22 @@ +// Copyright Vladimir Prus 2004. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include + +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#endif + +// include boost implementation of utf8 codecvt facet +# define BOOST_ARCHIVE_SOURCE +#include +#define BOOST_UTF8_BEGIN_NAMESPACE \ + namespace boost { namespace archive { namespace detail { +#define BOOST_UTF8_DECL BOOST_ARCHIVE_DECL +#define BOOST_UTF8_END_NAMESPACE }}} +#include +#undef BOOST_UTF8_END_NAMESPACE +#undef BOOST_UTF8_DECL +#undef BOOST_UTF8_BEGIN_NAMESPACE diff --git a/src/boost/libs/serialization/src/void_cast.cpp b/src/boost/libs/serialization/src/void_cast.cpp new file mode 100644 index 000000000..535988f86 --- /dev/null +++ b/src/boost/libs/serialization/src/void_cast.cpp @@ -0,0 +1,382 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// void_cast.cpp: implementation of run-time casting of void pointers + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +// STL +#include +#include +#include +#include // NULL +#ifdef BOOST_SERIALIZATION_LOG +#include +#endif + +// BOOST +#include +#include + +#define BOOST_SERIALIZATION_SOURCE +#include +// it marks our code with proper attributes as being exported when +// we're compiling it while marking it import when just the headers +// is being included. +#include +#include +#include + +namespace boost { +namespace serialization { +namespace void_cast_detail { + +// note that void_casters are keyed on value of +// member extended type info records - NOT their +// addresses. This is necessary in order for the +// void cast operations to work across dll and exe +// module boundries. +bool void_caster::operator<(const void_caster & rhs) const { + // include short cut to save time and eliminate + // problems when when base class aren't virtual + if(m_derived != rhs.m_derived){ + if(*m_derived < *rhs.m_derived) + return true; + if(*rhs.m_derived < *m_derived) + return false; + } + // m_derived == rhs.m_derived + if(m_base != rhs.m_base) + return *m_base < *rhs.m_base; + else + return false; +} + +struct void_caster_compare { + bool operator()(const void_caster * lhs, const void_caster * rhs) const { + return *lhs < *rhs; + } +}; + +typedef std::set set_type; +typedef boost::serialization::singleton void_caster_registry; + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +// implementation of shortcut void caster +class void_caster_shortcut : public void_caster +{ + bool m_includes_virtual_base; + + void const * + vbc_upcast( + void const * const t + ) const; + void const * + vbc_downcast( + void const * const t + ) const; + virtual void const * + upcast(void const * const t) const{ + if(m_includes_virtual_base) + return vbc_upcast(t); + return static_cast ( t ) - m_difference; + } + virtual void const * + downcast(void const * const t) const{ + if(m_includes_virtual_base) + return vbc_downcast(t); + return static_cast ( t ) + m_difference; + } + virtual bool is_shortcut() const { + return true; + } + virtual bool has_virtual_base() const { + return m_includes_virtual_base; + } +public: + void_caster_shortcut( + extended_type_info const * derived, + extended_type_info const * base, + std::ptrdiff_t difference, + bool includes_virtual_base, + void_caster const * const parent + ) : + void_caster(derived, base, difference, parent), + m_includes_virtual_base(includes_virtual_base) + { + recursive_register(includes_virtual_base); + } + virtual ~void_caster_shortcut(){ + recursive_unregister(); + } +}; + +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + +void const * +void_caster_shortcut::vbc_downcast( + void const * const t +) const { + // try to find a chain that gives us what we want + const void_cast_detail::set_type & s + = void_cast_detail::void_caster_registry::get_const_instance(); + void_cast_detail::set_type::const_iterator it; + for(it = s.begin(); it != s.end(); ++it){ + // if the current candidate casts to the desired target type + if ((*it)->m_derived == m_derived){ + // and if it's not us + if ((*it)->m_base != m_base){ + // try to cast from the candidate base to our base + const void * t_new; + t_new = void_downcast(*(*it)->m_base, *m_base, t); + // if we were successful + if(NULL != t_new){ + // recast to our derived + const void_caster * vc = *it; + return vc->downcast(t_new); + } + } + } + } + return NULL; +} + +void const * +void_caster_shortcut::vbc_upcast( + void const * const t +) const { + // try to find a chain that gives us what we want + const void_cast_detail::set_type & s + = void_cast_detail::void_caster_registry::get_const_instance(); + void_cast_detail::set_type::const_iterator it; + for(it = s.begin(); it != s.end(); ++it){ + // if the current candidate casts from the desired base type + if((*it)->m_base == m_base){ + // and if it's not us + if ((*it)->m_derived != m_derived){ + // try to cast from the candidate derived to our our derived + const void * t_new; + t_new = void_upcast(*m_derived, *(*it)->m_derived, t); + if(NULL != t_new) + return (*it)->upcast(t_new); + } + } + } + return NULL; +} + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +// just used as a search key +class void_caster_argument : public void_caster +{ + virtual void const * + upcast(void const * const /*t*/) const { + BOOST_ASSERT(false); + return NULL; + } + virtual void const * + downcast( void const * const /*t*/) const { + BOOST_ASSERT(false); + return NULL; + } + virtual bool has_virtual_base() const { + BOOST_ASSERT(false); + return false; + } +public: + void_caster_argument( + extended_type_info const * derived, + extended_type_info const * base + ) : + void_caster(derived, base) + {} + virtual ~void_caster_argument(){}; +}; + +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + +// implementation of void caster base class +BOOST_SERIALIZATION_DECL void +void_caster::recursive_register(bool includes_virtual_base) const { + void_cast_detail::set_type & s + = void_cast_detail::void_caster_registry::get_mutable_instance(); + + #ifdef BOOST_SERIALIZATION_LOG + std::clog << "recursive_register\n"; + std::clog << m_derived->get_debug_info(); + std::clog << "<-"; + std::clog << m_base->get_debug_info(); + std::clog << "\n"; + #endif + + std::pair result; + // comment this out for now. + result = s.insert(this); + //assert(result.second); + + // generate all implied void_casts. + void_cast_detail::set_type::const_iterator it; + for(it = s.begin(); it != s.end(); ++it){ + if(* m_derived == * (*it)->m_base){ + const void_caster_argument vca( + (*it)->m_derived, + m_base + ); + void_cast_detail::set_type::const_iterator i; + i = s.find(& vca); + if(i == s.end()){ + new void_caster_shortcut( + (*it)->m_derived, + m_base, + m_difference + (*it)->m_difference, + (*it)->has_virtual_base() || includes_virtual_base, + this + ); + } + } + if(* (*it)->m_derived == * m_base){ + const void_caster_argument vca( + m_derived, + (*it)->m_base + ); + void_cast_detail::set_type::const_iterator i; + i = s.find(& vca); + if(i == s.end()){ + new void_caster_shortcut( + m_derived, + (*it)->m_base, + m_difference + (*it)->m_difference, + (*it)->has_virtual_base() || includes_virtual_base, + this + ); + } + } + } +} + +BOOST_SERIALIZATION_DECL void +void_caster::recursive_unregister() const { + // note: it's been discovered that at least one platform is not guaranteed + // to destroy singletons reverse order of construction. So we can't + // use a runtime assert here. Leave this in a reminder not to do this! + // BOOST_ASSERT(! void_caster_registry::is_destroyed()); + if(void_caster_registry::is_destroyed()) + return; + + #ifdef BOOST_SERIALIZATION_LOG + std::clog << "recursive_unregister\n"; + std::clog << m_derived->get_debug_info(); + std::clog << "<-"; + std::clog << m_base->get_debug_info(); + std::clog << "\n"; + #endif + + void_cast_detail::set_type & s + = void_caster_registry::get_mutable_instance(); + + // delete all shortcuts which use this primitive + void_cast_detail::set_type::iterator it; + for(it = s.begin(); it != s.end();){ + const void_caster * vc = *it; + if(vc == this){ + s.erase(it++); + } + else + if(vc->m_parent == this){ + s.erase(it); + delete vc; + it = s.begin(); + } + else + it++; + } +} + +} // namespace void_cast_detail + +BOOST_SYMBOL_VISIBLE void const * +void_upcast( + extended_type_info const & derived, + extended_type_info const & base, + void const * const t +); + +// Given a void *, assume that it really points to an instance of one type +// and alter it so that it would point to an instance of a related type. +// Return the altered pointer. If there exists no sequence of casts that +// can transform from_type to to_type, return a NULL. +BOOST_SERIALIZATION_DECL void const * +void_upcast( + extended_type_info const & derived, + extended_type_info const & base, + void const * const t +){ + // same types - trivial case + if (derived == base) + return t; + + // check to see if base/derived pair is found in the registry + const void_cast_detail::set_type & s + = void_cast_detail::void_caster_registry::get_const_instance(); + const void_cast_detail::void_caster_argument ca(& derived, & base); + + void_cast_detail::set_type::const_iterator it; + it = s.find(& ca); + if (s.end() != it) + return (*it)->upcast(t); + + return NULL; +} + +BOOST_SYMBOL_VISIBLE void const * +void_downcast( + extended_type_info const & derived, + extended_type_info const & base, + void const * const t +); + +BOOST_SERIALIZATION_DECL void const * +void_downcast( + extended_type_info const & derived, + extended_type_info const & base, + void const * const t +){ + // same types - trivial case + if (derived == base) + return t; + + // check to see if base/derived pair is found in the registry + const void_cast_detail::set_type & s + = void_cast_detail::void_caster_registry::get_const_instance(); + const void_cast_detail::void_caster_argument ca(& derived, & base); + + void_cast_detail::set_type::const_iterator it; + it = s.find(&ca); + if (s.end() != it) + return(*it)->downcast(t); + + return NULL; +} + +} // namespace serialization +} // namespace boost diff --git a/src/boost/libs/serialization/src/xml_archive_exception.cpp b/src/boost/libs/serialization/src/xml_archive_exception.cpp new file mode 100644 index 000000000..f4ca98c08 --- /dev/null +++ b/src/boost/libs/serialization/src/xml_archive_exception.cpp @@ -0,0 +1,68 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// xml_archive_exception.cpp: + +// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + + +#include +#include + +#include + +#define BOOST_ARCHIVE_SOURCE +#include +#include + +namespace boost { +namespace archive { + +BOOST_ARCHIVE_DECL +xml_archive_exception::xml_archive_exception( + exception_code c, + const char * e1, + const char * e2 + ) : + archive_exception(other_exception, e1, e2) + { + switch(c){ + case xml_archive_parsing_error: + archive_exception::append(0, "unrecognized XML syntax"); + break; + case xml_archive_tag_mismatch:{ + unsigned int l; + l = archive_exception::append(0, "XML start/end tag mismatch"); + if(NULL != e1){ + l = archive_exception::append(l, " - "); + archive_exception::append(l, e1); + } + break; + } + case xml_archive_tag_name_error: + archive_exception::append(0, "Invalid XML tag name"); + break; + default: + BOOST_ASSERT(false); + archive_exception::append(0, "programming error"); + break; + } + } + +BOOST_ARCHIVE_DECL +xml_archive_exception::xml_archive_exception(xml_archive_exception const & oth) : + archive_exception(oth) + { + } + +BOOST_ARCHIVE_DECL xml_archive_exception::~xml_archive_exception() BOOST_NOEXCEPT_OR_NOTHROW {} + +} // archive +} // boost diff --git a/src/boost/libs/serialization/src/xml_grammar.cpp b/src/boost/libs/serialization/src/xml_grammar.cpp new file mode 100644 index 000000000..ae48f70de --- /dev/null +++ b/src/boost/libs/serialization/src/xml_grammar.cpp @@ -0,0 +1,74 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// xml_grammar.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#include + +#define BOOST_ARCHIVE_SOURCE +#include +#include + +using namespace boost::spirit::classic; + +// fixup for borland +// The following code will be put into Boost.Config in a later revision +#if ! defined(__SGI_STL_PORT) \ +&& defined(BOOST_RWSTD_VER) && BOOST_RWSTD_VER<=0x020101 +#include +namespace std { + template<> + inline string & + string::replace ( + char * first1, + char * last1, + const char * first2, + const char * last2 + ){ + replace(first1-begin(),last1-first1,first2,last2-first2,0,last2-first2); + return *this; + } +} // namespace std +#endif + +namespace boost { +namespace archive { + +typedef basic_xml_grammar xml_grammar; + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// specific definitions for char based XML + +template<> +void xml_grammar::init_chset(){ + Char = chset_t("\x9\xA\xD\x20-\x7f\x80\x81-\xFF"); + Letter = chset_t("\x41-\x5A\x61-\x7A\xC0-\xD6\xD8-\xF6\xF8-\xFF"); + Digit = chset_t("0-9"); + Extender = chset_t('\xB7'); + Sch = chset_t("\x20\x9\xD\xA"); + NameChar = Letter | Digit | chset_p("._:-") | Extender ; +} + +} // namespace archive +} // namespace boost + +#include "basic_xml_grammar.ipp" + +namespace boost { +namespace archive { + +// explicit instantiation of xml for 8 bit characters +template class basic_xml_grammar; + +} // namespace archive +} // namespace boost + diff --git a/src/boost/libs/serialization/src/xml_iarchive.cpp b/src/boost/libs/serialization/src/xml_iarchive.cpp new file mode 100644 index 000000000..0a19a8e8e --- /dev/null +++ b/src/boost/libs/serialization/src/xml_iarchive.cpp @@ -0,0 +1,33 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// xml_iarchive.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include +#include +#include + +// explicitly instantiate for this type of xml stream +#include +#include +#include + +namespace boost { +namespace archive { + +template class detail::archive_serializer_map; +template class basic_xml_iarchive ; +template class xml_iarchive_impl ; + +} // namespace archive +} // namespace boost diff --git a/src/boost/libs/serialization/src/xml_oarchive.cpp b/src/boost/libs/serialization/src/xml_oarchive.cpp new file mode 100644 index 000000000..c238845d6 --- /dev/null +++ b/src/boost/libs/serialization/src/xml_oarchive.cpp @@ -0,0 +1,33 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// xml_oarchive.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include +#include +#include + +// explicitly instantiate for this type of xml stream +#include +#include +#include + +namespace boost { +namespace archive { + +template class detail::archive_serializer_map; +template class basic_xml_oarchive ; +template class xml_oarchive_impl ; + +} // namespace archive +} // namespace boost diff --git a/src/boost/libs/serialization/src/xml_wgrammar.cpp b/src/boost/libs/serialization/src/xml_wgrammar.cpp new file mode 100644 index 000000000..7c053e809 --- /dev/null +++ b/src/boost/libs/serialization/src/xml_wgrammar.cpp @@ -0,0 +1,157 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// xml_wgrammar.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else + +#define BOOST_WARCHIVE_SOURCE +#include +#include + +using namespace boost::spirit::classic; + +// fixup for RogueWave +#if ! defined(__SGI_STL_PORT) \ +&& defined(BOOST_RWSTD_VER) && BOOST_RWSTD_VER<=0x020101 +#include +namespace std { + template<> + inline wstring & + wstring::replace ( + wchar_t * first1, + wchar_t * last1, + const wchar_t * first2, + const wchar_t * last2 + ){ + replace(first1-begin(),last1-first1,first2,last2-first2,0,last2-first2); + return *this; + } +} // namespace std +#endif + +namespace boost { +namespace archive { + +typedef basic_xml_grammar xml_wgrammar; + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// specific definitions for wchar_t based XML + +template<> +void xml_wgrammar::init_chset(){ + Char = chset_t( + #if defined(__GNUC__) && defined(linux) + L"\x9\xA\xD\x20-\xD7FF\xE000-\xFFFD\x10000-\x10FFFF" + #else + L"\x9\xA\xD\x20-\xD7FF\xE000-\xFFFD" + #endif + ); + + Sch = chset_t(L"\x20\x9\xD\xA"); + + BaseChar = chset_t( + L"\x41-\x5A\x61-\x7A\xC0-\xD6\xD8-\xF6\xF8-\xFF\x100-\x131\x134-\x13E" + L"\x141-\x148\x14A-\x17E\x180-\x1C3\x1CD-\x1F0\x1F4-\x1F5\x1FA-\x217" + L"\x250-\x2A8\x2BB-\x2C1\x386\x388-\x38A\x38C\x38E-\x3A1\x3A3-\x3CE" + L"\x3D0-\x3D6\x3DA\x3DC\x3DE\x3E0\x3E2-\x3F3\x401-\x40C\x40E-\x44F" + L"\x451-\x45C\x45E-\x481\x490-\x4C4\x4C7-\x4C8\x4CB-\x4CC\x4D0-\x4EB" + L"\x4EE-\x4F5\x4F8-\x4F9\x531-\x556\x559\x561-\x586\x5D0-\x5EA" + L"\x5F0-\x5F2\x621-\x63A\x641-\x64A\x671-\x6B7\x6BA-\x6BE\x6C0-\x6CE" + L"\x6D0-\x6D3\x6D5\x6E5-\x6E6\x905-\x939\x93D\x958-\x961\x985-\x98C" + L"\x98F-\x990\x993-\x9A8\x9AA-\x9B0\x9B2\x9B6-\x9B9\x9DC-\x9DD" + L"\x9DF-\x9E1\x9F0-\x9F1\xA05-\xA0A\xA0F-\xA10\xA13-\xA28\xA2A-\xA30" + L"\xA32-\xA33\xA35-\xA36\xA38-\xA39\xA59-\xA5C\xA5E\xA72-\xA74" + L"\xA85-\xA8B\xA8D\xA8F-\xA91\xA93-\xAA8\xAAA-\xAB0\xAB2-\xAB3" + L"\xAB5-\xAB9\xABD\xAE0\xB05-\xB0C\xB0F-\xB10\xB13-\xB28\xB2A-\xB30" + L"\xB32-\xB33\xB36-\xB39\xB3D\xB5C-\xB5D\xB5F-\xB61\xB85-\xB8A" + L"\xB8E-\xB90\xB92-\xB95\xB99-\xB9A\xB9C\xB9E-\xB9F\xBA3-\xBA4" + L"\xBA8-\xBAA\xBAE-\xBB5\xBB7-\xBB9\xC05-\xC0C\xC0E-\xC10\xC12-\xC28" + L"\xC2A-\xC33\xC35-\xC39\xC60-\xC61\xC85-\xC8C\xC8E-\xC90\xC92-\xCA8" + L"\xCAA-\xCB3\xCB5-\xCB9\xCDE\xCE0-\xCE1\xD05-\xD0C\xD0E-\xD10" + L"\xD12-\xD28\xD2A-\xD39\xD60-\xD61\xE01-\xE2E\xE30\xE32-\xE33" + L"\xE40-\xE45\xE81-\xE82\xE84\xE87-\xE88\xE8A\xE8D\xE94-\xE97" + L"\xE99-\xE9F\xEA1-\xEA3\xEA5\xEA7\xEAA-\xEAB\xEAD-\xEAE\xEB0" + L"\xEB2-\xEB3\xEBD\xEC0-\xEC4\xF40-\xF47\xF49-\xF69\x10A0-\x10C5" + L"\x10D0-\x10F6\x1100\x1102-\x1103\x1105-\x1107\x1109\x110B-\x110C" + L"\x110E-\x1112\x113C\x113E\x1140\x114C\x114E\x1150\x1154-\x1155" + L"\x1159\x115F-\x1161\x1163\x1165\x1167\x1169\x116D-\x116E" + L"\x1172-\x1173\x1175\x119E\x11A8\x11AB\x11AE-\x11AF\x11B7-\x11B8" + L"\x11BA\x11BC-\x11C2\x11EB\x11F0\x11F9\x1E00-\x1E9B\x1EA0-\x1EF9" + L"\x1F00-\x1F15\x1F18-\x1F1D\x1F20-\x1F45\x1F48-\x1F4D\x1F50-\x1F57" + L"\x1F59\x1F5B\x1F5D\x1F5F-\x1F7D\x1F80-\x1FB4\x1FB6-\x1FBC\x1FBE" + L"\x1FC2-\x1FC4\x1FC6-\x1FCC\x1FD0-\x1FD3\x1FD6-\x1FDB\x1FE0-\x1FEC" + L"\x1FF2-\x1FF4\x1FF6-\x1FFC\x2126\x212A-\x212B\x212E\x2180-\x2182" + L"\x3041-\x3094\x30A1-\x30FA\x3105-\x312C\xAC00-\xD7A3" + ); + + Ideographic = chset_t(L"\x4E00-\x9FA5\x3007\x3021-\x3029"); + + Letter = BaseChar | Ideographic; + + CombiningChar = chset_t( + L"\x0300-\x0345\x0360-\x0361\x0483-\x0486\x0591-\x05A1\x05A3-\x05B9" + L"\x05BB-\x05BD\x05BF\x05C1-\x05C2\x05C4\x064B-\x0652\x0670" + L"\x06D6-\x06DC\x06DD-\x06DF\x06E0-\x06E4\x06E7-\x06E8\x06EA-\x06ED" + L"\x0901-\x0903\x093C\x093E-\x094C\x094D\x0951-\x0954\x0962-\x0963" + L"\x0981-\x0983\x09BC\x09BE\x09BF\x09C0-\x09C4\x09C7-\x09C8" + L"\x09CB-\x09CD\x09D7\x09E2-\x09E3\x0A02\x0A3C\x0A3E\x0A3F" + L"\x0A40-\x0A42\x0A47-\x0A48\x0A4B-\x0A4D\x0A70-\x0A71\x0A81-\x0A83" + L"\x0ABC\x0ABE-\x0AC5\x0AC7-\x0AC9\x0ACB-\x0ACD\x0B01-\x0B03\x0B3C" + L"\x0B3E-\x0B43\x0B47-\x0B48\x0B4B-\x0B4D\x0B56-\x0B57\x0B82-\x0B83" + L"\x0BBE-\x0BC2\x0BC6-\x0BC8\x0BCA-\x0BCD\x0BD7\x0C01-\x0C03" + L"\x0C3E-\x0C44\x0C46-\x0C48\x0C4A-\x0C4D\x0C55-\x0C56\x0C82-\x0C83" + L"\x0CBE-\x0CC4\x0CC6-\x0CC8\x0CCA-\x0CCD\x0CD5-\x0CD6\x0D02-\x0D03" + L"\x0D3E-\x0D43\x0D46-\x0D48\x0D4A-\x0D4D\x0D57\x0E31\x0E34-\x0E3A" + L"\x0E47-\x0E4E\x0EB1\x0EB4-\x0EB9\x0EBB-\x0EBC\x0EC8-\x0ECD" + L"\x0F18-\x0F19\x0F35\x0F37\x0F39\x0F3E\x0F3F\x0F71-\x0F84" + L"\x0F86-\x0F8B\x0F90-\x0F95\x0F97\x0F99-\x0FAD\x0FB1-\x0FB7\x0FB9" + L"\x20D0-\x20DC\x20E1\x302A-\x302F\x3099\x309A" + ); + + Digit = chset_t( + L"\x0030-\x0039\x0660-\x0669\x06F0-\x06F9\x0966-\x096F\x09E6-\x09EF" + L"\x0A66-\x0A6F\x0AE6-\x0AEF\x0B66-\x0B6F\x0BE7-\x0BEF\x0C66-\x0C6F" + L"\x0CE6-\x0CEF\x0D66-\x0D6F\x0E50-\x0E59\x0ED0-\x0ED9\x0F20-\x0F29" + ); + + Extender = chset_t( + L"\x00B7\x02D0\x02D1\x0387\x0640\x0E46\x0EC6\x3005\x3031-\x3035" + L"\x309D-\x309E\x30FC-\x30FE" + ); + + NameChar = + Letter + | Digit + | L'.' + | L'-' + | L'_' + | L':' + | CombiningChar + | Extender + ; +} +} // namespace archive +} // namespace boost + +#include "basic_xml_grammar.ipp" + +namespace boost { +namespace archive { + +// explicit instantiation of xml for wide characters +template class basic_xml_grammar; + +} // namespace archive +} // namespace boost + +#endif diff --git a/src/boost/libs/serialization/src/xml_wiarchive.cpp b/src/boost/libs/serialization/src/xml_wiarchive.cpp new file mode 100644 index 000000000..8c60abf73 --- /dev/null +++ b/src/boost/libs/serialization/src/xml_wiarchive.cpp @@ -0,0 +1,40 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// xml_wiarchive.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#include +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else + +#define BOOST_WARCHIVE_SOURCE +#include +#include +#include + +// explicitly instantiate for this type of xml stream +#include +#include +#include + +namespace boost { +namespace archive { + +template class detail::archive_serializer_map; +template class basic_xml_iarchive ; +template class xml_wiarchive_impl ; + +} // namespace archive +} // namespace boost + +#endif // BOOST_NO_STD_WSTREAMBUF diff --git a/src/boost/libs/serialization/src/xml_woarchive.cpp b/src/boost/libs/serialization/src/xml_woarchive.cpp new file mode 100644 index 000000000..f9b6ba389 --- /dev/null +++ b/src/boost/libs/serialization/src/xml_woarchive.cpp @@ -0,0 +1,40 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// xml_woarchive.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#include +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else + +#define BOOST_WARCHIVE_SOURCE +#include +#include +#include + +// explicitly instantiate for this type of text stream +#include +#include +#include + +namespace boost { +namespace archive { + +template class detail::archive_serializer_map; +template class basic_xml_oarchive ; +template class xml_woarchive_impl ; + +} // namespace archive +} // namespace boost + +#endif // BOOST_NO_STD_WSTREAMBUF diff --git a/src/boost/libs/serialization/test/A.cpp b/src/boost/libs/serialization/test/A.cpp new file mode 100644 index 000000000..332505ffa --- /dev/null +++ b/src/boost/libs/serialization/test/A.cpp @@ -0,0 +1,218 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// A.cpp simple class test + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include // rand() +#include // size_t +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::rand; + using ::size_t; +} +#endif + +#include +#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) +#include +#endif + +#include "A.hpp" + +template +void randomize(S &x) +{ + assert(0 == x.size()); + for(;;){ + unsigned int i = std::rand() % 27; + if(0 == i) + break; + x += static_cast('a' - 1 + i); + } +} + +template +void accumulate(std::size_t & s, const T & t){ + const char * tptr = (const char *)(& t); + unsigned int count = sizeof(t); + while(count-- > 0){ + s += *tptr++; + } +} +A_DLL_DECL +A::operator std::size_t () const { + std::size_t retval = 0; + accumulate(retval, b); + #ifndef BOOST_NO_INT64_T + accumulate(retval, f); + accumulate(retval, g); + #endif + accumulate(retval, l); + accumulate(retval, m); + accumulate(retval, n); + accumulate(retval, o); + accumulate(retval, p); + accumulate(retval, q); + #ifndef BOOST_NO_CWCHAR + accumulate(retval, r); + #endif + accumulate(retval, c); + accumulate(retval, s); + accumulate(retval, t); + accumulate(retval, u); + accumulate(retval, v); + return retval; +} + +#if defined(_MSC_VER) +#pragma warning(push) // Save warning settings. +#pragma warning(disable : 4244) // Disable possible loss of data warning +#endif + +A_DLL_DECL +A::A() : + b(true), + #ifndef BOOST_NO_INT64_T + f(static_cast(std::rand()) * static_cast(std::rand())), + g(static_cast(std::rand()) * static_cast(std::rand())), + #endif + l(static_cast(std::rand() % 3)), + m(std::rand()), + n(std::rand()), + o(std::rand()), + p(std::rand()), + q(std::rand()), + #ifndef BOOST_NO_CWCHAR + r(std::rand()), + #endif + c(0xff & std::rand()), + s(0xff & std::rand()), + t(0xff & std::rand()), + u(std::rand()), + v(std::rand()), + w((float)std::rand()), + x((double)std::rand()) +{ + randomize(y); + #ifndef BOOST_NO_STD_WSTRING + randomize(z); + #endif +} + +#if defined(_MSC_VER) +#pragma warning(pop) // Restore warnings to previous state. +#endif + +A_DLL_DECL bool +A::operator==(const A &rhs) const { + if(b != rhs.b) + return false; + if(l != rhs.l) + return false; + #ifndef BOOST_NO_INT64_T + if(f != rhs.f) + return false; + if(g != rhs.g) + return false; + #endif + if(m != rhs.m) + return false; + if(n != rhs.n) + return false; + if(o != rhs.o) + return false; + if(p != rhs.p) + return false; + if(q != rhs.q) + return false; + #ifndef BOOST_NO_CWCHAR + if(r != rhs.r) + return false; + #endif + if(c != rhs.c) + return false; + if(s != rhs.s) + return false; + if(t != rhs.t) + return false; + if(u != rhs.u) + return false; + if(v != rhs.v) + return false; + if(std::abs( boost::math::float_distance(w, rhs.w)) > 1) + return false; + if(std::abs( boost::math::float_distance(x, rhs.x)) > 1) + return false; + if(0 != y.compare(rhs.y)) + return false; + #ifndef BOOST_NO_STD_WSTRING + if(0 != z.compare(rhs.z)) + return false; + #endif + return true; +} + +A_DLL_DECL bool +A::operator!=(const A &rhs) const { + return ! (*this == rhs); +} + +A_DLL_DECL bool +A::operator<(const A &rhs) const { + if(b != rhs.b) + return b < rhs.b; + #ifndef BOOST_NO_INT64_T + if(f != rhs.f) + return f < rhs.f; + if(g != rhs.g) + return g < rhs.g; + #endif + if(l != rhs.l ) + return l < rhs.l; + if(m != rhs.m ) + return m < rhs.m; + if(n != rhs.n ) + return n < rhs.n; + if(o != rhs.o ) + return o < rhs.o; + if(p != rhs.p ) + return p < rhs.p; + if(q != rhs.q ) + return q < rhs.q; + #ifndef BOOST_NO_CWCHAR + if(r != rhs.r ) + return r < rhs.r; + #endif + if(c != rhs.c ) + return c < rhs.c; + if(s != rhs.s ) + return s < rhs.s; + if(t != rhs.t ) + return t < rhs.t; + if(u != rhs.u ) + return u < rhs.u; + if(v != rhs.v ) + return v < rhs.v; + if(w != rhs.w ) + return w < rhs.w; + if(x != rhs.x ) + return x < rhs.x; + int i = y.compare(rhs.y); + if(i != 0 ) + return i < 0; + #ifndef BOOST_NO_STD_WSTRING + int j = z.compare(rhs.z); + if(j != 0 ) + return j < 0; + #endif + return false; +} diff --git a/src/boost/libs/serialization/test/A.hpp b/src/boost/libs/serialization/test/A.hpp new file mode 100644 index 000000000..67445d7b4 --- /dev/null +++ b/src/boost/libs/serialization/test/A.hpp @@ -0,0 +1,95 @@ +#ifndef BOOST_SERIALIZATION_TEST_A_HPP +#define BOOST_SERIALIZATION_TEST_A_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// A.hpp simple class test + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include // for friend output operators +#include // size_t +#include + +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} +#endif + +#include +#include + +#include +#include + +#if defined(A_IMPORT) + #define A_DLL_DECL BOOST_SYMBOL_IMPORT + #pragma message("A imported") +#elif defined(A_EXPORT) + #define A_DLL_DECL BOOST_SYMBOL_EXPORT + #pragma message ("A exported") +#endif + +#ifndef A_DLL_DECL + #define A_DLL_DECL +#endif + +class A_DLL_DECL A { +private: + friend class boost::serialization::access; + template + void serialize( + Archive &ar, + const unsigned int /* file_version */ + ); + bool b; + #ifndef BOOST_NO_INT64_T + boost::int64_t f; + boost::uint64_t g; + #endif + enum h { + i = 0, + j, + k + } l; + std::size_t m; + signed long n; + unsigned long o; + signed short p; + unsigned short q; + #ifndef BOOST_NO_CWCHAR + wchar_t r; + #endif + char c; + signed char s; + unsigned char t; + signed int u; + unsigned int v; + float w; + double x; + std::string y; + #ifndef BOOST_NO_STD_WSTRING + std::wstring z; + #endif +public: + A(); + bool check_equal(const A &rhs) const; + bool operator==(const A &rhs) const; + bool operator!=(const A &rhs) const; + bool operator<(const A &rhs) const; // used by less + // hash function for class A + operator std::size_t () const; + friend std::ostream & operator<<(std::ostream & os, A const & a); +}; + +#endif // BOOST_SERIALIZATION_TEST_A_HPP diff --git a/src/boost/libs/serialization/test/A.ipp b/src/boost/libs/serialization/test/A.ipp new file mode 100644 index 000000000..552e5fa19 --- /dev/null +++ b/src/boost/libs/serialization/test/A.ipp @@ -0,0 +1,60 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// A.ipp simple class test + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) +#include +#endif + +#include +#include "A.hpp" + +template +void A::serialize( + Archive &ar, + const unsigned int /* file_version */ +){ + ar & BOOST_SERIALIZATION_NVP(b); + #ifndef BOOST_NO_INT64_T + ar & BOOST_SERIALIZATION_NVP(f); + ar & BOOST_SERIALIZATION_NVP(g); + #endif + #if BOOST_WORKAROUND(__BORLANDC__, <= 0x551 ) + int i; + if(BOOST_DEDUCED_TYPENAME Archive::is_saving::value){ + i = l; + ar & BOOST_SERIALIZATION_NVP(i); + } + else{ + ar & BOOST_SERIALIZATION_NVP(i); + l = i; + } + #else + ar & BOOST_SERIALIZATION_NVP(l); + #endif + ar & BOOST_SERIALIZATION_NVP(m); + ar & BOOST_SERIALIZATION_NVP(n); + ar & BOOST_SERIALIZATION_NVP(o); + ar & BOOST_SERIALIZATION_NVP(p); + ar & BOOST_SERIALIZATION_NVP(q); + #ifndef BOOST_NO_CWCHAR + ar & BOOST_SERIALIZATION_NVP(r); + #endif + ar & BOOST_SERIALIZATION_NVP(c); + ar & BOOST_SERIALIZATION_NVP(s); + ar & BOOST_SERIALIZATION_NVP(t); + ar & BOOST_SERIALIZATION_NVP(u); + ar & BOOST_SERIALIZATION_NVP(v); + ar & BOOST_SERIALIZATION_NVP(w); + ar & BOOST_SERIALIZATION_NVP(x); + ar & BOOST_SERIALIZATION_NVP(y); + #ifndef BOOST_NO_STD_WSTRING + ar & BOOST_SERIALIZATION_NVP(z); + #endif +} diff --git a/src/boost/libs/serialization/test/B.hpp b/src/boost/libs/serialization/test/B.hpp new file mode 100644 index 000000000..9111b1326 --- /dev/null +++ b/src/boost/libs/serialization/test/B.hpp @@ -0,0 +1,115 @@ +#ifndef BOOST_SERIALIZATION_TEST_B_HPP +#define BOOST_SERIALIZATION_TEST_B_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// B.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include // for rand() +#include +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::rand; +} +#endif + +#include +#include +#include + +#include "A.hpp" + +/////////////////////////////////////////////////////// +// Derived class test +class B : public A +{ +private: + friend class boost::serialization::access; + template + void save(Archive &ar, const unsigned int /* file_version */) const + { + // write any base class info to the archive + ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(A); + + // write out members + ar << BOOST_SERIALIZATION_NVP(s); + ar << BOOST_SERIALIZATION_NVP(t); + ar << BOOST_SERIALIZATION_NVP(u); + ar << BOOST_SERIALIZATION_NVP(v); + ar << BOOST_SERIALIZATION_NVP(w); + ar << BOOST_SERIALIZATION_NVP(x); + } + + template + void load(Archive & ar, const unsigned int file_version) + { + // read any base class info to the archive + ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(A); + switch(file_version){ + case 1: + case 2: + ar >> BOOST_SERIALIZATION_NVP(s); + ar >> BOOST_SERIALIZATION_NVP(t); + ar >> BOOST_SERIALIZATION_NVP(u); + ar >> BOOST_SERIALIZATION_NVP(v); + ar >> BOOST_SERIALIZATION_NVP(w); + ar >> BOOST_SERIALIZATION_NVP(x); + break; + default: + break; + } + } + + BOOST_SERIALIZATION_SPLIT_MEMBER() + signed char s; + unsigned char t; + signed int u; + unsigned int v; + float w; + double x; +public: + B(); + virtual ~B(){}; + bool operator==(const B &rhs) const; +}; + +B::B() : + s(static_cast(std::rand())), + t(static_cast(std::rand())), + u(std::rand()), + v(std::rand()), + w((float)std::rand() / std::rand()), + x((double)std::rand() / std::rand()) +{ +} + +BOOST_CLASS_VERSION(B, 2) + +inline bool B::operator==(const B &rhs) const +{ + return + A::operator==(rhs) + && s == rhs.s + && t == rhs.t + && u == rhs.u + && v == rhs.v + && std::abs( boost::math::float_distance(w, rhs.w)) < 2 + && std::abs( boost::math::float_distance(x, rhs.x)) < 2 + ; +} + +#endif // BOOST_SERIALIZATION_TEST_B_HPP diff --git a/src/boost/libs/serialization/test/C.hpp b/src/boost/libs/serialization/test/C.hpp new file mode 100644 index 000000000..a183db854 --- /dev/null +++ b/src/boost/libs/serialization/test/C.hpp @@ -0,0 +1,68 @@ +#ifndef BOOST_SERIALIZATION_TEST_A_HPP +#define BOOST_SERIALIZATION_TEST_A_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// C.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include + +#include "B.hpp" + +/////////////////////////////////////////////////////// +// Contained class +class C +{ +private: + friend class boost::serialization::access; + template + void save(Archive &ar, boost::archive::version_type file_version) const; + template + void load(Archive & ar, boost::archive::version_type file_version); + BOOST_SERIALIZATION_MEMBER_SPLIT() + B b; +public: + bool operator==(const C &rhs) const; +}; + +BOOST_CLASS_VERSION(C, 1) + +inline bool C::operator==(const C &rhs) const +{ + return b == rhs.b; +} + +template +inline void save(Archive &ar, boost::archive::version_type file_version) const +{ + ar << b; +} + +template +inline void load(Archive & ar, boost::archive::version_type file_version){ +{ + switch(file_version){ + case 1: + ar >> b; + break; + case 2: + default: + assert(false); + break; + } +} + +#endif // BOOST_SERIALIZATION_TEST_C_HPP diff --git a/src/boost/libs/serialization/test/D.hpp b/src/boost/libs/serialization/test/D.hpp new file mode 100644 index 000000000..8af030b68 --- /dev/null +++ b/src/boost/libs/serialization/test/D.hpp @@ -0,0 +1,88 @@ +#ifndef BOOST_SERIALIZATION_TEST_D_HPP +#define BOOST_SERIALIZATION_TEST_D_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// D.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include // NULL + +#include "test_tools.hpp" +#include +#include +#include + +#include "B.hpp" + +/////////////////////////////////////////////////////// +// Contained class with multiple identical pointers +class D +{ +private: + friend class boost::serialization::access; + B *b1; + B *b2; + template + void save(Archive &ar, const unsigned int file_version) const{ + ar << BOOST_SERIALIZATION_NVP(b1); + ar << BOOST_SERIALIZATION_NVP(b2); + } + + template + void load(Archive & ar, const unsigned int file_version){ + BOOST_TRY { + ar >> boost::serialization::make_nvp("b", b1); + ar >> boost::serialization::make_nvp("b", b2); + } + BOOST_CATCH (...){ + // eliminate invalid pointers + b1 = NULL; + b2 = NULL; + BOOST_FAIL( "multiple identical pointers failed to load" ); + } + BOOST_CATCH_END + // check that loading was correct + BOOST_CHECK(b1 == b2); + } + + BOOST_SERIALIZATION_SPLIT_MEMBER() +public: + D(); + ~D(); + bool operator==(const D &rhs) const; +}; + +BOOST_CLASS_VERSION(D, 3) + +D::D() +{ + b1 = new B(); + b2 = b1; +} + +D::~D() +{ + delete b1; +} + +bool D::operator==(const D &rhs) const +{ + if(! (*b1 == *(rhs.b1)) ) + return false; + if(! (*b2 == *(rhs.b2)) ) + return false; + return true; +} + +#endif // BOOST_SERIALIZATION_TEST_D_HPP diff --git a/src/boost/libs/serialization/test/J.hpp b/src/boost/libs/serialization/test/J.hpp new file mode 100644 index 000000000..1849ee755 --- /dev/null +++ b/src/boost/libs/serialization/test/J.hpp @@ -0,0 +1,51 @@ +#ifndef BOOST_SERIALIZATION_TEST_J_HPP +#define BOOST_SERIALIZATION_TEST_J_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// J.hpp simple class test + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#include "A.hpp" + +/////////////////////////////////////////////////////// +// class with a member which refers to itself +class J : public A +{ +private: + friend class boost::serialization::access; + template + void serialize( + Archive &ar, + const unsigned int /* file_version */ + ){ + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(A); + ar & BOOST_SERIALIZATION_NVP(j); + } +public: + bool operator==(const J &rhs) const; + J *j; + J(J *_j) : j(_j) {} + J() : j(NULL){} +}; + +BOOST_CLASS_VERSION(J, 6) + +bool J::operator==(const J &rhs) const +{ + return static_cast(*this) == static_cast(rhs); +} + +#endif // BOOST_SERIALIZATION_TEST_J_HPP diff --git a/src/boost/libs/serialization/test/Jamfile.v2 b/src/boost/libs/serialization/test/Jamfile.v2 new file mode 100644 index 000000000..cce152167 --- /dev/null +++ b/src/boost/libs/serialization/test/Jamfile.v2 @@ -0,0 +1,190 @@ +# Boost serialization Library test Jamfile + +# (C) Copyright Robert Ramey 2002-2004. +# Use, modification, and distribution are subject to the +# Boost Software License, Version 1.0. (See accompanying file +# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +# + +project libs/serialization/test + : id serialization_test + : requirements /boost/filesystem + ; + +# import rules for testing conditional on config file variables +import ../../config/checks/config : requires ; + +# import rules from the boost serialization test +import ../util/test : + run-template + run-invoke + run-winvoke + test-bsl-run-no-lib + test-bsl-run + test-bsl-run_archive + test-bsl-run_files + test-bsl-run_polymorphic_files +; + +BOOST_ARCHIVE_LIST = [ modules.peek : BOOST_ARCHIVE_LIST ] ; + +lib dll_a + : + dll_a.cpp + ../build//boost_serialization + : + shared + ; + +lib dll_polymorphic_base + : + dll_polymorphic_base.cpp + ../build//boost_serialization + : + shared + ; + +lib dll_polymorphic_derived2 + : + dll_polymorphic_derived2.cpp + dll_polymorphic_base + ../build//boost_serialization + : + shared + ; + +test-suite "serialization" : + [ test-bsl-run_files test_array : A : : [ requires cxx11_hdr_array ] ] # BOOST_NO_CXX11_HDR_ARRAY + [ test-bsl-run_files test_boost_array : A ] + [ test-bsl-run_files test_native_array : A ] + [ test-bsl-run_files test_binary ] + [ test-bsl-run_files test_class_info_save ] + [ test-bsl-run_files test_class_info_load ] + [ test-bsl-run_files test_bitset ] + [ test-bsl-run_files test_complex ] + [ test-bsl-run_files test_contained_class : A ] + [ test-bsl-run_files test_cyclic_ptrs : A ] + [ test-bsl-run_files test_delete_pointer ] + [ test-bsl-run_files test_deque : A ] + [ test-bsl-run_files test_derived ] + [ test-bsl-run_files test_derived_class : A ] + [ test-bsl-run_files test_derived_class_ptr : A ] + [ test-bsl-run_files test_diamond ] + [ test-bsl-run_files test_diamond_complex ] + [ test-bsl-run_files test_forward_list : A : : [ requires cxx11_hdr_forward_list ] ] # BOOST_NO_CXX11_HDR_FORWARD_LIST + [ test-bsl-run_files test_forward_list_ptrs : A : : [ requires cxx11_hdr_forward_list ] ] # BOOST_NO_CXX11_HDR_FORWARD_LIST + [ test-bsl-run_files test_helper_support ] + [ test-bsl-run_files test_interrupts ] + [ test-bsl-run_files test_list : A ] + [ test-bsl-run_files test_list_ptrs : A ] + [ test-bsl-run_files test_map : A ] + [ test-bsl-run_files test_map_hashed : A : : [ requires hash ] ] # BOOST_HAS_HASH + [ test-bsl-run_files test_map_unordered : A : : [ requires cxx11_hdr_unordered_map ] ] # BOOST_NO_CXX11_HDR_UNORDERED_MAP + [ test-bsl-run_files test_map_boost_unordered : A ] + [ test-bsl-run_files test_mi ] + [ test-bsl-run_files test_multiple_ptrs : A ] + [ test-bsl-run_files test_multiple_inheritance ] + [ test-bsl-run_files test_non_intrusive ] + [ test-bsl-run_files test_non_default_ctor ] + [ test-bsl-run_files test_non_default_ctor2 ] + [ test-bsl-run_files test_null_ptr ] + [ test-bsl-run_files test_nvp : A ] + [ test-bsl-run_files test_object ] + [ test-bsl-run_files test_primitive ] + [ test-bsl-run_files test_priority_queue : A ] + [ test-bsl-run_files test_queue : A ] + [ test-bsl-run_files test_recursion : A ] + [ test-bsl-run_files test_registered ] + [ test-bsl-run_files test_set : A ] + [ test-bsl-run_files test_set_hashed : A : : [ requires hash ] ] # BOOST_HAS_HASH + [ test-bsl-run_files test_set_unordered : A : : [ requires cxx11_hdr_unordered_set ] ] # BOOST_NO_CXX11_HDR_UNORDERED_SET + [ test-bsl-run_files test_set_boost_unordered : A ] + [ test-bsl-run_files test_simple_class : A ] + [ test-bsl-run_files test_simple_class_ptr : A ] + [ test-bsl-run_files test_slist : A : : [ requires slist ] ] # BOOST_HAS_SLIST ] + [ test-bsl-run_files test_slist_ptrs : A : : [ requires slist ] ] # BOOST_HAS_SLIST ] ] + [ test-bsl-run_files test_split ] + [ test-bsl-run_files test_stack : A ] + [ test-bsl-run_files test_tracking ] + [ test-bsl-run_files test_unregistered ] + [ test-bsl-run_files test_unique_ptr ] + [ test-bsl-run_files test_valarray ] + [ test-bsl-run_files test_variant : A ] + [ test-bsl-run_files test_vector : A ] + [ test-bsl-run_files test_new_operator : A ] + [ test-bsl-run_files test_optional ] + [ test-bsl-run_files test_shared_ptr ] + [ test-bsl-run_files test_shared_ptr_multi_base ] + [ test-bsl-run_files test_shared_ptr_132 : : : [ requires auto_ptr ] ] # BOOST_NO_AUTO_PTR + + [ test-bsl-run_polymorphic_files test_polymorphic : test_polymorphic_A A ] + [ test-bsl-run_polymorphic_files test_polymorphic2 : test_polymorphic2imp ] + [ test-bsl-run_polymorphic_files test_p_helper ] + + # this test should pass with both shared and static linking. But B2 get's mixed up with static linking + # so we'll just run the shared version of the test, which is the one that we're most interested + # in anyway. + [ test-bsl-run_polymorphic_files test_dll_exported : polymorphic_derived1 : dll_polymorphic_base dll_polymorphic_derived2 : static:no ] + + [ test-bsl-run_polymorphic_files test_no_rtti : polymorphic_base polymorphic_derived1 polymorphic_derived2 ] + [ test-bsl-run_polymorphic_files test_exported : polymorphic_base polymorphic_derived1 polymorphic_derived2 ] + + # should compile + [ compile test_strong_typedef.cpp ] + ; + +if ! $(BOOST_ARCHIVE_LIST) { + test-suite "serialization2" : + [ test-bsl-run test_inclusion ] + [ test-bsl-run test_inclusion2 ] + # boost build has the feature that the building if libraries vs dll is automatic + # in that dependent libraries are built the same way - shared/static - that + # the application is. On some platforms (e.g windows) this is required to avoid + # problems of linking incompatible versions of the runtime library. So + # we suppress tests of our dlls when using static libraries + + [ test-bsl-run test_dll_simple : : dll_a : static:no ] + # [ test-bsl-run test_dll_plugin : : dll_derived2 : static:no linux:-ldl ] + + [ test-bsl-run test_private_ctor ] + [ test-bsl-run test_reset_object_address : A ] + [ test-bsl-run test_void_cast ] + [ test-bsl-run test_mult_archive_types ] + [ test-bsl-run test_iterators ] + [ test-bsl-run test_iterators_base64 ] + [ test-bsl-run test_smart_cast ] + [ test-bsl-run test_codecvt_null ] + [ test-bsl-run test_singleton ] + [ test-bsl-run test_singleton_inherited ] + [ test-bsl-run test_singleton_plain ] + + # [ test-bsl-run test_z ] + + # should fail compilation + [ compile-fail test_not_serializable.cpp ] + [ compile-fail test_traits_fail.cpp ] + [ compile-fail test_const_load_fail1.cpp ] + [ compile-fail test_const_load_fail2.cpp ] + [ compile-fail test_const_load_fail3.cpp ] + [ compile-fail test_const_load_fail1_nvp.cpp ] + [ compile-fail test_const_load_fail2_nvp.cpp ] + [ compile-fail test_const_load_fail3_nvp.cpp ] + [ compile-fail test_check.cpp ] + + # should compile with a warning message + [ compile test_static_warning.cpp ] + [ compile test_const_save_warn1.cpp ] + [ compile test_const_save_warn2.cpp ] + [ compile test_const_save_warn3.cpp ] + + # note - library unable to detect these errors for now + #[ compile test_const_save_warn1_nvp.cpp ] + #[ compile test_const_save_warn2_nvp.cpp ] + #[ compile test_const_save_warn3_nvp.cpp ] + + # should compile + [ compile test_traits_pass.cpp ] + [ compile test_const_pass.cpp ] + ; +} + diff --git a/src/boost/libs/serialization/test/b2.log b/src/boost/libs/serialization/test/b2.log new file mode 100644 index 000000000..03e7510b1 --- /dev/null +++ b/src/boost/libs/serialization/test/b2.log @@ -0,0 +1,2571 @@ +warning: mismatched versions of Boost.Build engine and core +warning: Boost.Build engine (b2) is 2018.02.00 +warning: Boost.Build core (at /Users/robertramey/WorkingProjects/modular-boost/tools/build/src) is 4.0-git +polymorphic_text_archive +polymorphic_text_warchive +polymorphic_binary_archive +polymorphic_xml_archive +polymorphic_xml_warchive +polymorphic_text_archive +polymorphic_text_warchive +polymorphic_binary_archive +polymorphic_xml_archive +polymorphic_xml_warchive +polymorphic_text_archive +polymorphic_text_warchive +polymorphic_binary_archive +polymorphic_xml_archive +polymorphic_xml_warchive +polymorphic_text_archive +polymorphic_text_warchive +polymorphic_binary_archive +polymorphic_xml_archive +polymorphic_xml_warchive +polymorphic_text_archive +polymorphic_text_warchive +polymorphic_binary_archive +polymorphic_xml_archive +polymorphic_xml_warchive +polymorphic_text_archive +polymorphic_text_warchive +polymorphic_binary_archive +polymorphic_xml_archive +polymorphic_xml_warchive +Performing configuration checks + + - default address-model : 64-bit (cached) + - default architecture : x86 (cached) + - symlinks supported : yes (cached) + - Boost.Config Feature Check: cxx11_hdr_array : yes (cached) + - Boost.Config Feature Check: std_wstreambuf : yes (cached) + - Boost.Config Feature Check: cxx11_hdr_forward_list : yes (cached) + - Boost.Config Feature Check: hash : no (cached) + - Boost.Config Feature Check: cxx11_hdr_unordered_map : no (cached) + - Boost.Config Feature Check: cxx11_hdr_unordered_set : no (cached) + - Boost.Config Feature Check: slist : no (cached) + - Boost.Config Feature Check: auto_ptr : yes (cached) +boost-test(RUN) "serialization/test_array_text_archive" : "libs/serialization/test/test_array.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_array_text_warchive" : "libs/serialization/test/test_array.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_array_binary_archive" : "libs/serialization/test/test_array.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_array_xml_archive" : "libs/serialization/test/test_array.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_array_xml_warchive" : "libs/serialization/test/test_array.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_boost_array_text_archive" : "libs/serialization/test/test_boost_array.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_boost_array_text_warchive" : "libs/serialization/test/test_boost_array.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_boost_array_binary_archive" : "libs/serialization/test/test_boost_array.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_boost_array_xml_archive" : "libs/serialization/test/test_boost_array.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_boost_array_xml_warchive" : "libs/serialization/test/test_boost_array.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_native_array_text_archive" : "libs/serialization/test/test_native_array.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_native_array_text_warchive" : "libs/serialization/test/test_native_array.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_native_array_binary_archive" : "libs/serialization/test/test_native_array.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_native_array_xml_archive" : "libs/serialization/test/test_native_array.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_native_array_xml_warchive" : "libs/serialization/test/test_native_array.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_binary_text_archive" : "libs/serialization/test/test_binary.cpp" +boost-test(RUN) "serialization/test_binary_text_warchive" : "libs/serialization/test/test_binary.cpp" +boost-test(RUN) "serialization/test_binary_binary_archive" : "libs/serialization/test/test_binary.cpp" +boost-test(RUN) "serialization/test_binary_xml_archive" : "libs/serialization/test/test_binary.cpp" +boost-test(RUN) "serialization/test_binary_xml_warchive" : "libs/serialization/test/test_binary.cpp" +boost-test(RUN) "serialization/test_class_info_save_text_archive" : "libs/serialization/test/test_class_info_save.cpp" +boost-test(RUN) "serialization/test_class_info_save_text_warchive" : "libs/serialization/test/test_class_info_save.cpp" +boost-test(RUN) "serialization/test_class_info_save_binary_archive" : "libs/serialization/test/test_class_info_save.cpp" +boost-test(RUN) "serialization/test_class_info_save_xml_archive" : "libs/serialization/test/test_class_info_save.cpp" +boost-test(RUN) "serialization/test_class_info_save_xml_warchive" : "libs/serialization/test/test_class_info_save.cpp" +boost-test(RUN) "serialization/test_class_info_load_text_archive" : "libs/serialization/test/test_class_info_load.cpp" +boost-test(RUN) "serialization/test_class_info_load_text_warchive" : "libs/serialization/test/test_class_info_load.cpp" +boost-test(RUN) "serialization/test_class_info_load_binary_archive" : "libs/serialization/test/test_class_info_load.cpp" +boost-test(RUN) "serialization/test_class_info_load_xml_archive" : "libs/serialization/test/test_class_info_load.cpp" +boost-test(RUN) "serialization/test_class_info_load_xml_warchive" : "libs/serialization/test/test_class_info_load.cpp" +boost-test(RUN) "serialization/test_bitset_text_archive" : "libs/serialization/test/test_bitset.cpp" +boost-test(RUN) "serialization/test_bitset_text_warchive" : "libs/serialization/test/test_bitset.cpp" +boost-test(RUN) "serialization/test_bitset_binary_archive" : "libs/serialization/test/test_bitset.cpp" +boost-test(RUN) "serialization/test_bitset_xml_archive" : "libs/serialization/test/test_bitset.cpp" +boost-test(RUN) "serialization/test_bitset_xml_warchive" : "libs/serialization/test/test_bitset.cpp" +boost-test(RUN) "serialization/test_complex_text_archive" : "libs/serialization/test/test_complex.cpp" +boost-test(RUN) "serialization/test_complex_text_warchive" : "libs/serialization/test/test_complex.cpp" +boost-test(RUN) "serialization/test_complex_binary_archive" : "libs/serialization/test/test_complex.cpp" +boost-test(RUN) "serialization/test_complex_xml_archive" : "libs/serialization/test/test_complex.cpp" +boost-test(RUN) "serialization/test_complex_xml_warchive" : "libs/serialization/test/test_complex.cpp" +boost-test(RUN) "serialization/test_contained_class_text_archive" : "libs/serialization/test/test_contained_class.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_contained_class_text_warchive" : "libs/serialization/test/test_contained_class.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_contained_class_binary_archive" : "libs/serialization/test/test_contained_class.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_contained_class_xml_archive" : "libs/serialization/test/test_contained_class.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_contained_class_xml_warchive" : "libs/serialization/test/test_contained_class.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_cyclic_ptrs_text_archive" : "libs/serialization/test/test_cyclic_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_cyclic_ptrs_text_warchive" : "libs/serialization/test/test_cyclic_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_cyclic_ptrs_binary_archive" : "libs/serialization/test/test_cyclic_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_cyclic_ptrs_xml_archive" : "libs/serialization/test/test_cyclic_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_cyclic_ptrs_xml_warchive" : "libs/serialization/test/test_cyclic_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_delete_pointer_text_archive" : "libs/serialization/test/test_delete_pointer.cpp" +boost-test(RUN) "serialization/test_delete_pointer_text_warchive" : "libs/serialization/test/test_delete_pointer.cpp" +boost-test(RUN) "serialization/test_delete_pointer_binary_archive" : "libs/serialization/test/test_delete_pointer.cpp" +boost-test(RUN) "serialization/test_delete_pointer_xml_archive" : "libs/serialization/test/test_delete_pointer.cpp" +boost-test(RUN) "serialization/test_delete_pointer_xml_warchive" : "libs/serialization/test/test_delete_pointer.cpp" +boost-test(RUN) "serialization/test_deque_text_archive" : "libs/serialization/test/test_deque.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_deque_text_warchive" : "libs/serialization/test/test_deque.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_deque_binary_archive" : "libs/serialization/test/test_deque.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_deque_xml_archive" : "libs/serialization/test/test_deque.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_deque_xml_warchive" : "libs/serialization/test/test_deque.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_derived_text_archive" : "libs/serialization/test/test_derived.cpp" +boost-test(RUN) "serialization/test_derived_text_warchive" : "libs/serialization/test/test_derived.cpp" +boost-test(RUN) "serialization/test_derived_binary_archive" : "libs/serialization/test/test_derived.cpp" +boost-test(RUN) "serialization/test_derived_xml_archive" : "libs/serialization/test/test_derived.cpp" +boost-test(RUN) "serialization/test_derived_xml_warchive" : "libs/serialization/test/test_derived.cpp" +boost-test(RUN) "serialization/test_derived_class_text_archive" : "libs/serialization/test/test_derived_class.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_derived_class_text_warchive" : "libs/serialization/test/test_derived_class.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_derived_class_binary_archive" : "libs/serialization/test/test_derived_class.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_derived_class_xml_archive" : "libs/serialization/test/test_derived_class.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_derived_class_xml_warchive" : "libs/serialization/test/test_derived_class.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_derived_class_ptr_text_archive" : "libs/serialization/test/test_derived_class_ptr.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_derived_class_ptr_text_warchive" : "libs/serialization/test/test_derived_class_ptr.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_derived_class_ptr_binary_archive" : "libs/serialization/test/test_derived_class_ptr.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_derived_class_ptr_xml_archive" : "libs/serialization/test/test_derived_class_ptr.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_derived_class_ptr_xml_warchive" : "libs/serialization/test/test_derived_class_ptr.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_diamond_text_archive" : "libs/serialization/test/test_diamond.cpp" +boost-test(RUN) "serialization/test_diamond_text_warchive" : "libs/serialization/test/test_diamond.cpp" +boost-test(RUN) "serialization/test_diamond_binary_archive" : "libs/serialization/test/test_diamond.cpp" +boost-test(RUN) "serialization/test_diamond_xml_archive" : "libs/serialization/test/test_diamond.cpp" +boost-test(RUN) "serialization/test_diamond_xml_warchive" : "libs/serialization/test/test_diamond.cpp" +boost-test(RUN) "serialization/test_diamond_complex_text_archive" : "libs/serialization/test/test_diamond_complex.cpp" +boost-test(RUN) "serialization/test_diamond_complex_text_warchive" : "libs/serialization/test/test_diamond_complex.cpp" +boost-test(RUN) "serialization/test_diamond_complex_binary_archive" : "libs/serialization/test/test_diamond_complex.cpp" +boost-test(RUN) "serialization/test_diamond_complex_xml_archive" : "libs/serialization/test/test_diamond_complex.cpp" +boost-test(RUN) "serialization/test_diamond_complex_xml_warchive" : "libs/serialization/test/test_diamond_complex.cpp" +boost-test(RUN) "serialization/test_forward_list_text_archive" : "libs/serialization/test/test_forward_list.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_forward_list_text_warchive" : "libs/serialization/test/test_forward_list.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_forward_list_binary_archive" : "libs/serialization/test/test_forward_list.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_forward_list_xml_archive" : "libs/serialization/test/test_forward_list.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_forward_list_xml_warchive" : "libs/serialization/test/test_forward_list.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_forward_list_ptrs_text_archive" : "libs/serialization/test/test_forward_list_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_forward_list_ptrs_text_warchive" : "libs/serialization/test/test_forward_list_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_forward_list_ptrs_binary_archive" : "libs/serialization/test/test_forward_list_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_forward_list_ptrs_xml_archive" : "libs/serialization/test/test_forward_list_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_forward_list_ptrs_xml_warchive" : "libs/serialization/test/test_forward_list_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_helper_support_text_archive" : "libs/serialization/test/test_helper_support.cpp" +boost-test(RUN) "serialization/test_helper_support_text_warchive" : "libs/serialization/test/test_helper_support.cpp" +boost-test(RUN) "serialization/test_helper_support_binary_archive" : "libs/serialization/test/test_helper_support.cpp" +boost-test(RUN) "serialization/test_helper_support_xml_archive" : "libs/serialization/test/test_helper_support.cpp" +boost-test(RUN) "serialization/test_helper_support_xml_warchive" : "libs/serialization/test/test_helper_support.cpp" +boost-test(RUN) "serialization/test_interrupts_text_archive" : "libs/serialization/test/test_interrupts.cpp" +boost-test(RUN) "serialization/test_interrupts_text_warchive" : "libs/serialization/test/test_interrupts.cpp" +boost-test(RUN) "serialization/test_interrupts_binary_archive" : "libs/serialization/test/test_interrupts.cpp" +boost-test(RUN) "serialization/test_interrupts_xml_archive" : "libs/serialization/test/test_interrupts.cpp" +boost-test(RUN) "serialization/test_interrupts_xml_warchive" : "libs/serialization/test/test_interrupts.cpp" +boost-test(RUN) "serialization/test_list_text_archive" : "libs/serialization/test/test_list.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_list_text_warchive" : "libs/serialization/test/test_list.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_list_binary_archive" : "libs/serialization/test/test_list.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_list_xml_archive" : "libs/serialization/test/test_list.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_list_xml_warchive" : "libs/serialization/test/test_list.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_list_ptrs_text_archive" : "libs/serialization/test/test_list_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_list_ptrs_text_warchive" : "libs/serialization/test/test_list_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_list_ptrs_binary_archive" : "libs/serialization/test/test_list_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_list_ptrs_xml_archive" : "libs/serialization/test/test_list_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_list_ptrs_xml_warchive" : "libs/serialization/test/test_list_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_map_text_archive" : "libs/serialization/test/test_map.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_map_text_warchive" : "libs/serialization/test/test_map.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_map_binary_archive" : "libs/serialization/test/test_map.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_map_xml_archive" : "libs/serialization/test/test_map.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_map_xml_warchive" : "libs/serialization/test/test_map.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_map_hashed_text_archive" : "libs/serialization/test/test_map_hashed.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_map_hashed_text_warchive" : "libs/serialization/test/test_map_hashed.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_map_hashed_binary_archive" : "libs/serialization/test/test_map_hashed.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_map_hashed_xml_archive" : "libs/serialization/test/test_map_hashed.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_map_hashed_xml_warchive" : "libs/serialization/test/test_map_hashed.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_map_unordered_text_archive" : "libs/serialization/test/test_map_unordered.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_map_unordered_text_warchive" : "libs/serialization/test/test_map_unordered.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_map_unordered_binary_archive" : "libs/serialization/test/test_map_unordered.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_map_unordered_xml_archive" : "libs/serialization/test/test_map_unordered.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_map_unordered_xml_warchive" : "libs/serialization/test/test_map_unordered.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_map_boost_unordered_text_archive" : "libs/serialization/test/test_map_boost_unordered.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_map_boost_unordered_text_warchive" : "libs/serialization/test/test_map_boost_unordered.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_map_boost_unordered_binary_archive" : "libs/serialization/test/test_map_boost_unordered.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_map_boost_unordered_xml_archive" : "libs/serialization/test/test_map_boost_unordered.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_map_boost_unordered_xml_warchive" : "libs/serialization/test/test_map_boost_unordered.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_mi_text_archive" : "libs/serialization/test/test_mi.cpp" +boost-test(RUN) "serialization/test_mi_text_warchive" : "libs/serialization/test/test_mi.cpp" +boost-test(RUN) "serialization/test_mi_binary_archive" : "libs/serialization/test/test_mi.cpp" +boost-test(RUN) "serialization/test_mi_xml_archive" : "libs/serialization/test/test_mi.cpp" +boost-test(RUN) "serialization/test_mi_xml_warchive" : "libs/serialization/test/test_mi.cpp" +boost-test(RUN) "serialization/test_multiple_ptrs_text_archive" : "libs/serialization/test/test_multiple_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_multiple_ptrs_text_warchive" : "libs/serialization/test/test_multiple_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_multiple_ptrs_binary_archive" : "libs/serialization/test/test_multiple_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_multiple_ptrs_xml_archive" : "libs/serialization/test/test_multiple_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_multiple_ptrs_xml_warchive" : "libs/serialization/test/test_multiple_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_multiple_inheritance_text_archive" : "libs/serialization/test/test_multiple_inheritance.cpp" +boost-test(RUN) "serialization/test_multiple_inheritance_text_warchive" : "libs/serialization/test/test_multiple_inheritance.cpp" +boost-test(RUN) "serialization/test_multiple_inheritance_binary_archive" : "libs/serialization/test/test_multiple_inheritance.cpp" +boost-test(RUN) "serialization/test_multiple_inheritance_xml_archive" : "libs/serialization/test/test_multiple_inheritance.cpp" +boost-test(RUN) "serialization/test_multiple_inheritance_xml_warchive" : "libs/serialization/test/test_multiple_inheritance.cpp" +boost-test(RUN) "serialization/test_non_intrusive_text_archive" : "libs/serialization/test/test_non_intrusive.cpp" +boost-test(RUN) "serialization/test_non_intrusive_text_warchive" : "libs/serialization/test/test_non_intrusive.cpp" +boost-test(RUN) "serialization/test_non_intrusive_binary_archive" : "libs/serialization/test/test_non_intrusive.cpp" +boost-test(RUN) "serialization/test_non_intrusive_xml_archive" : "libs/serialization/test/test_non_intrusive.cpp" +boost-test(RUN) "serialization/test_non_intrusive_xml_warchive" : "libs/serialization/test/test_non_intrusive.cpp" +boost-test(RUN) "serialization/test_non_default_ctor_text_archive" : "libs/serialization/test/test_non_default_ctor.cpp" +boost-test(RUN) "serialization/test_non_default_ctor_text_warchive" : "libs/serialization/test/test_non_default_ctor.cpp" +boost-test(RUN) "serialization/test_non_default_ctor_binary_archive" : "libs/serialization/test/test_non_default_ctor.cpp" +boost-test(RUN) "serialization/test_non_default_ctor_xml_archive" : "libs/serialization/test/test_non_default_ctor.cpp" +boost-test(RUN) "serialization/test_non_default_ctor_xml_warchive" : "libs/serialization/test/test_non_default_ctor.cpp" +boost-test(RUN) "serialization/test_non_default_ctor2_text_archive" : "libs/serialization/test/test_non_default_ctor2.cpp" +boost-test(RUN) "serialization/test_non_default_ctor2_text_warchive" : "libs/serialization/test/test_non_default_ctor2.cpp" +boost-test(RUN) "serialization/test_non_default_ctor2_binary_archive" : "libs/serialization/test/test_non_default_ctor2.cpp" +boost-test(RUN) "serialization/test_non_default_ctor2_xml_archive" : "libs/serialization/test/test_non_default_ctor2.cpp" +boost-test(RUN) "serialization/test_non_default_ctor2_xml_warchive" : "libs/serialization/test/test_non_default_ctor2.cpp" +boost-test(RUN) "serialization/test_null_ptr_text_archive" : "libs/serialization/test/test_null_ptr.cpp" +boost-test(RUN) "serialization/test_null_ptr_text_warchive" : "libs/serialization/test/test_null_ptr.cpp" +boost-test(RUN) "serialization/test_null_ptr_binary_archive" : "libs/serialization/test/test_null_ptr.cpp" +boost-test(RUN) "serialization/test_null_ptr_xml_archive" : "libs/serialization/test/test_null_ptr.cpp" +boost-test(RUN) "serialization/test_null_ptr_xml_warchive" : "libs/serialization/test/test_null_ptr.cpp" +boost-test(RUN) "serialization/test_nvp_text_archive" : "libs/serialization/test/test_nvp.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_nvp_text_warchive" : "libs/serialization/test/test_nvp.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_nvp_binary_archive" : "libs/serialization/test/test_nvp.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_nvp_xml_archive" : "libs/serialization/test/test_nvp.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_nvp_xml_warchive" : "libs/serialization/test/test_nvp.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_object_text_archive" : "libs/serialization/test/test_object.cpp" +boost-test(RUN) "serialization/test_object_text_warchive" : "libs/serialization/test/test_object.cpp" +boost-test(RUN) "serialization/test_object_binary_archive" : "libs/serialization/test/test_object.cpp" +boost-test(RUN) "serialization/test_object_xml_archive" : "libs/serialization/test/test_object.cpp" +boost-test(RUN) "serialization/test_object_xml_warchive" : "libs/serialization/test/test_object.cpp" +boost-test(RUN) "serialization/test_primitive_text_archive" : "libs/serialization/test/test_primitive.cpp" +boost-test(RUN) "serialization/test_primitive_text_warchive" : "libs/serialization/test/test_primitive.cpp" +boost-test(RUN) "serialization/test_primitive_binary_archive" : "libs/serialization/test/test_primitive.cpp" +boost-test(RUN) "serialization/test_primitive_xml_archive" : "libs/serialization/test/test_primitive.cpp" +boost-test(RUN) "serialization/test_primitive_xml_warchive" : "libs/serialization/test/test_primitive.cpp" +boost-test(RUN) "serialization/test_priority_queue_text_archive" : "libs/serialization/test/test_priority_queue.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_priority_queue_text_warchive" : "libs/serialization/test/test_priority_queue.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_priority_queue_binary_archive" : "libs/serialization/test/test_priority_queue.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_priority_queue_xml_archive" : "libs/serialization/test/test_priority_queue.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_priority_queue_xml_warchive" : "libs/serialization/test/test_priority_queue.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_queue_text_archive" : "libs/serialization/test/test_queue.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_queue_text_warchive" : "libs/serialization/test/test_queue.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_queue_binary_archive" : "libs/serialization/test/test_queue.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_queue_xml_archive" : "libs/serialization/test/test_queue.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_queue_xml_warchive" : "libs/serialization/test/test_queue.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_recursion_text_archive" : "libs/serialization/test/test_recursion.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_recursion_text_warchive" : "libs/serialization/test/test_recursion.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_recursion_binary_archive" : "libs/serialization/test/test_recursion.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_recursion_xml_archive" : "libs/serialization/test/test_recursion.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_recursion_xml_warchive" : "libs/serialization/test/test_recursion.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_registered_text_archive" : "libs/serialization/test/test_registered.cpp" +boost-test(RUN) "serialization/test_registered_text_warchive" : "libs/serialization/test/test_registered.cpp" +boost-test(RUN) "serialization/test_registered_binary_archive" : "libs/serialization/test/test_registered.cpp" +boost-test(RUN) "serialization/test_registered_xml_archive" : "libs/serialization/test/test_registered.cpp" +boost-test(RUN) "serialization/test_registered_xml_warchive" : "libs/serialization/test/test_registered.cpp" +boost-test(RUN) "serialization/test_set_text_archive" : "libs/serialization/test/test_set.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_set_text_warchive" : "libs/serialization/test/test_set.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_set_binary_archive" : "libs/serialization/test/test_set.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_set_xml_archive" : "libs/serialization/test/test_set.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_set_xml_warchive" : "libs/serialization/test/test_set.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_set_hashed_text_archive" : "libs/serialization/test/test_set_hashed.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_set_hashed_text_warchive" : "libs/serialization/test/test_set_hashed.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_set_hashed_binary_archive" : "libs/serialization/test/test_set_hashed.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_set_hashed_xml_archive" : "libs/serialization/test/test_set_hashed.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_set_hashed_xml_warchive" : "libs/serialization/test/test_set_hashed.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_set_unordered_text_archive" : "libs/serialization/test/test_set_unordered.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_set_unordered_text_warchive" : "libs/serialization/test/test_set_unordered.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_set_unordered_binary_archive" : "libs/serialization/test/test_set_unordered.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_set_unordered_xml_archive" : "libs/serialization/test/test_set_unordered.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_set_unordered_xml_warchive" : "libs/serialization/test/test_set_unordered.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_set_boost_unordered_text_archive" : "libs/serialization/test/test_set_boost_unordered.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_set_boost_unordered_text_warchive" : "libs/serialization/test/test_set_boost_unordered.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_set_boost_unordered_binary_archive" : "libs/serialization/test/test_set_boost_unordered.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_set_boost_unordered_xml_archive" : "libs/serialization/test/test_set_boost_unordered.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_set_boost_unordered_xml_warchive" : "libs/serialization/test/test_set_boost_unordered.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_simple_class_text_archive" : "libs/serialization/test/test_simple_class.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_simple_class_text_warchive" : "libs/serialization/test/test_simple_class.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_simple_class_binary_archive" : "libs/serialization/test/test_simple_class.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_simple_class_xml_archive" : "libs/serialization/test/test_simple_class.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_simple_class_xml_warchive" : "libs/serialization/test/test_simple_class.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_simple_class_ptr_text_archive" : "libs/serialization/test/test_simple_class_ptr.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_simple_class_ptr_text_warchive" : "libs/serialization/test/test_simple_class_ptr.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_simple_class_ptr_binary_archive" : "libs/serialization/test/test_simple_class_ptr.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_simple_class_ptr_xml_archive" : "libs/serialization/test/test_simple_class_ptr.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_simple_class_ptr_xml_warchive" : "libs/serialization/test/test_simple_class_ptr.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_slist_text_archive" : "libs/serialization/test/test_slist.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_slist_text_warchive" : "libs/serialization/test/test_slist.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_slist_binary_archive" : "libs/serialization/test/test_slist.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_slist_xml_archive" : "libs/serialization/test/test_slist.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_slist_xml_warchive" : "libs/serialization/test/test_slist.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_slist_ptrs_text_archive" : "libs/serialization/test/test_slist_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_slist_ptrs_text_warchive" : "libs/serialization/test/test_slist_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_slist_ptrs_binary_archive" : "libs/serialization/test/test_slist_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_slist_ptrs_xml_archive" : "libs/serialization/test/test_slist_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_slist_ptrs_xml_warchive" : "libs/serialization/test/test_slist_ptrs.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_split_text_archive" : "libs/serialization/test/test_split.cpp" +boost-test(RUN) "serialization/test_split_text_warchive" : "libs/serialization/test/test_split.cpp" +boost-test(RUN) "serialization/test_split_binary_archive" : "libs/serialization/test/test_split.cpp" +boost-test(RUN) "serialization/test_split_xml_archive" : "libs/serialization/test/test_split.cpp" +boost-test(RUN) "serialization/test_split_xml_warchive" : "libs/serialization/test/test_split.cpp" +boost-test(RUN) "serialization/test_stack_text_archive" : "libs/serialization/test/test_stack.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_stack_text_warchive" : "libs/serialization/test/test_stack.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_stack_binary_archive" : "libs/serialization/test/test_stack.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_stack_xml_archive" : "libs/serialization/test/test_stack.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_stack_xml_warchive" : "libs/serialization/test/test_stack.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_tracking_text_archive" : "libs/serialization/test/test_tracking.cpp" +boost-test(RUN) "serialization/test_tracking_text_warchive" : "libs/serialization/test/test_tracking.cpp" +boost-test(RUN) "serialization/test_tracking_binary_archive" : "libs/serialization/test/test_tracking.cpp" +boost-test(RUN) "serialization/test_tracking_xml_archive" : "libs/serialization/test/test_tracking.cpp" +boost-test(RUN) "serialization/test_tracking_xml_warchive" : "libs/serialization/test/test_tracking.cpp" +boost-test(RUN) "serialization/test_unregistered_text_archive" : "libs/serialization/test/test_unregistered.cpp" +boost-test(RUN) "serialization/test_unregistered_text_warchive" : "libs/serialization/test/test_unregistered.cpp" +boost-test(RUN) "serialization/test_unregistered_binary_archive" : "libs/serialization/test/test_unregistered.cpp" +boost-test(RUN) "serialization/test_unregistered_xml_archive" : "libs/serialization/test/test_unregistered.cpp" +boost-test(RUN) "serialization/test_unregistered_xml_warchive" : "libs/serialization/test/test_unregistered.cpp" +boost-test(RUN) "serialization/test_unique_ptr_text_archive" : "libs/serialization/test/test_unique_ptr.cpp" +boost-test(RUN) "serialization/test_unique_ptr_text_warchive" : "libs/serialization/test/test_unique_ptr.cpp" +boost-test(RUN) "serialization/test_unique_ptr_binary_archive" : "libs/serialization/test/test_unique_ptr.cpp" +boost-test(RUN) "serialization/test_unique_ptr_xml_archive" : "libs/serialization/test/test_unique_ptr.cpp" +boost-test(RUN) "serialization/test_unique_ptr_xml_warchive" : "libs/serialization/test/test_unique_ptr.cpp" +boost-test(RUN) "serialization/test_valarray_text_archive" : "libs/serialization/test/test_valarray.cpp" +boost-test(RUN) "serialization/test_valarray_text_warchive" : "libs/serialization/test/test_valarray.cpp" +boost-test(RUN) "serialization/test_valarray_binary_archive" : "libs/serialization/test/test_valarray.cpp" +boost-test(RUN) "serialization/test_valarray_xml_archive" : "libs/serialization/test/test_valarray.cpp" +boost-test(RUN) "serialization/test_valarray_xml_warchive" : "libs/serialization/test/test_valarray.cpp" +boost-test(RUN) "serialization/test_variant_text_archive" : "libs/serialization/test/test_variant.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_variant_text_warchive" : "libs/serialization/test/test_variant.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_variant_binary_archive" : "libs/serialization/test/test_variant.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_variant_xml_archive" : "libs/serialization/test/test_variant.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_variant_xml_warchive" : "libs/serialization/test/test_variant.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_vector_text_archive" : "libs/serialization/test/test_vector.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_vector_text_warchive" : "libs/serialization/test/test_vector.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_vector_binary_archive" : "libs/serialization/test/test_vector.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_vector_xml_archive" : "libs/serialization/test/test_vector.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_vector_xml_warchive" : "libs/serialization/test/test_vector.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_new_operator_text_archive" : "libs/serialization/test/test_new_operator.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_new_operator_text_warchive" : "libs/serialization/test/test_new_operator.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_new_operator_binary_archive" : "libs/serialization/test/test_new_operator.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_new_operator_xml_archive" : "libs/serialization/test/test_new_operator.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_new_operator_xml_warchive" : "libs/serialization/test/test_new_operator.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_optional_text_archive" : "libs/serialization/test/test_optional.cpp" +boost-test(RUN) "serialization/test_optional_text_warchive" : "libs/serialization/test/test_optional.cpp" +boost-test(RUN) "serialization/test_optional_binary_archive" : "libs/serialization/test/test_optional.cpp" +boost-test(RUN) "serialization/test_optional_xml_archive" : "libs/serialization/test/test_optional.cpp" +boost-test(RUN) "serialization/test_optional_xml_warchive" : "libs/serialization/test/test_optional.cpp" +boost-test(RUN) "serialization/test_shared_ptr_text_archive" : "libs/serialization/test/test_shared_ptr.cpp" +boost-test(RUN) "serialization/test_shared_ptr_text_warchive" : "libs/serialization/test/test_shared_ptr.cpp" +boost-test(RUN) "serialization/test_shared_ptr_binary_archive" : "libs/serialization/test/test_shared_ptr.cpp" +boost-test(RUN) "serialization/test_shared_ptr_xml_archive" : "libs/serialization/test/test_shared_ptr.cpp" +boost-test(RUN) "serialization/test_shared_ptr_xml_warchive" : "libs/serialization/test/test_shared_ptr.cpp" +boost-test(RUN) "serialization/test_shared_ptr_multi_base_text_archive" : "libs/serialization/test/test_shared_ptr_multi_base.cpp" +boost-test(RUN) "serialization/test_shared_ptr_multi_base_text_warchive" : "libs/serialization/test/test_shared_ptr_multi_base.cpp" +boost-test(RUN) "serialization/test_shared_ptr_multi_base_binary_archive" : "libs/serialization/test/test_shared_ptr_multi_base.cpp" +boost-test(RUN) "serialization/test_shared_ptr_multi_base_xml_archive" : "libs/serialization/test/test_shared_ptr_multi_base.cpp" +boost-test(RUN) "serialization/test_shared_ptr_multi_base_xml_warchive" : "libs/serialization/test/test_shared_ptr_multi_base.cpp" +boost-test(RUN) "serialization/test_shared_ptr_132_text_archive" : "libs/serialization/test/test_shared_ptr_132.cpp" +boost-test(RUN) "serialization/test_shared_ptr_132_text_warchive" : "libs/serialization/test/test_shared_ptr_132.cpp" +boost-test(RUN) "serialization/test_shared_ptr_132_binary_archive" : "libs/serialization/test/test_shared_ptr_132.cpp" +boost-test(RUN) "serialization/test_shared_ptr_132_xml_archive" : "libs/serialization/test/test_shared_ptr_132.cpp" +boost-test(RUN) "serialization/test_shared_ptr_132_xml_warchive" : "libs/serialization/test/test_shared_ptr_132.cpp" +boost-test(RUN) "serialization/test_polymorphic_polymorphic_text_archive" : "libs/serialization/test/test_polymorphic.cpp" "libs/serialization/test/test_polymorphic_A.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_polymorphic_polymorphic_text_warchive" : "libs/serialization/test/test_polymorphic.cpp" "libs/serialization/test/test_polymorphic_A.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_polymorphic_polymorphic_binary_archive" : "libs/serialization/test/test_polymorphic.cpp" "libs/serialization/test/test_polymorphic_A.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_polymorphic_polymorphic_xml_archive" : "libs/serialization/test/test_polymorphic.cpp" "libs/serialization/test/test_polymorphic_A.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_polymorphic_polymorphic_xml_warchive" : "libs/serialization/test/test_polymorphic.cpp" "libs/serialization/test/test_polymorphic_A.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_polymorphic2_polymorphic_text_archive" : "libs/serialization/test/test_polymorphic2.cpp" "libs/serialization/test/test_polymorphic2imp.cpp" +boost-test(RUN) "serialization/test_polymorphic2_polymorphic_text_warchive" : "libs/serialization/test/test_polymorphic2.cpp" "libs/serialization/test/test_polymorphic2imp.cpp" +boost-test(RUN) "serialization/test_polymorphic2_polymorphic_binary_archive" : "libs/serialization/test/test_polymorphic2.cpp" "libs/serialization/test/test_polymorphic2imp.cpp" +boost-test(RUN) "serialization/test_polymorphic2_polymorphic_xml_archive" : "libs/serialization/test/test_polymorphic2.cpp" "libs/serialization/test/test_polymorphic2imp.cpp" +boost-test(RUN) "serialization/test_polymorphic2_polymorphic_xml_warchive" : "libs/serialization/test/test_polymorphic2.cpp" "libs/serialization/test/test_polymorphic2imp.cpp" +boost-test(RUN) "serialization/test_p_helper_polymorphic_text_archive" : "libs/serialization/test/test_p_helper.cpp" +boost-test(RUN) "serialization/test_p_helper_polymorphic_text_warchive" : "libs/serialization/test/test_p_helper.cpp" +boost-test(RUN) "serialization/test_p_helper_polymorphic_binary_archive" : "libs/serialization/test/test_p_helper.cpp" +boost-test(RUN) "serialization/test_p_helper_polymorphic_xml_archive" : "libs/serialization/test/test_p_helper.cpp" +boost-test(RUN) "serialization/test_p_helper_polymorphic_xml_warchive" : "libs/serialization/test/test_p_helper.cpp" +boost-test(RUN) "serialization/test_dll_exported_polymorphic_text_archive" : "libs/serialization/test/test_dll_exported.cpp" "libs/serialization/test/polymorphic_derived1.cpp" +boost-test(RUN) "serialization/test_dll_exported_polymorphic_text_warchive" : "libs/serialization/test/test_dll_exported.cpp" "libs/serialization/test/polymorphic_derived1.cpp" +boost-test(RUN) "serialization/test_dll_exported_polymorphic_binary_archive" : "libs/serialization/test/test_dll_exported.cpp" "libs/serialization/test/polymorphic_derived1.cpp" +boost-test(RUN) "serialization/test_dll_exported_polymorphic_xml_archive" : "libs/serialization/test/test_dll_exported.cpp" "libs/serialization/test/polymorphic_derived1.cpp" +boost-test(RUN) "serialization/test_dll_exported_polymorphic_xml_warchive" : "libs/serialization/test/test_dll_exported.cpp" "libs/serialization/test/polymorphic_derived1.cpp" +boost-test(RUN) "serialization/test_no_rtti_polymorphic_text_archive" : "libs/serialization/test/test_no_rtti.cpp" "libs/serialization/test/polymorphic_base.cpp" "libs/serialization/test/polymorphic_derived1.cpp" "libs/serialization/test/polymorphic_derived2.cpp" +boost-test(RUN) "serialization/test_no_rtti_polymorphic_text_warchive" : "libs/serialization/test/test_no_rtti.cpp" "libs/serialization/test/polymorphic_base.cpp" "libs/serialization/test/polymorphic_derived1.cpp" "libs/serialization/test/polymorphic_derived2.cpp" +boost-test(RUN) "serialization/test_no_rtti_polymorphic_binary_archive" : "libs/serialization/test/test_no_rtti.cpp" "libs/serialization/test/polymorphic_base.cpp" "libs/serialization/test/polymorphic_derived1.cpp" "libs/serialization/test/polymorphic_derived2.cpp" +boost-test(RUN) "serialization/test_no_rtti_polymorphic_xml_archive" : "libs/serialization/test/test_no_rtti.cpp" "libs/serialization/test/polymorphic_base.cpp" "libs/serialization/test/polymorphic_derived1.cpp" "libs/serialization/test/polymorphic_derived2.cpp" +boost-test(RUN) "serialization/test_no_rtti_polymorphic_xml_warchive" : "libs/serialization/test/test_no_rtti.cpp" "libs/serialization/test/polymorphic_base.cpp" "libs/serialization/test/polymorphic_derived1.cpp" "libs/serialization/test/polymorphic_derived2.cpp" +boost-test(RUN) "serialization/test_exported_polymorphic_text_archive" : "libs/serialization/test/test_exported.cpp" "libs/serialization/test/polymorphic_base.cpp" "libs/serialization/test/polymorphic_derived1.cpp" "libs/serialization/test/polymorphic_derived2.cpp" +boost-test(RUN) "serialization/test_exported_polymorphic_text_warchive" : "libs/serialization/test/test_exported.cpp" "libs/serialization/test/polymorphic_base.cpp" "libs/serialization/test/polymorphic_derived1.cpp" "libs/serialization/test/polymorphic_derived2.cpp" +boost-test(RUN) "serialization/test_exported_polymorphic_binary_archive" : "libs/serialization/test/test_exported.cpp" "libs/serialization/test/polymorphic_base.cpp" "libs/serialization/test/polymorphic_derived1.cpp" "libs/serialization/test/polymorphic_derived2.cpp" +boost-test(RUN) "serialization/test_exported_polymorphic_xml_archive" : "libs/serialization/test/test_exported.cpp" "libs/serialization/test/polymorphic_base.cpp" "libs/serialization/test/polymorphic_derived1.cpp" "libs/serialization/test/polymorphic_derived2.cpp" +boost-test(RUN) "serialization/test_exported_polymorphic_xml_warchive" : "libs/serialization/test/test_exported.cpp" "libs/serialization/test/polymorphic_base.cpp" "libs/serialization/test/polymorphic_derived1.cpp" "libs/serialization/test/polymorphic_derived2.cpp" +boost-test(COMPILE) "serialization/test_strong_typedef" : "libs/serialization/test/test_strong_typedef.cpp" +boost-test(RUN) "serialization/test_inclusion" : "libs/serialization/test/test_inclusion.cpp" +boost-test(RUN) "serialization/test_inclusion2" : "libs/serialization/test/test_inclusion2.cpp" +boost-test(RUN) "serialization/test_dll_simple" : "libs/serialization/test/test_dll_simple.cpp" +boost-test(RUN) "serialization/test_private_ctor" : "libs/serialization/test/test_private_ctor.cpp" +boost-test(RUN) "serialization/test_reset_object_address" : "libs/serialization/test/test_reset_object_address.cpp" "libs/serialization/test/A.cpp" +boost-test(RUN) "serialization/test_void_cast" : "libs/serialization/test/test_void_cast.cpp" +boost-test(RUN) "serialization/test_mult_archive_types" : "libs/serialization/test/test_mult_archive_types.cpp" +boost-test(RUN) "serialization/test_iterators" : "libs/serialization/test/test_iterators.cpp" +boost-test(RUN) "serialization/test_iterators_base64" : "libs/serialization/test/test_iterators_base64.cpp" +boost-test(RUN) "serialization/test_smart_cast" : "libs/serialization/test/test_smart_cast.cpp" +boost-test(RUN) "serialization/test_codecvt_null" : "libs/serialization/test/test_codecvt_null.cpp" +boost-test(RUN) "serialization/test_singleton" : "libs/serialization/test/test_singleton.cpp" +boost-test(RUN) "serialization/test_singleton_inherited" : "libs/serialization/test/test_singleton_inherited.cpp" +boost-test(RUN) "serialization/test_singleton_plain" : "libs/serialization/test/test_singleton_plain.cpp" +boost-test(COMPILE_FAIL) "serialization/test_not_serializable" : "libs/serialization/test/test_not_serializable.cpp" +boost-test(COMPILE_FAIL) "serialization/test_traits_fail" : "libs/serialization/test/test_traits_fail.cpp" +boost-test(COMPILE_FAIL) "serialization/test_const_load_fail1" : "libs/serialization/test/test_const_load_fail1.cpp" +boost-test(COMPILE_FAIL) "serialization/test_const_load_fail2" : "libs/serialization/test/test_const_load_fail2.cpp" +boost-test(COMPILE_FAIL) "serialization/test_const_load_fail3" : "libs/serialization/test/test_const_load_fail3.cpp" +boost-test(COMPILE_FAIL) "serialization/test_const_load_fail1_nvp" : "libs/serialization/test/test_const_load_fail1_nvp.cpp" +boost-test(COMPILE_FAIL) "serialization/test_const_load_fail2_nvp" : "libs/serialization/test/test_const_load_fail2_nvp.cpp" +boost-test(COMPILE_FAIL) "serialization/test_const_load_fail3_nvp" : "libs/serialization/test/test_const_load_fail3_nvp.cpp" +boost-test(COMPILE_FAIL) "serialization/test_check" : "libs/serialization/test/test_check.cpp" +boost-test(COMPILE) "serialization/test_static_warning" : "libs/serialization/test/test_static_warning.cpp" +boost-test(COMPILE) "serialization/test_const_save_warn1" : "libs/serialization/test/test_const_save_warn1.cpp" +boost-test(COMPILE) "serialization/test_const_save_warn2" : "libs/serialization/test/test_const_save_warn2.cpp" +boost-test(COMPILE) "serialization/test_const_save_warn3" : "libs/serialization/test/test_const_save_warn3.cpp" +boost-test(COMPILE) "serialization/test_traits_pass" : "libs/serialization/test/test_traits_pass.cpp" +boost-test(COMPILE) "serialization/test_const_pass" : "libs/serialization/test/test_const_pass.cpp" +...patience... +...patience... +...found 6867 targets... +...updating 1433 targets... +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/build/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_iarchive.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/build/clang-darwin-03/debug/threading-multi/visibility-hidden/binary_oarchive.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/build/clang-darwin-03/debug/threading-multi/visibility-hidden/binary_iarchive.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/build/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_oarchive.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/build/clang-darwin-03/debug/threading-multi/visibility-hidden/text_iarchive.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/build/clang-darwin-03/debug/threading-multi/visibility-hidden/text_oarchive.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_array_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_array.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/build/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_text_iarchive.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/build/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_text_oarchive.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/build/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_binary_iarchive.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/build/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_binary_oarchive.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/build/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_xml_iarchive.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/build/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_xml_oarchive.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/build/clang-darwin-03/debug/threading-multi/visibility-hidden/xml_oarchive.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/build/clang-darwin-03/debug/threading-multi/visibility-hidden/xml_iarchive.o +clang-darwin.link.dll ../../../bin.v2/libs/serialization/build/clang-darwin-03/debug/threading-multi/visibility-hidden/libboost_serialization.dylib +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_array_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_array_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_array_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_array_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_array_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_array_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/build/clang-darwin-03/debug/threading-multi/visibility-hidden/text_wiarchive.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/build/clang-darwin-03/debug/threading-multi/visibility-hidden/text_woarchive.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_array_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_array.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/build/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_text_wiarchive.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/build/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_text_woarchive.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/build/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_xml_wiarchive.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/build/clang-darwin-03/debug/threading-multi/visibility-hidden/xml_woarchive.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/build/clang-darwin-03/debug/threading-multi/visibility-hidden/xml_wiarchive.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/build/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_xml_woarchive.o +clang-darwin.link.dll ../../../bin.v2/libs/serialization/build/clang-darwin-03/debug/threading-multi/visibility-hidden/libboost_wserialization.dylib +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_array_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_array_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_array_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_array_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_array_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_array_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_array_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_array.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_array_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_array.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_array_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_array_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_array_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_array_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_array_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_array_xml_archive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_array_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_array_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_array_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_array_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_array_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_array_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_array_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_array.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_array_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_array_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_array_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_array_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_array_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_array_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_boost_array_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_boost_array.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_boost_array_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_boost_array_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_boost_array_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_boost_array_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_boost_array_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_boost_array_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_boost_array_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_boost_array.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_boost_array_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_boost_array.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_boost_array_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_boost_array_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_boost_array_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_boost_array_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_boost_array_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_boost_array_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_boost_array_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_boost_array.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_boost_array_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_boost_array_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_boost_array_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_boost_array_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_boost_array_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_boost_array_text_warchive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_boost_array_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_boost_array_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_boost_array_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_boost_array_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_boost_array_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_boost_array_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_boost_array_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_boost_array.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_boost_array_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_boost_array_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_boost_array_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_boost_array_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_boost_array_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_boost_array_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_native_array_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_native_array.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_native_array_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_native_array_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_native_array_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_native_array_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_native_array_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_native_array_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_native_array_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_native_array.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_native_array_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_native_array.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_native_array_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_native_array_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_native_array_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_native_array_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_native_array_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_native_array_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_native_array_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_native_array.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_native_array_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_native_array_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_native_array_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_native_array_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_native_array_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_native_array_xml_archive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_native_array_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_native_array_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_native_array_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_native_array_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_native_array_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_native_array_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_binary_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_binary.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_binary_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_binary_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_binary_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_binary_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_binary_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_binary_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_binary_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_binary.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_binary_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_binary_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_binary_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_binary_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_binary_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_binary_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_binary_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_binary.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_native_array_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_native_array.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_binary_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_binary_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_binary_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_binary_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_binary_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_binary_binary_archive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_native_array_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_native_array_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_native_array_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_native_array_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_native_array_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_native_array_xml_warchive.test +...on 100th target... +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_binary_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_binary.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_binary_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_binary_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_binary_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_binary_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_binary_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_binary_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_binary_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_binary.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_binary_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_binary_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_binary_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_binary_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_binary_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_binary_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_class_info_save_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_save.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_class_info_save_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_save_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_class_info_save_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_save_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_class_info_save_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_save_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_class_info_save_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_save.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_class_info_save_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_save_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_class_info_save_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_save_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_class_info_save_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_save_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_class_info_save_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_save.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_class_info_save_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_save_binary_archive +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_class_info_save_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_save.o +testing.capture-output ../../../bin.v2/libs/serialization/test/test_class_info_save_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_save_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_class_info_save_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_save_binary_archive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_class_info_save_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_save_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_class_info_save_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_save_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_class_info_save_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_save_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_class_info_save_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_save.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_class_info_save_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_save_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_class_info_save_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_save_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_class_info_save_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_save_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_class_info_load_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_load.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_class_info_load_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_load_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_class_info_load_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_load_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_class_info_load_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_load_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_class_info_load_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_load.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_class_info_load_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_load_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_class_info_load_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_load_text_warchive.run +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_class_info_load_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_load.o +**passed** ../../../bin.v2/libs/serialization/test/test_class_info_load_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_load_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_class_info_load_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_load.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_class_info_load_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_load_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_class_info_load_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_load_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_class_info_load_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_load_binary_archive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_class_info_load_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_load_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_class_info_load_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_load_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_class_info_load_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_load_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_class_info_load_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_load.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_class_info_load_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_load_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_class_info_load_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_load_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_class_info_load_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_class_info_load_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_bitset_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_bitset.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_bitset_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_bitset.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_bitset_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_bitset_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_bitset_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_bitset_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_bitset_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_bitset_text_archive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_bitset_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_bitset_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_bitset_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_bitset_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_bitset_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_bitset_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_bitset_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_bitset.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_bitset_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_bitset_binary_archive +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_bitset_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_bitset.o +testing.capture-output ../../../bin.v2/libs/serialization/test/test_bitset_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_bitset_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_bitset_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_bitset_binary_archive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_bitset_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_bitset_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_bitset_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_bitset_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_bitset_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_bitset_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_bitset_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_bitset.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_bitset_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_bitset_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_bitset_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_bitset_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_bitset_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_bitset_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_complex_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_complex.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_complex_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_complex_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_complex_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_complex_text_archive.run +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_complex_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_complex.o +**passed** ../../../bin.v2/libs/serialization/test/test_complex_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_complex_text_archive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_complex_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_complex_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_complex_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_complex_text_warchive.run +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_complex_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_complex.o +**passed** ../../../bin.v2/libs/serialization/test/test_complex_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_complex_text_warchive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_complex_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_complex_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_complex_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_complex_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_complex_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_complex_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_complex_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_complex.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_complex_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_complex_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_complex_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_complex_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_complex_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_complex_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_complex_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_complex.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_complex_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_complex_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_complex_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_complex_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_complex_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_complex_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_contained_class_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_contained_class.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_contained_class_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_contained_class.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_contained_class_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_contained_class_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_contained_class_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_contained_class_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_contained_class_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_contained_class_text_archive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_contained_class_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_contained_class_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_contained_class_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_contained_class_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_contained_class_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_contained_class_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_contained_class_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_contained_class.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_contained_class_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_contained_class_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_contained_class_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_contained_class_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_contained_class_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_contained_class_binary_archive.test +...on 200th target... +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_contained_class_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_contained_class.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_contained_class_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_contained_class_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_contained_class_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_contained_class_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_contained_class_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_contained_class_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_contained_class_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_contained_class.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_contained_class_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_contained_class_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_contained_class_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_contained_class_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_contained_class_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_contained_class_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_cyclic_ptrs_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_cyclic_ptrs.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_cyclic_ptrs_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_cyclic_ptrs_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_cyclic_ptrs_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_cyclic_ptrs_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_cyclic_ptrs_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_cyclic_ptrs_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_cyclic_ptrs_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_cyclic_ptrs.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_cyclic_ptrs_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_cyclic_ptrs_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_cyclic_ptrs_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_cyclic_ptrs_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_cyclic_ptrs_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_cyclic_ptrs_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_cyclic_ptrs_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_cyclic_ptrs.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_cyclic_ptrs_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_cyclic_ptrs_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_cyclic_ptrs_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_cyclic_ptrs_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_cyclic_ptrs_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_cyclic_ptrs_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_cyclic_ptrs_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_cyclic_ptrs.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_cyclic_ptrs_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_cyclic_ptrs_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_cyclic_ptrs_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_cyclic_ptrs_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_cyclic_ptrs_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_cyclic_ptrs_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_cyclic_ptrs_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_cyclic_ptrs.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_cyclic_ptrs_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_cyclic_ptrs_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_cyclic_ptrs_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_cyclic_ptrs_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_cyclic_ptrs_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_cyclic_ptrs_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_delete_pointer_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_delete_pointer.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_delete_pointer_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_delete_pointer_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_delete_pointer_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_delete_pointer_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_delete_pointer_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_delete_pointer_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_delete_pointer_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_delete_pointer.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_delete_pointer_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_delete_pointer_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_delete_pointer_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_delete_pointer_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_delete_pointer_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_delete_pointer_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_delete_pointer_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_delete_pointer.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_delete_pointer_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_delete_pointer.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_delete_pointer_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_delete_pointer_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_delete_pointer_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_delete_pointer_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_delete_pointer_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_delete_pointer_xml_archive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_delete_pointer_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_delete_pointer_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_delete_pointer_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_delete_pointer_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_delete_pointer_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_delete_pointer_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_delete_pointer_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_delete_pointer.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_delete_pointer_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_delete_pointer_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_delete_pointer_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_delete_pointer_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_delete_pointer_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_delete_pointer_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_deque_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_deque.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_deque_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_deque_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_deque_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_deque_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_deque_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_deque_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_deque_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_deque.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_deque_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_deque_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_deque_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_deque_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_deque_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_deque_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_deque_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_deque.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_deque_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_deque_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_deque_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_deque_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_deque_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_deque_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_deque_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_deque.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_deque_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_deque_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_deque_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_deque_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_deque_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_deque_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_deque_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_deque.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_deque_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_deque_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_deque_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_deque_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_deque_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_deque_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_derived_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_derived_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_derived_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_derived_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_derived_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_derived_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_derived_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_derived_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_derived_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_derived_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_derived_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_derived_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_derived_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_derived_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_derived_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_derived_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_derived_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_derived_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_derived_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_derived_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_derived_class_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_derived_class_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_derived_class_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_derived_class_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_derived_class_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_derived_class_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_derived_class_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_derived_class_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_derived_class_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_derived_class_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_derived_class_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_xml_archive +...on 300th target... +testing.capture-output ../../../bin.v2/libs/serialization/test/test_derived_class_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_derived_class_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_xml_archive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_derived_class_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_derived_class_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_derived_class_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_derived_class_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_derived_class_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_derived_class_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_derived_class_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_derived_class_ptr_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_ptr.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_derived_class_ptr_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_ptr_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_derived_class_ptr_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_ptr_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_derived_class_ptr_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_ptr_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_derived_class_ptr_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_ptr.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_derived_class_ptr_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_ptr_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_derived_class_ptr_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_ptr_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_derived_class_ptr_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_ptr_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_derived_class_ptr_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_ptr.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_derived_class_ptr_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_ptr_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_derived_class_ptr_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_ptr_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_derived_class_ptr_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_ptr_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_derived_class_ptr_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_ptr.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_derived_class_ptr_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_ptr_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_derived_class_ptr_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_ptr_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_derived_class_ptr_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_ptr_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_derived_class_ptr_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_ptr.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_derived_class_ptr_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_ptr_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_derived_class_ptr_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_ptr_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_derived_class_ptr_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_derived_class_ptr_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_diamond_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_diamond_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_diamond_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_diamond_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_diamond_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_diamond_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_diamond_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_diamond_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_diamond_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_diamond_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_diamond_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_diamond_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_diamond_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_diamond_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_diamond_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_diamond_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_diamond_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_diamond_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_diamond_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_diamond_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_diamond_complex_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_complex.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_diamond_complex_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_complex_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_diamond_complex_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_complex_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_diamond_complex_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_complex_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_diamond_complex_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_complex.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_diamond_complex_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_complex_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_diamond_complex_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_complex_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_diamond_complex_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_complex_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_diamond_complex_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_complex.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_diamond_complex_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_complex_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_diamond_complex_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_complex_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_diamond_complex_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_complex_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_diamond_complex_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_complex.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_diamond_complex_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_complex_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_diamond_complex_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_complex_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_diamond_complex_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_complex_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_forward_list_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_forward_list_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_forward_list_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_forward_list_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_diamond_complex_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_complex.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_diamond_complex_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_complex_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_diamond_complex_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_complex_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_diamond_complex_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_diamond_complex_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_forward_list_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_forward_list_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_forward_list_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_forward_list_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_forward_list_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_forward_list_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_forward_list_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_forward_list_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_forward_list_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_forward_list_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_forward_list_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_forward_list_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_forward_list_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_forward_list_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_forward_list_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_forward_list_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_forward_list_ptrs_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_ptrs.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_forward_list_ptrs_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_ptrs_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_forward_list_ptrs_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_ptrs_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_forward_list_ptrs_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_ptrs_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_forward_list_ptrs_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_ptrs.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_forward_list_ptrs_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_ptrs_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_forward_list_ptrs_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_ptrs_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_forward_list_ptrs_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_ptrs_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_forward_list_ptrs_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_ptrs.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_forward_list_ptrs_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_ptrs_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_forward_list_ptrs_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_ptrs_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_forward_list_ptrs_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_ptrs_xml_archive.test +...on 400th target... +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_forward_list_ptrs_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_ptrs.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_forward_list_ptrs_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_ptrs_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_forward_list_ptrs_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_ptrs_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_forward_list_ptrs_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_ptrs_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_forward_list_ptrs_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_ptrs.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_forward_list_ptrs_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_ptrs_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_forward_list_ptrs_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_ptrs_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_forward_list_ptrs_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_forward_list_ptrs_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_helper_support_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_helper_support.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_helper_support_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_helper_support_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_helper_support_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_helper_support_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_helper_support_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_helper_support_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_helper_support_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_helper_support.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_helper_support_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_helper_support_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_helper_support_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_helper_support_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_helper_support_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_helper_support_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_helper_support_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_helper_support.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_helper_support_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_helper_support_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_helper_support_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_helper_support_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_helper_support_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_helper_support_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_helper_support_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_helper_support.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_helper_support_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_helper_support_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_helper_support_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_helper_support_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_helper_support_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_helper_support_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_interrupts_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_interrupts.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_interrupts_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_interrupts_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_interrupts_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_interrupts_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_interrupts_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_interrupts_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_helper_support_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_helper_support.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_interrupts_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_interrupts.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_helper_support_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_helper_support_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_helper_support_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_helper_support_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_helper_support_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_helper_support_xml_warchive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_interrupts_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_interrupts_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_interrupts_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_interrupts_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_interrupts_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_interrupts_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_interrupts_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_interrupts.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_interrupts_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_interrupts_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_interrupts_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_interrupts_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_interrupts_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_interrupts_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_interrupts_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_interrupts.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_interrupts_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_interrupts_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_interrupts_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_interrupts_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_interrupts_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_interrupts_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_interrupts_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_interrupts.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_interrupts_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_interrupts_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_interrupts_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_interrupts_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_interrupts_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_interrupts_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_list_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_list_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_list_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_list_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_list_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_list_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_list_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_list_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_list_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_list_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_list_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_list_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_list_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_list_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_list_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_list_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_list_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_list_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_list_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_list_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_list_ptrs_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_ptrs.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_list_ptrs_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_ptrs_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_list_ptrs_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_ptrs_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_list_ptrs_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_ptrs_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_list_ptrs_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_ptrs.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_list_ptrs_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_ptrs_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_list_ptrs_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_ptrs_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_list_ptrs_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_ptrs_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_list_ptrs_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_ptrs.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_list_ptrs_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_ptrs_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_list_ptrs_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_ptrs_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_list_ptrs_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_ptrs_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_list_ptrs_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_ptrs.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_list_ptrs_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_ptrs_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_list_ptrs_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_ptrs_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_list_ptrs_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_ptrs_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_list_ptrs_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_ptrs.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_list_ptrs_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_ptrs_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_list_ptrs_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_ptrs_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_list_ptrs_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_list_ptrs_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_map_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_map_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_map_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_map_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_map_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_map_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_map_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_map_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_map_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_map_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_map_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_map_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_binary_archive.test +...on 500th target... +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_map_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_map_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_map_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_map_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_map_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_map_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_map_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_map_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_map_boost_unordered_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_boost_unordered.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_map_boost_unordered_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_boost_unordered_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_map_boost_unordered_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_boost_unordered_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_map_boost_unordered_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_boost_unordered_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_map_boost_unordered_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_boost_unordered.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_map_boost_unordered_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_boost_unordered_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_map_boost_unordered_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_boost_unordered_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_map_boost_unordered_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_boost_unordered_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_map_boost_unordered_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_boost_unordered.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_map_boost_unordered_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_boost_unordered_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_map_boost_unordered_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_boost_unordered_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_map_boost_unordered_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_boost_unordered_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_map_boost_unordered_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_boost_unordered.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_map_boost_unordered_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_boost_unordered_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_map_boost_unordered_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_boost_unordered_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_map_boost_unordered_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_boost_unordered_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_mi_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_mi.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_mi_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_mi_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_mi_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_mi_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_mi_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_mi_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_map_boost_unordered_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_boost_unordered.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_map_boost_unordered_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_boost_unordered_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_map_boost_unordered_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_boost_unordered_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_map_boost_unordered_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_map_boost_unordered_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_mi_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_mi.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_mi_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_mi_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_mi_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_mi_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_mi_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_mi_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_mi_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_mi.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_mi_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_mi.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_mi_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_mi_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_mi_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_mi_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_mi_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_mi_binary_archive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_mi_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_mi_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_mi_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_mi_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_mi_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_mi_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_mi_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_mi.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_mi_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_mi_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_mi_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_mi_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_mi_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_mi_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_multiple_ptrs_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_ptrs.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_multiple_ptrs_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_ptrs_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_multiple_ptrs_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_ptrs_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_multiple_ptrs_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_ptrs_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_multiple_ptrs_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_ptrs.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_multiple_ptrs_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_ptrs.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_multiple_ptrs_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_ptrs_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_multiple_ptrs_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_ptrs_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_multiple_ptrs_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_ptrs_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_multiple_ptrs_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_ptrs.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_multiple_ptrs_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_ptrs_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_multiple_ptrs_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_ptrs_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_multiple_ptrs_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_ptrs_xml_archive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_multiple_ptrs_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_ptrs_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_multiple_ptrs_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_ptrs_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_multiple_ptrs_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_ptrs_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_multiple_ptrs_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_ptrs.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_multiple_ptrs_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_ptrs_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_multiple_ptrs_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_ptrs_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_multiple_ptrs_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_ptrs_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_multiple_inheritance_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_inheritance.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_multiple_inheritance_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_inheritance_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_multiple_inheritance_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_inheritance_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_multiple_inheritance_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_inheritance_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_multiple_inheritance_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_inheritance.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_multiple_inheritance_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_inheritance_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_multiple_inheritance_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_inheritance_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_multiple_inheritance_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_inheritance_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_multiple_inheritance_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_inheritance.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_multiple_inheritance_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_inheritance_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_multiple_inheritance_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_inheritance_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_multiple_inheritance_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_inheritance_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_multiple_inheritance_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_inheritance.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_multiple_inheritance_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_inheritance_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_multiple_inheritance_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_inheritance_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_multiple_inheritance_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_inheritance_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_multiple_inheritance_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_inheritance.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_multiple_inheritance_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_inheritance_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_multiple_inheritance_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_inheritance_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_multiple_inheritance_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_multiple_inheritance_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_non_intrusive_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_intrusive.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_non_intrusive_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_intrusive_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_non_intrusive_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_intrusive_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_non_intrusive_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_intrusive_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_non_intrusive_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_intrusive.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_non_intrusive_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_intrusive_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_non_intrusive_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_intrusive_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_non_intrusive_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_intrusive_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_non_intrusive_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_intrusive.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_non_intrusive_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_intrusive_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_non_intrusive_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_intrusive_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_non_intrusive_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_intrusive_binary_archive.test +...on 600th target... +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_non_intrusive_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_intrusive.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_non_intrusive_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_intrusive_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_non_intrusive_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_intrusive_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_non_intrusive_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_intrusive_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_non_intrusive_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_intrusive.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_non_intrusive_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_intrusive_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_non_intrusive_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_intrusive_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_non_intrusive_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_intrusive_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_non_default_ctor_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_non_default_ctor_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_non_default_ctor_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_non_default_ctor_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_non_default_ctor_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_non_default_ctor_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_non_default_ctor_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_non_default_ctor_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_non_default_ctor_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_non_default_ctor_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_non_default_ctor_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_non_default_ctor_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_non_default_ctor_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_non_default_ctor_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_non_default_ctor_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_non_default_ctor_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_non_default_ctor_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_non_default_ctor_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_non_default_ctor_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_non_default_ctor_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_non_default_ctor2_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor2.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_non_default_ctor2_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor2_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_non_default_ctor2_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor2_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_non_default_ctor2_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor2_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_non_default_ctor2_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor2.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_non_default_ctor2_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor2_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_non_default_ctor2_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor2_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_non_default_ctor2_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor2_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_non_default_ctor2_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor2.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_non_default_ctor2_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor2_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_non_default_ctor2_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor2_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_non_default_ctor2_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor2_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_non_default_ctor2_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor2.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_non_default_ctor2_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor2_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_non_default_ctor2_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor2_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_non_default_ctor2_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor2_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_non_default_ctor2_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor2.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_non_default_ctor2_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor2_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_non_default_ctor2_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor2_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_non_default_ctor2_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_non_default_ctor2_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_null_ptr_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_null_ptr.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_null_ptr_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_null_ptr_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_null_ptr_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_null_ptr_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_null_ptr_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_null_ptr_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_null_ptr_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_null_ptr.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_null_ptr_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_null_ptr_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_null_ptr_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_null_ptr_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_null_ptr_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_null_ptr_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_null_ptr_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_null_ptr.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_null_ptr_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_null_ptr_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_null_ptr_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_null_ptr_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_null_ptr_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_null_ptr_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_null_ptr_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_null_ptr.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_null_ptr_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_null_ptr_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_null_ptr_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_null_ptr_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_null_ptr_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_null_ptr_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_null_ptr_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_null_ptr.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_null_ptr_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_null_ptr_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_null_ptr_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_null_ptr_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_null_ptr_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_null_ptr_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_nvp_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_nvp.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_nvp_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_nvp_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_nvp_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_nvp_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_nvp_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_nvp_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_nvp_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_nvp.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_nvp_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_nvp_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_nvp_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_nvp_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_nvp_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_nvp_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_nvp_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_nvp.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_nvp_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_nvp_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_nvp_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_nvp_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_nvp_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_nvp_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_nvp_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_nvp.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_nvp_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_nvp_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_nvp_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_nvp_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_nvp_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_nvp_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_object_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_object.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_object_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_object_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_object_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_object_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_object_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_object_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_object_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_object.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_object_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_object_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_object_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_object_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_object_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_object_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_nvp_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_nvp.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_object_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_object.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_nvp_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_nvp_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_nvp_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_nvp_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_nvp_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_nvp_xml_warchive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_object_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_object_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_object_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_object_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_object_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_object_binary_archive.test +...on 700th target... +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_object_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_object.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_object_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_object_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_object_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_object_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_object_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_object_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_object_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_object.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_object_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_object_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_object_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_object_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_object_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_object_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_primitive_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_primitive.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_primitive_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_primitive_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_primitive_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_primitive_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_primitive_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_primitive_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_primitive_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_primitive.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_primitive_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_primitive_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_primitive_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_primitive_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_primitive_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_primitive_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_primitive_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_primitive.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_primitive_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_primitive_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_primitive_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_primitive_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_primitive_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_primitive_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_primitive_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_primitive.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_primitive_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_primitive_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_primitive_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_primitive_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_primitive_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_primitive_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_primitive_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_primitive.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_primitive_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_primitive_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_primitive_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_primitive_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_primitive_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_primitive_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_priority_queue_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_priority_queue.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_priority_queue_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_priority_queue_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_priority_queue_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_priority_queue_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_priority_queue_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_priority_queue_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_priority_queue_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_priority_queue.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_priority_queue_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_priority_queue_text_warchive +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_priority_queue_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_priority_queue.o +testing.capture-output ../../../bin.v2/libs/serialization/test/test_priority_queue_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_priority_queue_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_priority_queue_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_priority_queue_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_priority_queue_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_priority_queue.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_priority_queue_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_priority_queue_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_priority_queue_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_priority_queue_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_priority_queue_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_priority_queue_binary_archive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_priority_queue_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_priority_queue_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_priority_queue_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_priority_queue_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_priority_queue_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_priority_queue_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_priority_queue_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_priority_queue.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_priority_queue_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_priority_queue_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_priority_queue_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_priority_queue_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_priority_queue_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_priority_queue_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_queue_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_queue.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_queue_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_queue.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_queue_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_queue_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_queue_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_queue_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_queue_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_queue_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_queue_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_queue.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_queue_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_queue_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_queue_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_queue_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_queue_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_queue_text_warchive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_queue_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_queue_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_queue_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_queue_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_queue_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_queue_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_queue_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_queue.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_queue_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_queue_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_queue_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_queue_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_queue_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_queue_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_queue_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_queue.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_queue_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_queue_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_queue_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_queue_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_queue_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_queue_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_recursion_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_recursion.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_recursion_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_recursion_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_recursion_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_recursion_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_recursion_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_recursion_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_recursion_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_recursion.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_recursion_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_recursion_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_recursion_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_recursion_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_recursion_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_recursion_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_recursion_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_recursion.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_recursion_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_recursion_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_recursion_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_recursion_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_recursion_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_recursion_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_recursion_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_recursion.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_recursion_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_recursion_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_recursion_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_recursion_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_recursion_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_recursion_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_recursion_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_recursion.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_recursion_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_recursion_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_recursion_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_recursion_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_recursion_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_recursion_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_registered_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_registered.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_registered_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_registered_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_registered_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_registered_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_registered_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_registered_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_registered_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_registered.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_registered_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_registered_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_registered_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_registered_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_registered_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_registered_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_registered_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_registered.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_registered_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_registered.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_registered_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_registered_binary_archive +...on 800th target... +testing.capture-output ../../../bin.v2/libs/serialization/test/test_registered_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_registered_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_registered_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_registered_binary_archive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_registered_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_registered_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_registered_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_registered_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_registered_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_registered_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_registered_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_registered.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_registered_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_registered_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_registered_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_registered_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_registered_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_registered_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_set_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_set_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_set_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_set_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_set_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_set_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_xml_archive +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_set_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set.o +testing.capture-output ../../../bin.v2/libs/serialization/test/test_set_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_set_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_set_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_set_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_set_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_set_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_text_warchive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_set_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_set_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_set_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_set_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_set_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_set_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_set_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_set_boost_unordered_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_boost_unordered.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_set_boost_unordered_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_boost_unordered.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_set_boost_unordered_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_boost_unordered_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_set_boost_unordered_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_boost_unordered_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_set_boost_unordered_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_boost_unordered_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_set_boost_unordered_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_boost_unordered.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_set_boost_unordered_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_boost_unordered_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_set_boost_unordered_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_boost_unordered_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_set_boost_unordered_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_boost_unordered_text_warchive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_set_boost_unordered_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_boost_unordered_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_set_boost_unordered_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_boost_unordered_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_set_boost_unordered_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_boost_unordered_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_set_boost_unordered_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_boost_unordered.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_set_boost_unordered_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_boost_unordered_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_set_boost_unordered_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_boost_unordered_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_set_boost_unordered_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_boost_unordered_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_set_boost_unordered_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_boost_unordered.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_set_boost_unordered_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_boost_unordered_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_set_boost_unordered_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_boost_unordered_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_set_boost_unordered_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_set_boost_unordered_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_simple_class_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_simple_class_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_simple_class_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_simple_class_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_simple_class_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_simple_class_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_simple_class_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_simple_class_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_simple_class_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_simple_class_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_simple_class_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_simple_class_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_simple_class_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_simple_class_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_simple_class_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_simple_class_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_simple_class_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_simple_class_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_simple_class_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_simple_class_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_simple_class_ptr_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_ptr.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_simple_class_ptr_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_ptr_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_simple_class_ptr_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_ptr_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_simple_class_ptr_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_ptr_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_simple_class_ptr_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_ptr.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_simple_class_ptr_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_ptr_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_simple_class_ptr_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_ptr_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_simple_class_ptr_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_ptr_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_simple_class_ptr_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_ptr.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_simple_class_ptr_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_ptr_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_simple_class_ptr_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_ptr_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_simple_class_ptr_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_ptr_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_simple_class_ptr_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_ptr.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_simple_class_ptr_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_ptr.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_simple_class_ptr_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_ptr_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_simple_class_ptr_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_ptr_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_simple_class_ptr_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_ptr_binary_archive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_simple_class_ptr_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_ptr_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_simple_class_ptr_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_ptr_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_simple_class_ptr_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_simple_class_ptr_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_split_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_split.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_split_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_split_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_split_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_split_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_split_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_split_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_split_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_split.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_split_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_split_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_split_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_split_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_split_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_split_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_split_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_split.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_split_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_split.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_split_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_split_binary_archive +...on 900th target... +testing.capture-output ../../../bin.v2/libs/serialization/test/test_split_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_split_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_split_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_split_binary_archive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_split_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_split_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_split_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_split_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_split_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_split_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_split_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_split.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_split_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_split_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_split_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_split_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_split_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_split_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_stack_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_stack.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_stack_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_stack.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_stack_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_stack_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_stack_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_stack_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_stack_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_stack_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_stack_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_stack.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_stack_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_stack_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_stack_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_stack_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_stack_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_stack_text_warchive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_stack_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_stack_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_stack_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_stack_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_stack_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_stack_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_stack_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_stack.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_stack_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_stack_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_stack_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_stack_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_stack_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_stack_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_stack_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_stack.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_stack_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_stack_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_stack_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_stack_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_stack_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_stack_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_tracking_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_tracking.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_tracking_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_tracking_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_tracking_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_tracking_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_tracking_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_tracking_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_tracking_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_tracking.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_tracking_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_tracking_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_tracking_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_tracking_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_tracking_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_tracking_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_tracking_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_tracking.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_tracking_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_tracking_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_tracking_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_tracking_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_tracking_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_tracking_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_tracking_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_tracking.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_tracking_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_tracking_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_tracking_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_tracking_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_tracking_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_tracking_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_tracking_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_tracking.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_tracking_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_tracking_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_tracking_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_tracking_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_tracking_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_tracking_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_unregistered_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unregistered.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_unregistered_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unregistered_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_unregistered_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unregistered_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_unregistered_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unregistered_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_unregistered_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unregistered.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_unregistered_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unregistered_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_unregistered_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unregistered_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_unregistered_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unregistered_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_unregistered_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unregistered.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_unregistered_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unregistered_xml_archive +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_unregistered_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unregistered.o +testing.capture-output ../../../bin.v2/libs/serialization/test/test_unregistered_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unregistered_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_unregistered_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unregistered_xml_archive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_unregistered_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unregistered_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_unregistered_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unregistered_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_unregistered_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unregistered_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_unique_ptr_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unique_ptr.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_unique_ptr_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unique_ptr_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_unique_ptr_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unique_ptr_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_unique_ptr_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unique_ptr_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_unregistered_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unregistered.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_unregistered_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unregistered_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_unregistered_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unregistered_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_unregistered_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unregistered_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_unique_ptr_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unique_ptr.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_unique_ptr_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unique_ptr_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_unique_ptr_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unique_ptr_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_unique_ptr_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unique_ptr_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_unique_ptr_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unique_ptr.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_unique_ptr_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unique_ptr_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_unique_ptr_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unique_ptr_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_unique_ptr_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unique_ptr_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_unique_ptr_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unique_ptr.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_unique_ptr_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unique_ptr_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_unique_ptr_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unique_ptr_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_unique_ptr_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unique_ptr_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_unique_ptr_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unique_ptr.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_unique_ptr_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unique_ptr_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_unique_ptr_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unique_ptr_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_unique_ptr_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_unique_ptr_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_valarray_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_valarray.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_valarray_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_valarray_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_valarray_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_valarray_text_archive.run +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_valarray_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_valarray.o +**passed** ../../../bin.v2/libs/serialization/test/test_valarray_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_valarray_text_archive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_valarray_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_valarray_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_valarray_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_valarray_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_valarray_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_valarray_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_valarray_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_valarray.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_valarray_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_valarray.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_valarray_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_valarray_binary_archive +...on 1000th target... +testing.capture-output ../../../bin.v2/libs/serialization/test/test_valarray_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_valarray_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_valarray_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_valarray_binary_archive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_valarray_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_valarray_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_valarray_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_valarray_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_valarray_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_valarray_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_valarray_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_valarray.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_valarray_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_valarray_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_valarray_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_valarray_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_valarray_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_valarray_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_variant_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_variant.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_variant_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_variant_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_variant_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_variant_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_variant_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_variant_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_variant_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_variant.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_variant_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_variant_text_warchive +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_variant_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_variant.o +testing.capture-output ../../../bin.v2/libs/serialization/test/test_variant_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_variant_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_variant_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_variant_text_warchive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_variant_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_variant_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_variant_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_variant_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_variant_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_variant_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_variant_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_variant.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_variant_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_variant_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_variant_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_variant_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_variant_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_variant_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_vector_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_vector.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_vector_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_vector_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_vector_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_vector_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_vector_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_vector_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_vector_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_vector.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_vector_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_vector_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_vector_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_vector_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_vector_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_vector_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_vector_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_vector.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_vector_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_vector_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_vector_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_vector_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_vector_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_vector_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_variant_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_variant.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_variant_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_variant_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_variant_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_variant_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_variant_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_variant_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_vector_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_vector.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_vector_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_vector_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_vector_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_vector_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_vector_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_vector_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_vector_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_vector.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_vector_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_vector_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_vector_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_vector_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_vector_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_vector_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_new_operator_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_new_operator.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_new_operator_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_new_operator_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_new_operator_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_new_operator_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_new_operator_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_new_operator_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_new_operator_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_new_operator.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_new_operator_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_new_operator_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_new_operator_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_new_operator_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_new_operator_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_new_operator_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_new_operator_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_new_operator.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_new_operator_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_new_operator_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_new_operator_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_new_operator_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_new_operator_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_new_operator_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_new_operator_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_new_operator.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_new_operator_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_new_operator_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_new_operator_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_new_operator_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_new_operator_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_new_operator_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_new_operator_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_new_operator.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_new_operator_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_new_operator_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_new_operator_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_new_operator_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_new_operator_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_new_operator_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_optional_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_optional.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_optional_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_optional_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_optional_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_optional_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_optional_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_optional_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_optional_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_optional.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_optional_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_optional_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_optional_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_optional_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_optional_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_optional_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_optional_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_optional.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_optional_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_optional_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_optional_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_optional_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_optional_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_optional_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_optional_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_optional.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_optional_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_optional_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_optional_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_optional_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_optional_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_optional_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_optional_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_optional.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_optional_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_optional_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_optional_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_optional_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_optional_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_optional_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_shared_ptr_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_shared_ptr_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_shared_ptr_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_shared_ptr_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_shared_ptr_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_shared_ptr_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_shared_ptr_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_shared_ptr_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_shared_ptr_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_shared_ptr_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_shared_ptr_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_shared_ptr_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_binary_archive.test +...on 1100th target... +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_shared_ptr_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_shared_ptr_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_shared_ptr_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_shared_ptr_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_shared_ptr_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_shared_ptr_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_shared_ptr_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_shared_ptr_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_shared_ptr_multi_base_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_multi_base.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_shared_ptr_multi_base_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_multi_base_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_shared_ptr_multi_base_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_multi_base_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_shared_ptr_multi_base_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_multi_base_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_shared_ptr_multi_base_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_multi_base.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_shared_ptr_multi_base_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_multi_base_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_shared_ptr_multi_base_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_multi_base_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_shared_ptr_multi_base_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_multi_base_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_shared_ptr_multi_base_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_multi_base.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_shared_ptr_multi_base_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_multi_base_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_shared_ptr_multi_base_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_multi_base_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_shared_ptr_multi_base_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_multi_base_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_shared_ptr_multi_base_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_multi_base.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_shared_ptr_multi_base_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_multi_base_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_shared_ptr_multi_base_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_multi_base_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_shared_ptr_multi_base_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_multi_base_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_shared_ptr_132_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_132.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_shared_ptr_multi_base_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_multi_base.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_shared_ptr_132_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_132_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_shared_ptr_132_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_132_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_shared_ptr_132_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_132_text_archive.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_shared_ptr_multi_base_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_multi_base_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_shared_ptr_multi_base_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_multi_base_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_shared_ptr_multi_base_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_multi_base_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_shared_ptr_132_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_132.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_shared_ptr_132_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_132_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_shared_ptr_132_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_132_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_shared_ptr_132_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_132_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_shared_ptr_132_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_132.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_shared_ptr_132_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_132_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_shared_ptr_132_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_132_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_shared_ptr_132_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_132_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_shared_ptr_132_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_132.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_shared_ptr_132_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_132_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_shared_ptr_132_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_132_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_shared_ptr_132_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_132_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_shared_ptr_132_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_132.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_shared_ptr_132_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_132_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_shared_ptr_132_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_132_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_shared_ptr_132_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_shared_ptr_132_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic_A.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic_polymorphic_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic_polymorphic_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic_polymorphic_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic_A.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic_polymorphic_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic_polymorphic_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic_polymorphic_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic_A.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic_polymorphic_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic_polymorphic_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic_polymorphic_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic_A.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic_polymorphic_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic_polymorphic_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic_polymorphic_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic_A.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic_polymorphic_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic_polymorphic_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_polymorphic_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic_polymorphic_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2imp.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2imp.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2_polymorphic_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2_polymorphic_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2_polymorphic_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2_polymorphic_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2_polymorphic_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2_polymorphic_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2imp.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2_polymorphic_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2_polymorphic_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2_polymorphic_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2imp.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2_polymorphic_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2_polymorphic_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2_polymorphic_xml_archive.test +...on 1200th target... +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2imp.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2_polymorphic_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2_polymorphic_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_polymorphic2_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_polymorphic2_polymorphic_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_p_helper_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_p_helper.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_p_helper_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_p_helper_polymorphic_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_p_helper_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_p_helper_polymorphic_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_p_helper_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_p_helper_polymorphic_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_p_helper_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_p_helper.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_p_helper_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_p_helper_polymorphic_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_p_helper_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_p_helper_polymorphic_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_p_helper_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_p_helper_polymorphic_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_p_helper_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_p_helper.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_p_helper_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_p_helper_polymorphic_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_p_helper_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_p_helper_polymorphic_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_p_helper_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_p_helper_polymorphic_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_p_helper_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_p_helper.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_p_helper_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_p_helper_polymorphic_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_p_helper_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_p_helper_polymorphic_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_p_helper_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_p_helper_polymorphic_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived1.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_dll_exported.o +In file included from test_dll_exported.cpp:51: +./polymorphic_base.hpp:29:13: warning: polymorphic_base imported [-W#pragma-messages] + #pragma message ("polymorphic_base imported") + ^ +In file included from test_dll_exported.cpp:56: +./polymorphic_derived2.hpp:29:13: warning: polymorphic_derived2 imported [-W#pragma-messages] + #pragma message ("polymorphic_derived2 imported") + ^ +2 warnings generated. +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/clang-darwin-03/debug/threading-multi/visibility-hidden/dll_polymorphic_derived2.o +In file included from dll_polymorphic_derived2.cpp:13: +In file included from ./polymorphic_derived2.cpp:15: +./polymorphic_base.hpp:29:13: warning: polymorphic_base imported [-W#pragma-messages] + #pragma message ("polymorphic_base imported") + ^ +In file included from dll_polymorphic_derived2.cpp:13: +In file included from ./polymorphic_derived2.cpp:16: +./polymorphic_derived2.hpp:32:13: warning: polymorphic_derived2 exported [-W#pragma-messages] + #pragma message ("polymorphic_derived2 exported") + ^ +2 warnings generated. +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/clang-darwin-03/debug/threading-multi/visibility-hidden/dll_polymorphic_base.o +In file included from dll_polymorphic_base.cpp:12: +In file included from ./polymorphic_base.cpp:13: +./polymorphic_base.hpp:32:13: warning: polymorphic_base exported [-W#pragma-messages] + #pragma message ("polymorphic_base exported") + ^ +1 warning generated. +clang-darwin.link.dll ../../../bin.v2/libs/serialization/test/clang-darwin-03/debug/threading-multi/visibility-hidden/libdll_polymorphic_base.dylib +clang-darwin.link.dll ../../../bin.v2/libs/serialization/test/clang-darwin-03/debug/threading-multi/visibility-hidden/libdll_polymorphic_derived2.dylib +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_dll_exported_polymorphic_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_dll_exported_polymorphic_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_dll_exported_polymorphic_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_p_helper_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_p_helper.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_p_helper_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_p_helper_polymorphic_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_p_helper_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_p_helper_polymorphic_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_p_helper_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_p_helper_polymorphic_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived1.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_dll_exported.o +In file included from test_dll_exported.cpp:51: +./polymorphic_base.hpp:29:13: warning: polymorphic_base imported [-W#pragma-messages] + #pragma message ("polymorphic_base imported") + ^ +In file included from test_dll_exported.cpp:56: +./polymorphic_derived2.hpp:29:13: warning: polymorphic_derived2 imported [-W#pragma-messages] + #pragma message ("polymorphic_derived2 imported") + ^ +2 warnings generated. +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_dll_exported_polymorphic_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_dll_exported_polymorphic_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_dll_exported_polymorphic_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived1.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_dll_exported.o +In file included from test_dll_exported.cpp:51: +./polymorphic_base.hpp:29:13: warning: polymorphic_base imported [-W#pragma-messages] + #pragma message ("polymorphic_base imported") + ^ +In file included from test_dll_exported.cpp:56: +./polymorphic_derived2.hpp:29:13: warning: polymorphic_derived2 imported [-W#pragma-messages] + #pragma message ("polymorphic_derived2 imported") + ^ +2 warnings generated. +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_dll_exported_polymorphic_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_dll_exported_polymorphic_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_dll_exported_polymorphic_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_dll_exported.o +In file included from test_dll_exported.cpp:51: +./polymorphic_base.hpp:29:13: warning: polymorphic_base imported [-W#pragma-messages] + #pragma message ("polymorphic_base imported") + ^ +In file included from test_dll_exported.cpp:56: +./polymorphic_derived2.hpp:29:13: warning: polymorphic_derived2 imported [-W#pragma-messages] + #pragma message ("polymorphic_derived2 imported") + ^ +2 warnings generated. +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived1.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_dll_exported_polymorphic_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_dll_exported_polymorphic_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_dll_exported_polymorphic_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived1.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_dll_exported.o +In file included from test_dll_exported.cpp:51: +./polymorphic_base.hpp:29:13: warning: polymorphic_base imported [-W#pragma-messages] + #pragma message ("polymorphic_base imported") + ^ +In file included from test_dll_exported.cpp:56: +./polymorphic_derived2.hpp:29:13: warning: polymorphic_derived2 imported [-W#pragma-messages] + #pragma message ("polymorphic_derived2 imported") + ^ +2 warnings generated. +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_dll_exported_polymorphic_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_dll_exported_polymorphic_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_dll_exported_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_dll_exported_polymorphic_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_base.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived1.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived2.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_no_rtti.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_no_rtti_polymorphic_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_no_rtti_polymorphic_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_no_rtti_polymorphic_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_base.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived1.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_no_rtti.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived2.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_no_rtti_polymorphic_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_no_rtti_polymorphic_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_no_rtti_polymorphic_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_base.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived1.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived2.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_no_rtti.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_no_rtti_polymorphic_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_no_rtti_polymorphic_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_no_rtti_polymorphic_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_base.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived1.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived2.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_no_rtti.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_no_rtti_polymorphic_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_no_rtti_polymorphic_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_no_rtti_polymorphic_xml_archive.test +...on 1300th target... +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_base.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived1.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_no_rtti.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived2.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_no_rtti_polymorphic_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_no_rtti_polymorphic_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_no_rtti_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_no_rtti_polymorphic_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_base.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived1.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_exported.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived2.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_exported_polymorphic_text_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_exported_polymorphic_text_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_exported_polymorphic_text_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_base.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived1.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived2.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_exported.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_exported_polymorphic_text_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_exported_polymorphic_text_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_exported_polymorphic_text_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_base.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived1.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived2.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_exported.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_exported_polymorphic_binary_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_exported_polymorphic_binary_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_exported_polymorphic_binary_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_base.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_exported.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived1.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived2.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_exported_polymorphic_xml_archive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_exported_polymorphic_xml_archive.run +**passed** ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_xml_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_exported_polymorphic_xml_archive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_base.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived1.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_inclusion.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_inclusion.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_exported.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_inclusion.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_inclusion +testing.capture-output ../../../bin.v2/libs/serialization/test/test_inclusion.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_inclusion.run +**passed** ../../../bin.v2/libs/serialization/test/test_inclusion.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_inclusion.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/polymorphic_derived2.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_exported_polymorphic_xml_warchive +testing.capture-output ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_exported_polymorphic_xml_warchive.run +**passed** ../../../bin.v2/libs/serialization/test/test_exported_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_exported_polymorphic_xml_warchive.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_inclusion2.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_inclusion2.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_inclusion2.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_inclusion2 +testing.capture-output ../../../bin.v2/libs/serialization/test/test_inclusion2.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_inclusion2.run +**passed** ../../../bin.v2/libs/serialization/test/test_inclusion2.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_inclusion2.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_private_ctor.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_private_ctor.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_private_ctor.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_private_ctor +testing.capture-output ../../../bin.v2/libs/serialization/test/test_private_ctor.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_private_ctor.run +**passed** ../../../bin.v2/libs/serialization/test/test_private_ctor.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_private_ctor.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/clang-darwin-03/debug/threading-multi/visibility-hidden/dll_a.o +In file included from dll_a.cpp:14: +./A.hpp:40:13: warning: A exported [-W#pragma-messages] + #pragma message ("A exported") + ^ +1 warning generated. +clang-darwin.link.dll ../../../bin.v2/libs/serialization/test/clang-darwin-03/debug/threading-multi/visibility-hidden/libdll_a.dylib +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_dll_simple.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_dll_simple.o +In file included from test_dll_simple.cpp:33: +./A.hpp:37:13: warning: A imported [-W#pragma-messages] + #pragma message("A imported") + ^ +1 warning generated. +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_dll_simple.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_dll_simple +testing.capture-output ../../../bin.v2/libs/serialization/test/test_dll_simple.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_dll_simple.run +**passed** ../../../bin.v2/libs/serialization/test/test_dll_simple.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_dll_simple.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_void_cast.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_void_cast.o +test_void_cast.cpp:18:10: warning: private field 'a' is not used [-Wunused-private-field] + char a; + ^ +test_void_cast.cpp:23:9: warning: private field 'b' is not used [-Wunused-private-field] + int b; + ^ +test_void_cast.cpp:28:10: warning: private field 'c' is not used [-Wunused-private-field] + long c; + ^ +test_void_cast.cpp:33:10: warning: private field 'd' is not used [-Wunused-private-field] + char d[32]; + ^ +4 warnings generated. +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_void_cast.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_void_cast +testing.capture-output ../../../bin.v2/libs/serialization/test/test_void_cast.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_void_cast.run +**passed** ../../../bin.v2/libs/serialization/test/test_void_cast.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_void_cast.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_mult_archive_types.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_mult_archive_types.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_mult_archive_types.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_mult_archive_types +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_reset_object_address.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_reset_object_address.o +testing.capture-output ../../../bin.v2/libs/serialization/test/test_mult_archive_types.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_mult_archive_types.run +**passed** ../../../bin.v2/libs/serialization/test/test_mult_archive_types.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_mult_archive_types.test +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_reset_object_address.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_reset_object_address +testing.capture-output ../../../bin.v2/libs/serialization/test/test_reset_object_address.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_reset_object_address.run +**passed** ../../../bin.v2/libs/serialization/test/test_reset_object_address.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_reset_object_address.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_iterators.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_iterators.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_iterators.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_iterators +testing.capture-output ../../../bin.v2/libs/serialization/test/test_iterators.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_iterators.run +**passed** ../../../bin.v2/libs/serialization/test/test_iterators.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_iterators.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_iterators_base64.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_iterators_base64.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_iterators_base64.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_iterators_base64 +testing.capture-output ../../../bin.v2/libs/serialization/test/test_iterators_base64.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_iterators_base64.run +**passed** ../../../bin.v2/libs/serialization/test/test_iterators_base64.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_iterators_base64.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_smart_cast.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_smart_cast.o +test_smart_cast.cpp:20:10: warning: private field 'a' is not used [-Wunused-private-field] + char a; + ^ +test_smart_cast.cpp:25:9: warning: private field 'b' is not used [-Wunused-private-field] + int b; + ^ +test_smart_cast.cpp:35:10: warning: private field 'c' is not used [-Wunused-private-field] + long c; + ^ +test_smart_cast.cpp:122:10: warning: private field 'a' is not used [-Wunused-private-field] + char a; + ^ +test_smart_cast.cpp:129:9: warning: private field 'b' is not used [-Wunused-private-field] + int b; + ^ +test_smart_cast.cpp:141:10: warning: private field 'c' is not used [-Wunused-private-field] + long c; + ^ +6 warnings generated. +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_smart_cast.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_smart_cast +testing.capture-output ../../../bin.v2/libs/serialization/test/test_smart_cast.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_smart_cast.run +**passed** ../../../bin.v2/libs/serialization/test/test_smart_cast.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_smart_cast.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_codecvt_null.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_codecvt_null.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_codecvt_null.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_codecvt_null +testing.capture-output ../../../bin.v2/libs/serialization/test/test_codecvt_null.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_codecvt_null.run +**passed** ../../../bin.v2/libs/serialization/test/test_codecvt_null.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_codecvt_null.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_singleton.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_singleton.o +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_singleton.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_singleton +testing.capture-output ../../../bin.v2/libs/serialization/test/test_singleton.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_singleton.run +**passed** ../../../bin.v2/libs/serialization/test/test_singleton.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_singleton.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_singleton_inherited.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_singleton_inherited.o +test_singleton_inherited.cpp:26:32: warning: unknown warning group '-Wterminate', ignored [-Wunknown-warning-option] +#pragma GCC diagnostic ignored "-Wterminate" + ^ +1 warning generated. +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_singleton_inherited.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_singleton_inherited +testing.capture-output ../../../bin.v2/libs/serialization/test/test_singleton_inherited.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_singleton_inherited.run +**passed** ../../../bin.v2/libs/serialization/test/test_singleton_inherited.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_singleton_inherited.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_singleton_plain.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_singleton_plain.o +test_singleton_plain.cpp:25:32: warning: unknown warning group '-Wterminate', ignored [-Wunknown-warning-option] +#pragma GCC diagnostic ignored "-Wterminate" + ^ +1 warning generated. +clang-darwin.link ../../../bin.v2/libs/serialization/test/test_singleton_plain.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_singleton_plain +testing.capture-output ../../../bin.v2/libs/serialization/test/test_singleton_plain.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_singleton_plain.run +**passed** ../../../bin.v2/libs/serialization/test/test_singleton_plain.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_singleton_plain.test +...on 1400th target... +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_not_serializable.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_not_serializable.o +In file included from test_not_serializable.cpp:14: +In file included from ./test_tools.hpp:246: +In file included from ./text_archive.hpp:8: +In file included from ../../../boost/archive/text_oarchive.hpp:31: +In file included from ../../../boost/archive/basic_text_oarchive.hpp:29: +In file included from ../../../boost/archive/detail/common_oarchive.hpp:22: +In file included from ../../../boost/archive/detail/interface_oarchive.hpp:23: +In file included from ../../../boost/archive/detail/oserializer.hpp:40: +In file included from ../../../boost/serialization/extended_type_info_typeid.hpp:37: +../../../boost/serialization/access.hpp:116:11: error: no member named 'serialize' in 'A' + t.serialize(ar, file_version); + ~ ^ +../../../boost/serialization/serialization.hpp:68:13: note: in instantiation of function template specialization 'boost::serialization::access::serialize' requested here + access::serialize(ar, t, static_cast(file_version)); + ^ +../../../boost/serialization/serialization.hpp:126:5: note: in instantiation of function template specialization 'boost::serialization::serialize' requested here + serialize(ar, t, v); + ^ +../../../boost/archive/detail/oserializer.hpp:153:27: note: in instantiation of function template specialization 'boost::serialization::serialize_adl' requested here + boost::serialization::serialize_adl( + ^ +../../../boost/serialization/singleton.hpp:147:5: note: in instantiation of member function 'boost::archive::detail::oserializer::save_object_data' requested here + singleton_wrapper(){ + ^ +../../../boost/serialization/singleton.hpp:171:47: note: in instantiation of member function 'boost::serialization::detail::singleton_wrapper >::singleton_wrapper' requested here + static detail::singleton_wrapper< T > t; + ^ +../../../boost/serialization/singleton.hpp:196:16: note: (skipping 15 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) + return get_instance(); + ^ +../../../boost/archive/detail/oserializer.hpp:539:12: note: in instantiation of function template specialization 'boost::archive::detail::save_non_pointer_type::invoke >' requested here + typex::invoke(ar, t); + ^ +../../../boost/archive/detail/common_oarchive.hpp:71:18: note: in instantiation of function template specialization 'boost::archive::save >' requested here + archive::save(* this->This(), t); + ^ +../../../boost/archive/basic_text_oarchive.hpp:83:39: note: in instantiation of function template specialization 'boost::archive::detail::common_oarchive::save_override >' requested here + this->detail_common_oarchive::save_override(t); + ^ +../../../boost/archive/detail/interface_oarchive.hpp:70:23: note: in instantiation of function template specialization 'boost::archive::basic_text_oarchive::save_override >' requested here + this->This()->save_override(t); + ^ +test_not_serializable.cpp:28:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_oarchive::operator<< >' requested here + oa << BOOST_SERIALIZATION_NVP(a); + ^ +In file included from test_not_serializable.cpp:14: +In file included from ./test_tools.hpp:246: +In file included from ./text_archive.hpp:8: +In file included from ../../../boost/archive/text_oarchive.hpp:31: +In file included from ../../../boost/archive/basic_text_oarchive.hpp:29: +In file included from ../../../boost/archive/detail/common_oarchive.hpp:22: +In file included from ../../../boost/archive/detail/interface_oarchive.hpp:23: +In file included from ../../../boost/archive/detail/oserializer.hpp:70: +../../../boost/archive/detail/check.hpp:60:5: error: implicit instantiation of undefined template 'boost::STATIC_ASSERTION_FAILURE' + BOOST_STATIC_ASSERT(typex::value); + ^ +../../../boost/static_assert.hpp:154:13: note: expanded from macro 'BOOST_STATIC_ASSERT' + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >)>\ + ^ +../../../boost/archive/detail/iserializer.hpp:460:9: note: in instantiation of function template specialization 'boost::archive::detail::check_object_level' requested here + check_object_level< T >(); + ^ +../../../boost/archive/detail/iserializer.hpp:624:12: note: in instantiation of function template specialization 'boost::archive::detail::load_non_pointer_type::invoke' requested here + typex::invoke(ar, t); + ^ +../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load' requested here + archive::load(* this->This(), t); + ^ +../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive::load_override' requested here + this->detail_common_iarchive::load_override(t); + ^ +../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive::load_override' requested here + basic_text_iarchive::load_override(t); + ^ +../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: (skipping 9 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) + this->This()->load_override(t); + ^ +../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load >' requested here + archive::load(* this->This(), t); + ^ +../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive::load_override >' requested here + this->detail_common_iarchive::load_override(t); + ^ +../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive::load_override >' requested here + basic_text_iarchive::load_override(t); + ^ +../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl::load_override >' requested here + this->This()->load_override(t); + ^ +test_not_serializable.cpp:35:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive::operator>> >' requested here + ia >> BOOST_SERIALIZATION_NVP(a); + ^ +../../../boost/static_assert.hpp:79:26: note: template is declared here +template struct STATIC_ASSERTION_FAILURE; + ^ +In file included from test_not_serializable.cpp:14: +In file included from ./test_tools.hpp:246: +In file included from ./text_archive.hpp:8: +In file included from ../../../boost/archive/text_oarchive.hpp:31: +In file included from ../../../boost/archive/basic_text_oarchive.hpp:29: +In file included from ../../../boost/archive/detail/common_oarchive.hpp:22: +In file included from ../../../boost/archive/detail/interface_oarchive.hpp:23: +In file included from ../../../boost/archive/detail/oserializer.hpp:40: +In file included from ../../../boost/serialization/extended_type_info_typeid.hpp:37: +../../../boost/serialization/access.hpp:116:11: error: no member named 'serialize' in 'A' + t.serialize(ar, file_version); + ~ ^ +../../../boost/serialization/serialization.hpp:68:13: note: in instantiation of function template specialization 'boost::serialization::access::serialize' requested here + access::serialize(ar, t, static_cast(file_version)); + ^ +../../../boost/serialization/serialization.hpp:126:5: note: in instantiation of function template specialization 'boost::serialization::serialize' requested here + serialize(ar, t, v); + ^ +../../../boost/archive/detail/iserializer.hpp:187:27: note: in instantiation of function template specialization 'boost::serialization::serialize_adl' requested here + boost::serialization::serialize_adl( + ^ +../../../boost/serialization/singleton.hpp:147:5: note: in instantiation of member function 'boost::archive::detail::iserializer::load_object_data' requested here + singleton_wrapper(){ + ^ +../../../boost/serialization/singleton.hpp:171:47: note: in instantiation of member function 'boost::serialization::detail::singleton_wrapper >::singleton_wrapper' requested here + static detail::singleton_wrapper< T > t; + ^ +../../../boost/serialization/singleton.hpp:196:16: note: (skipping 17 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) + return get_instance(); + ^ +../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load >' requested here + archive::load(* this->This(), t); + ^ +../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive::load_override >' requested here + this->detail_common_iarchive::load_override(t); + ^ +../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive::load_override >' requested here + basic_text_iarchive::load_override(t); + ^ +../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl::load_override >' requested here + this->This()->load_override(t); + ^ +test_not_serializable.cpp:35:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive::operator>> >' requested here + ia >> BOOST_SERIALIZATION_NVP(a); + ^ +3 errors generated. +(failed-as-expected) ../../../bin.v2/libs/serialization/test/test_not_serializable.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_not_serializable.o +**passed** ../../../bin.v2/libs/serialization/test/test_not_serializable.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_not_serializable.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_traits_fail.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_traits_fail.o +test_traits_fail.cpp:24:1: error: implicit instantiation of undefined template 'boost::STATIC_ASSERTION_FAILURE' +BOOST_CLASS_TRACKING(A, boost::serialization::track_never) +^ +../../../boost/serialization/tracking.hpp:108:5: note: expanded from macro 'BOOST_CLASS_TRACKING' + BOOST_STATIC_ASSERT(( \ + ^ +../../../boost/static_assert.hpp:154:13: note: expanded from macro 'BOOST_STATIC_ASSERT' + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >)>\ + ^ +../../../boost/static_assert.hpp:79:26: note: template is declared here +template struct STATIC_ASSERTION_FAILURE; + ^ +1 error generated. +(failed-as-expected) ../../../bin.v2/libs/serialization/test/test_traits_fail.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_traits_fail.o +**passed** ../../../bin.v2/libs/serialization/test/test_traits_fail.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_traits_fail.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_const_load_fail1.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_load_fail1.o +In file included from test_const_load_fail1.cpp:11: +In file included from ../../../boost/archive/text_iarchive.hpp:24: +In file included from ../../../boost/archive/basic_text_iarchive.hpp:30: +In file included from ../../../boost/archive/detail/common_iarchive.hpp:23: +In file included from ../../../boost/archive/detail/interface_iarchive.hpp:22: +In file included from ../../../boost/archive/detail/iserializer.hpp:90: +../../../boost/archive/detail/check.hpp:162:5: error: implicit instantiation of undefined template 'boost::STATIC_ASSERTION_FAILURE' + BOOST_STATIC_ASSERT(typex::value); + ^ +../../../boost/static_assert.hpp:154:13: note: expanded from macro 'BOOST_STATIC_ASSERT' + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >)>\ + ^ +../../../boost/archive/detail/iserializer.hpp:609:13: note: in instantiation of function template specialization 'boost::archive::detail::check_const_loading' requested here + detail::check_const_loading< T >(); + ^ +../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load' requested here + archive::load(* this->This(), t); + ^ +../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive::load_override' requested here + this->detail_common_iarchive::load_override(t); + ^ +../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive::load_override' requested here + basic_text_iarchive::load_override(t); + ^ +../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl::load_override' requested here + this->This()->load_override(t); + ^ +test_const_load_fail1.cpp:22:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive::operator>>' requested here + ia >> a; + ^ +../../../boost/static_assert.hpp:79:26: note: template is declared here +template struct STATIC_ASSERTION_FAILURE; + ^ +1 error generated. +(failed-as-expected) ../../../bin.v2/libs/serialization/test/test_const_load_fail1.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_load_fail1.o +**passed** ../../../bin.v2/libs/serialization/test/test_const_load_fail1.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_load_fail1.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_const_load_fail2.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_load_fail2.o +In file included from test_const_load_fail2.cpp:11: +In file included from ../../../boost/archive/text_iarchive.hpp:24: +In file included from ../../../boost/archive/basic_text_iarchive.hpp:30: +In file included from ../../../boost/archive/detail/common_iarchive.hpp:23: +In file included from ../../../boost/archive/detail/interface_iarchive.hpp:22: +In file included from ../../../boost/archive/detail/iserializer.hpp:90: +../../../boost/archive/detail/check.hpp:162:5: error: implicit instantiation of undefined template 'boost::STATIC_ASSERTION_FAILURE' + BOOST_STATIC_ASSERT(typex::value); + ^ +../../../boost/static_assert.hpp:154:13: note: expanded from macro 'BOOST_STATIC_ASSERT' + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >)>\ + ^ +../../../boost/archive/detail/iserializer.hpp:609:13: note: in instantiation of function template specialization 'boost::archive::detail::check_const_loading' requested here + detail::check_const_loading< T >(); + ^ +../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load' requested here + archive::load(* this->This(), t); + ^ +../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive::load_override' requested here + this->detail_common_iarchive::load_override(t); + ^ +../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive::load_override' requested here + basic_text_iarchive::load_override(t); + ^ +../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl::load_override' requested here + this->This()->load_override(t); + ^ +test_const_load_fail2.cpp:22:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive::operator>>' requested here + ia >> a; + ^ +../../../boost/static_assert.hpp:79:26: note: template is declared here +template struct STATIC_ASSERTION_FAILURE; + ^ +In file included from test_const_load_fail2.cpp:11: +In file included from ../../../boost/archive/text_iarchive.hpp:24: +In file included from ../../../boost/archive/basic_text_iarchive.hpp:30: +In file included from ../../../boost/archive/detail/common_iarchive.hpp:23: +In file included from ../../../boost/archive/detail/interface_iarchive.hpp:22: +../../../boost/archive/detail/iserializer.hpp:552:15: error: cannot assign to variable 't' with const-qualified type 'A *const &' + t = pointer_tweak(newbpis_ptr->get_eti(), t, *t); + ~ ^ +../../../boost/archive/detail/iserializer.hpp:624:12: note: in instantiation of function template specialization 'boost::archive::detail::load_pointer_type::invoke' requested here + typex::invoke(ar, t); + ^ +../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load' requested here + archive::load(* this->This(), t); + ^ +../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive::load_override' requested here + this->detail_common_iarchive::load_override(t); + ^ +../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive::load_override' requested here + basic_text_iarchive::load_override(t); + ^ +../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl::load_override' requested here + this->This()->load_override(t); + ^ +test_const_load_fail2.cpp:22:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive::operator>>' requested here + ia >> a; + ^ +../../../boost/archive/detail/iserializer.hpp:538:45: note: variable 't' declared const here + static void invoke(Archive & ar, Tptr & t){ + ~~~~~~~^ +2 errors generated. +(failed-as-expected) ../../../bin.v2/libs/serialization/test/test_const_load_fail2.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_load_fail2.o +**passed** ../../../bin.v2/libs/serialization/test/test_const_load_fail2.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_load_fail2.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_const_load_fail3.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_load_fail3.o +In file included from test_const_load_fail3.cpp:11: +In file included from ../../../boost/archive/text_iarchive.hpp:24: +In file included from ../../../boost/archive/basic_text_iarchive.hpp:30: +In file included from ../../../boost/archive/detail/common_iarchive.hpp:23: +In file included from ../../../boost/archive/detail/interface_iarchive.hpp:22: +In file included from ../../../boost/archive/detail/iserializer.hpp:90: +../../../boost/archive/detail/check.hpp:162:5: error: implicit instantiation of undefined template 'boost::STATIC_ASSERTION_FAILURE' + BOOST_STATIC_ASSERT(typex::value); + ^ +../../../boost/static_assert.hpp:154:13: note: expanded from macro 'BOOST_STATIC_ASSERT' + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >)>\ + ^ +../../../boost/archive/detail/iserializer.hpp:609:13: note: in instantiation of function template specialization 'boost::archive::detail::check_const_loading' requested here + detail::check_const_loading< T >(); + ^ +../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load' requested here + archive::load(* this->This(), t); + ^ +../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive::load_override' requested here + this->detail_common_iarchive::load_override(t); + ^ +../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive::load_override' requested here + basic_text_iarchive::load_override(t); + ^ +../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl::load_override' requested here + this->This()->load_override(t); + ^ +test_const_load_fail3.cpp:21:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive::operator>>' requested here + ia >> a; + ^ +../../../boost/static_assert.hpp:79:26: note: template is declared here +template struct STATIC_ASSERTION_FAILURE; + ^ +In file included from test_const_load_fail3.cpp:11: +In file included from ../../../boost/archive/text_iarchive.hpp:24: +In file included from ../../../boost/archive/basic_text_iarchive.hpp:30: +In file included from ../../../boost/archive/detail/common_iarchive.hpp:23: +In file included from ../../../boost/archive/detail/interface_iarchive.hpp:22: +../../../boost/archive/detail/iserializer.hpp:552:15: error: cannot assign to variable 't' with const-qualified type 'const A *const &' + t = pointer_tweak(newbpis_ptr->get_eti(), t, *t); + ~ ^ +../../../boost/archive/detail/iserializer.hpp:624:12: note: in instantiation of function template specialization 'boost::archive::detail::load_pointer_type::invoke' requested here + typex::invoke(ar, t); + ^ +../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load' requested here + archive::load(* this->This(), t); + ^ +../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive::load_override' requested here + this->detail_common_iarchive::load_override(t); + ^ +../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive::load_override' requested here + basic_text_iarchive::load_override(t); + ^ +../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl::load_override' requested here + this->This()->load_override(t); + ^ +test_const_load_fail3.cpp:21:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive::operator>>' requested here + ia >> a; + ^ +../../../boost/archive/detail/iserializer.hpp:538:45: note: variable 't' declared const here + static void invoke(Archive & ar, Tptr & t){ + ~~~~~~~^ +2 errors generated. +(failed-as-expected) ../../../bin.v2/libs/serialization/test/test_const_load_fail3.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_load_fail3.o +**passed** ../../../bin.v2/libs/serialization/test/test_const_load_fail3.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_load_fail3.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_const_load_fail1_nvp.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_load_fail1_nvp.o +In file included from test_const_load_fail1_nvp.cpp:11: +In file included from ../../../boost/archive/text_iarchive.hpp:24: +In file included from ../../../boost/archive/basic_text_iarchive.hpp:30: +In file included from ../../../boost/archive/detail/common_iarchive.hpp:23: +In file included from ../../../boost/archive/detail/interface_iarchive.hpp:22: +In file included from ../../../boost/archive/detail/iserializer.hpp:90: +../../../boost/archive/detail/check.hpp:162:5: error: implicit instantiation of undefined template 'boost::STATIC_ASSERTION_FAILURE' + BOOST_STATIC_ASSERT(typex::value); + ^ +../../../boost/static_assert.hpp:154:13: note: expanded from macro 'BOOST_STATIC_ASSERT' + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >)>\ + ^ +../../../boost/archive/detail/iserializer.hpp:609:13: note: in instantiation of function template specialization 'boost::archive::detail::check_const_loading' requested here + detail::check_const_loading< T >(); + ^ +../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load' requested here + archive::load(* this->This(), t); + ^ +../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive::load_override' requested here + this->detail_common_iarchive::load_override(t); + ^ +../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive::load_override' requested here + basic_text_iarchive::load_override(t); + ^ +../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl::load_override' requested here + this->This()->load_override(t); + ^ +../../../boost/serialization/nvp.hpp:56:8: note: (skipping 8 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) + ar >> t.value(); + ^ +../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load >' requested here + archive::load(* this->This(), t); + ^ +../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive::load_override >' requested here + this->detail_common_iarchive::load_override(t); + ^ +../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive::load_override >' requested here + basic_text_iarchive::load_override(t); + ^ +../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl::load_override >' requested here + this->This()->load_override(t); + ^ +test_const_load_fail1_nvp.cpp:23:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive::operator>> >' requested here + ia >> BOOST_SERIALIZATION_NVP(a); + ^ +../../../boost/static_assert.hpp:79:26: note: template is declared here +template struct STATIC_ASSERTION_FAILURE; + ^ +1 error generated. +(failed-as-expected) ../../../bin.v2/libs/serialization/test/test_const_load_fail1_nvp.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_load_fail1_nvp.o +**passed** ../../../bin.v2/libs/serialization/test/test_const_load_fail1_nvp.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_load_fail1_nvp.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_const_load_fail2_nvp.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_load_fail2_nvp.o +In file included from test_const_load_fail2_nvp.cpp:11: +In file included from ../../../boost/archive/text_iarchive.hpp:24: +In file included from ../../../boost/archive/basic_text_iarchive.hpp:30: +In file included from ../../../boost/archive/detail/common_iarchive.hpp:23: +In file included from ../../../boost/archive/detail/interface_iarchive.hpp:22: +In file included from ../../../boost/archive/detail/iserializer.hpp:90: +../../../boost/archive/detail/check.hpp:162:5: error: implicit instantiation of undefined template 'boost::STATIC_ASSERTION_FAILURE' + BOOST_STATIC_ASSERT(typex::value); + ^ +../../../boost/static_assert.hpp:154:13: note: expanded from macro 'BOOST_STATIC_ASSERT' + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >)>\ + ^ +../../../boost/archive/detail/iserializer.hpp:609:13: note: in instantiation of function template specialization 'boost::archive::detail::check_const_loading' requested here + detail::check_const_loading< T >(); + ^ +../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load' requested here + archive::load(* this->This(), t); + ^ +../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive::load_override' requested here + this->detail_common_iarchive::load_override(t); + ^ +../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive::load_override' requested here + basic_text_iarchive::load_override(t); + ^ +../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl::load_override' requested here + this->This()->load_override(t); + ^ +../../../boost/serialization/nvp.hpp:56:8: note: (skipping 8 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) + ar >> t.value(); + ^ +../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load >' requested here + archive::load(* this->This(), t); + ^ +../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive::load_override >' requested here + this->detail_common_iarchive::load_override(t); + ^ +../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive::load_override >' requested here + basic_text_iarchive::load_override(t); + ^ +../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl::load_override >' requested here + this->This()->load_override(t); + ^ +test_const_load_fail2_nvp.cpp:23:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive::operator>> >' requested here + ia >> BOOST_SERIALIZATION_NVP(a); + ^ +../../../boost/static_assert.hpp:79:26: note: template is declared here +template struct STATIC_ASSERTION_FAILURE; + ^ +In file included from test_const_load_fail2_nvp.cpp:11: +In file included from ../../../boost/archive/text_iarchive.hpp:24: +In file included from ../../../boost/archive/basic_text_iarchive.hpp:30: +In file included from ../../../boost/archive/detail/common_iarchive.hpp:23: +In file included from ../../../boost/archive/detail/interface_iarchive.hpp:22: +../../../boost/archive/detail/iserializer.hpp:552:15: error: cannot assign to variable 't' with const-qualified type 'A *const &' + t = pointer_tweak(newbpis_ptr->get_eti(), t, *t); + ~ ^ +../../../boost/archive/detail/iserializer.hpp:624:12: note: in instantiation of function template specialization 'boost::archive::detail::load_pointer_type::invoke' requested here + typex::invoke(ar, t); + ^ +../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load' requested here + archive::load(* this->This(), t); + ^ +../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive::load_override' requested here + this->detail_common_iarchive::load_override(t); + ^ +../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive::load_override' requested here + basic_text_iarchive::load_override(t); + ^ +../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl::load_override' requested here + this->This()->load_override(t); + ^ +../../../boost/serialization/nvp.hpp:56:8: note: (skipping 8 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) + ar >> t.value(); + ^ +../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load >' requested here + archive::load(* this->This(), t); + ^ +../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive::load_override >' requested here + this->detail_common_iarchive::load_override(t); + ^ +../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive::load_override >' requested here + basic_text_iarchive::load_override(t); + ^ +../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl::load_override >' requested here + this->This()->load_override(t); + ^ +test_const_load_fail2_nvp.cpp:23:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive::operator>> >' requested here + ia >> BOOST_SERIALIZATION_NVP(a); + ^ +../../../boost/archive/detail/iserializer.hpp:538:45: note: variable 't' declared const here + static void invoke(Archive & ar, Tptr & t){ + ~~~~~~~^ +2 errors generated. +(failed-as-expected) ../../../bin.v2/libs/serialization/test/test_const_load_fail2_nvp.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_load_fail2_nvp.o +**passed** ../../../bin.v2/libs/serialization/test/test_const_load_fail2_nvp.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_load_fail2_nvp.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_const_load_fail3_nvp.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_load_fail3_nvp.o +In file included from test_const_load_fail3_nvp.cpp:11: +In file included from ../../../boost/archive/text_iarchive.hpp:24: +In file included from ../../../boost/archive/basic_text_iarchive.hpp:30: +In file included from ../../../boost/archive/detail/common_iarchive.hpp:23: +In file included from ../../../boost/archive/detail/interface_iarchive.hpp:22: +In file included from ../../../boost/archive/detail/iserializer.hpp:90: +../../../boost/archive/detail/check.hpp:162:5: error: implicit instantiation of undefined template 'boost::STATIC_ASSERTION_FAILURE' + BOOST_STATIC_ASSERT(typex::value); + ^ +../../../boost/static_assert.hpp:154:13: note: expanded from macro 'BOOST_STATIC_ASSERT' + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >)>\ + ^ +../../../boost/archive/detail/iserializer.hpp:609:13: note: in instantiation of function template specialization 'boost::archive::detail::check_const_loading' requested here + detail::check_const_loading< T >(); + ^ +../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load' requested here + archive::load(* this->This(), t); + ^ +../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive::load_override' requested here + this->detail_common_iarchive::load_override(t); + ^ +../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive::load_override' requested here + basic_text_iarchive::load_override(t); + ^ +../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl::load_override' requested here + this->This()->load_override(t); + ^ +../../../boost/serialization/nvp.hpp:56:8: note: (skipping 8 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) + ar >> t.value(); + ^ +../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load >' requested here + archive::load(* this->This(), t); + ^ +../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive::load_override >' requested here + this->detail_common_iarchive::load_override(t); + ^ +../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive::load_override >' requested here + basic_text_iarchive::load_override(t); + ^ +../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl::load_override >' requested here + this->This()->load_override(t); + ^ +test_const_load_fail3_nvp.cpp:23:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive::operator>> >' requested here + ia >> BOOST_SERIALIZATION_NVP(a); + ^ +../../../boost/static_assert.hpp:79:26: note: template is declared here +template struct STATIC_ASSERTION_FAILURE; + ^ +In file included from test_const_load_fail3_nvp.cpp:11: +In file included from ../../../boost/archive/text_iarchive.hpp:24: +In file included from ../../../boost/archive/basic_text_iarchive.hpp:30: +In file included from ../../../boost/archive/detail/common_iarchive.hpp:23: +In file included from ../../../boost/archive/detail/interface_iarchive.hpp:22: +../../../boost/archive/detail/iserializer.hpp:552:15: error: cannot assign to variable 't' with const-qualified type 'const A *const &' + t = pointer_tweak(newbpis_ptr->get_eti(), t, *t); + ~ ^ +../../../boost/archive/detail/iserializer.hpp:624:12: note: in instantiation of function template specialization 'boost::archive::detail::load_pointer_type::invoke' requested here + typex::invoke(ar, t); + ^ +../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load' requested here + archive::load(* this->This(), t); + ^ +../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive::load_override' requested here + this->detail_common_iarchive::load_override(t); + ^ +../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive::load_override' requested here + basic_text_iarchive::load_override(t); + ^ +../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl::load_override' requested here + this->This()->load_override(t); + ^ +../../../boost/serialization/nvp.hpp:56:8: note: (skipping 8 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) + ar >> t.value(); + ^ +../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load >' requested here + archive::load(* this->This(), t); + ^ +../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive::load_override >' requested here + this->detail_common_iarchive::load_override(t); + ^ +../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive::load_override >' requested here + basic_text_iarchive::load_override(t); + ^ +../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl::load_override >' requested here + this->This()->load_override(t); + ^ +test_const_load_fail3_nvp.cpp:23:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive::operator>> >' requested here + ia >> BOOST_SERIALIZATION_NVP(a); + ^ +../../../boost/archive/detail/iserializer.hpp:538:45: note: variable 't' declared const here + static void invoke(Archive & ar, Tptr & t){ + ~~~~~~~^ +2 errors generated. +(failed-as-expected) ../../../bin.v2/libs/serialization/test/test_const_load_fail3_nvp.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_load_fail3_nvp.o +**passed** ../../../bin.v2/libs/serialization/test/test_const_load_fail3_nvp.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_load_fail3_nvp.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_const_save_warn1.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_save_warn1.o +**passed** ../../../bin.v2/libs/serialization/test/test_const_save_warn1.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_save_warn1.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_check.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_check.o +In file included from test_check.cpp:18: +In file included from ../../../boost/archive/text_iarchive.hpp:24: +In file included from ../../../boost/archive/basic_text_iarchive.hpp:30: +In file included from ../../../boost/archive/detail/common_iarchive.hpp:23: +In file included from ../../../boost/archive/detail/interface_iarchive.hpp:22: +In file included from ../../../boost/archive/detail/iserializer.hpp:90: +../../../boost/archive/detail/check.hpp:78:5: error: implicit instantiation of undefined template 'boost::STATIC_ASSERTION_FAILURE' + BOOST_STATIC_ASSERT(typex::value); + ^ +../../../boost/static_assert.hpp:154:13: note: expanded from macro 'BOOST_STATIC_ASSERT' + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >)>\ + ^ +../../../boost/archive/detail/oserializer.hpp:314:9: note: in instantiation of function template specialization 'boost::archive::detail::check_object_versioning' requested here + check_object_versioning< T >(); + ^ +../../../boost/archive/detail/oserializer.hpp:539:12: note: in instantiation of function template specialization 'boost::archive::detail::save_non_pointer_type::invoke' requested here + typex::invoke(ar, t); + ^ +../../../boost/archive/detail/common_oarchive.hpp:71:18: note: in instantiation of function template specialization 'boost::archive::save' requested here + archive::save(* this->This(), t); + ^ +../../../boost/archive/basic_text_oarchive.hpp:83:39: note: in instantiation of function template specialization 'boost::archive::detail::common_oarchive::save_override' requested here + this->detail_common_oarchive::save_override(t); + ^ +../../../boost/archive/detail/interface_oarchive.hpp:70:23: note: in instantiation of function template specialization 'boost::archive::basic_text_oarchive::save_override' requested here + this->This()->save_override(t); + ^ +test_check.cpp:85:12: note: in instantiation of function template specialization 'boost::archive::detail::interface_oarchive::operator<<' requested here + oa << c2_out; // error check_object_versioning + ^ +../../../boost/static_assert.hpp:79:26: note: template is declared here +template struct STATIC_ASSERTION_FAILURE; + ^ +In file included from test_check.cpp:18: +In file included from ../../../boost/archive/text_iarchive.hpp:24: +In file included from ../../../boost/archive/basic_text_iarchive.hpp:30: +In file included from ../../../boost/archive/detail/common_iarchive.hpp:23: +In file included from ../../../boost/archive/detail/interface_iarchive.hpp:22: +In file included from ../../../boost/archive/detail/iserializer.hpp:90: +../../../boost/archive/detail/check.hpp:162:5: error: implicit instantiation of undefined template 'boost::STATIC_ASSERTION_FAILURE' + BOOST_STATIC_ASSERT(typex::value); + ^ +../../../boost/static_assert.hpp:154:13: note: expanded from macro 'BOOST_STATIC_ASSERT' + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >)>\ + ^ +../../../boost/archive/detail/iserializer.hpp:609:13: note: in instantiation of function template specialization 'boost::archive::detail::check_const_loading' requested here + detail::check_const_loading< T >(); + ^ +../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load' requested here + archive::load(* this->This(), t); + ^ +../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive::load_override' requested here + this->detail_common_iarchive::load_override(t); + ^ +../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive::load_override' requested here + basic_text_iarchive::load_override(t); + ^ +../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl::load_override' requested here + this->This()->load_override(t); + ^ +test_check.cpp:91:12: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive::operator>>' requested here + ia >> c1_in; // check_const_loading + ^ +../../../boost/static_assert.hpp:79:26: note: template is declared here +template struct STATIC_ASSERTION_FAILURE; + ^ +2 errors generated. +(failed-as-expected) ../../../bin.v2/libs/serialization/test/test_check.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_check.o +**passed** ../../../bin.v2/libs/serialization/test/test_check.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_check.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_const_save_warn2.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_save_warn2.o +**passed** ../../../bin.v2/libs/serialization/test/test_const_save_warn2.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_save_warn2.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_const_save_warn3.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_save_warn3.o +**passed** ../../../bin.v2/libs/serialization/test/test_const_save_warn3.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_save_warn3.test +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_const_pass.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_pass.o +clang-darwin.compile.c++ ../../../bin.v2/libs/serialization/test/test_traits_pass.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_traits_pass.o +**passed** ../../../bin.v2/libs/serialization/test/test_traits_pass.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_traits_pass.test +**passed** ../../../bin.v2/libs/serialization/test/test_const_pass.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_pass.test +...updated 1433 targets... diff --git a/src/boost/libs/serialization/test/base.hpp b/src/boost/libs/serialization/test/base.hpp new file mode 100644 index 000000000..6491a0e5e --- /dev/null +++ b/src/boost/libs/serialization/test/base.hpp @@ -0,0 +1,46 @@ +#ifndef BOOST_SERIALIZATION_TEST_BASE_HPP +#define BOOST_SERIALIZATION_TEST_BASE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// base.hpp simple class test + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#include +#include +#include + +#if defined(BASE_IMPORT) + #define DLL_DECL BOOST_SYMBOL_IMPORT +#elif defined(BASE_EXPORT) + #define DLL_DECL BOOST_SYMBOL_EXPORT +#else + #define DLL_DECL +#endif + +class DLL_DECL base +{ + friend class boost::serialization::access; + template + void serialize(Archive & /* ar */, const unsigned int /* file_version */); +public: + virtual ~base(){}; +}; + +BOOST_SERIALIZATION_ASSUME_ABSTRACT(base) + +#undef DLL_DECL + +#endif // BOOST_SERIALIZATION_TEST_BASE_HPP diff --git a/src/boost/libs/serialization/test/binary_archive.hpp b/src/boost/libs/serialization/test/binary_archive.hpp new file mode 100644 index 000000000..abddd4f93 --- /dev/null +++ b/src/boost/libs/serialization/test/binary_archive.hpp @@ -0,0 +1,24 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +// binary_archive +#include +typedef boost::archive::binary_oarchive test_oarchive; +typedef std::ofstream test_ostream; + +#include +typedef boost::archive::binary_iarchive test_iarchive; +typedef std::ifstream test_istream; + +//#define TEST_STREAM_FLAGS (std::ios::binary | std::ios::in | std::ios::out) +#define TEST_STREAM_FLAGS (std::ios::binary) diff --git a/src/boost/libs/serialization/test/binary_warchive.hpp b/src/boost/libs/serialization/test/binary_warchive.hpp new file mode 100644 index 000000000..a9f17c51a --- /dev/null +++ b/src/boost/libs/serialization/test/binary_warchive.hpp @@ -0,0 +1,14 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +// binary_warchive +#include +typedef boost::archive::binary_woarchive test_oarchive; +typedef std::wofstream test_ostream; +#include +typedef boost::archive::binary_wiarchive test_iarchive; +typedef std::wifstream test_istream; +#define TEST_STREAM_FLAGS std::wios::binary diff --git a/src/boost/libs/serialization/test/config_test.cpp b/src/boost/libs/serialization/test/config_test.cpp new file mode 100644 index 000000000..98ce0ab8b --- /dev/null +++ b/src/boost/libs/serialization/test/config_test.cpp @@ -0,0 +1,17 @@ +#include "../../../boost/config.hpp" + +#if defined(__clang__) +#pragma message "__clang__ defined" +#endif + +#if defined(BOOST_CLANG) +#pragma message "BOOST_CLANG defined" +#endif + +#if defined(__GNUC__) +#pragma message "__GNUC__ defined" +#endif + +#include "../../../boost/mpl/print.hpp" + +typedef int x; diff --git a/src/boost/libs/serialization/test/config_test.o b/src/boost/libs/serialization/test/config_test.o new file mode 100644 index 000000000..8e7087417 Binary files /dev/null and b/src/boost/libs/serialization/test/config_test.o differ diff --git a/src/boost/libs/serialization/test/derived2.hpp b/src/boost/libs/serialization/test/derived2.hpp new file mode 100644 index 000000000..e59b6b0fe --- /dev/null +++ b/src/boost/libs/serialization/test/derived2.hpp @@ -0,0 +1,50 @@ +#ifndef BOOST_SERIALIZATION_TEST_DERIVED2_HPP +#define BOOST_SERIALIZATION_TEST_DERIVED2_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// derived2.hpp simple class test + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#include +#include + +#define BASE_IMPORT +#include "base.hpp" + +#if defined(DERIVED2_IMPORT) + #define DLL_DECL BOOST_SYMBOL_IMPORT +#elif defined(DERIVED2_EXPORT) + #define DLL_DECL BOOST_SYMBOL_EXPORT +#else + #define DLL_DECL +#endif + +class DLL_DECL derived2 : + public base +{ + friend class boost::serialization::access; + template + void serialize(Archive &ar, const unsigned int /* file_version */); +public: + ~derived2(){} +}; + +#undef DLL_DECL + +// MWerks users can do this to make their code work +BOOST_SERIALIZATION_MWERKS_BASE_AND_DERIVED(base, derived2) + +#endif // BOOST_SERIALIZATION_TEST_DERIVED2_HPP diff --git a/src/boost/libs/serialization/test/dll_a.cpp b/src/boost/libs/serialization/test/dll_a.cpp new file mode 100644 index 000000000..7a8706cc3 --- /dev/null +++ b/src/boost/libs/serialization/test/dll_a.cpp @@ -0,0 +1,49 @@ + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// dll_a.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Build a dll which contains the serialization for a class A +// used in testing distribution of serialization code in DLLS + +#define A_EXPORT +#include "A.hpp" +#include "A.ipp" +#include "A.cpp" + +// instantiate code for text archives + +#include +#include + +template +A_DLL_DECL void A::serialize( + boost::archive::text_oarchive &ar, + const unsigned int /* file_version */ +); +template +A_DLL_DECL void A::serialize( + boost::archive::text_iarchive &ar, + const unsigned int /* file_version */ +); + +// instantiate code for polymorphic archives + +#include +#include + +template +A_DLL_DECL void A::serialize( + boost::archive::polymorphic_oarchive &, + const unsigned int /* file_version */ +); +template +A_DLL_DECL void A::serialize( + boost::archive::polymorphic_iarchive &, + const unsigned int /* file_version */ +); + diff --git a/src/boost/libs/serialization/test/dll_base.cpp b/src/boost/libs/serialization/test/dll_base.cpp new file mode 100644 index 000000000..dec8759af --- /dev/null +++ b/src/boost/libs/serialization/test/dll_base.cpp @@ -0,0 +1,55 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// dll_base.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Build a dll which contains the serialization for a class A +// used in testing distribution of serialization code in DLLS +#include + +#define BASE_EXPORT +#include "base.hpp" + +template +void base::serialize( + Archive &ar, + const unsigned int /* file_version */){ +} + +// for some reason this is required at least by MSVC +// given that its declared virtual .. = 0; This +// seems wrong to me but here it is. +//polymorphic_base::~polymorphic_base(){} + +// instantiate code for text archives +#include +#include + +// instantiate code for polymorphic archives +#include +#include + +// note: BOOST_CLASS_EXPORT cannot be used to instantiate +// serialization code for an abstract base class. So use +// explicit instantiation in this case. +//BOOST_CLASS_EXPORT(polymorphic_base) + +template BOOST_SYMBOL_EXPORT void base::serialize( + boost::archive::text_oarchive & ar, + const unsigned int version +); +template BOOST_SYMBOL_EXPORT void base::serialize( + boost::archive::text_iarchive & ar, + const unsigned int version +); +template BOOST_SYMBOL_EXPORT void base::serialize( + boost::archive::polymorphic_oarchive & ar, + const unsigned int version +); +template BOOST_SYMBOL_EXPORT void base::serialize( + boost::archive::polymorphic_iarchive & ar, + const unsigned int version +); diff --git a/src/boost/libs/serialization/test/dll_derived2.cpp b/src/boost/libs/serialization/test/dll_derived2.cpp new file mode 100644 index 000000000..db5ebdad9 --- /dev/null +++ b/src/boost/libs/serialization/test/dll_derived2.cpp @@ -0,0 +1,56 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// dll_derived2.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Build a dll which contains the serialization for a class A +// used in testing distribution of serialization code in DLLS + +#include + +#include + +#define DERIVED2_EXPORT +#include "derived2.hpp" + +template +void derived2::serialize( + Archive &ar, + const unsigned int /* file_version */ +){ + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(base); +} + +// instantiate code for text archives +#include +#include + +template BOOST_SYMBOL_EXPORT void derived2::serialize( + boost::archive::text_oarchive & ar, + const unsigned int version +); +template BOOST_SYMBOL_EXPORT void derived2::serialize( + boost::archive::text_iarchive & ar, + const unsigned int version +); + +#include +#include + +template BOOST_SYMBOL_EXPORT void derived2::serialize( + boost::archive::polymorphic_oarchive & ar, + const unsigned int version +); +template BOOST_SYMBOL_EXPORT void derived2::serialize( + boost::archive::polymorphic_iarchive & ar, + const unsigned int version +); + +// note: export has to be AFTER #includes for all archive classes + +#include +BOOST_SERIALIZATION_FACTORY_0(derived2) +BOOST_CLASS_EXPORT(derived2) diff --git a/src/boost/libs/serialization/test/dll_polymorphic_base.cpp b/src/boost/libs/serialization/test/dll_polymorphic_base.cpp new file mode 100644 index 000000000..9d949b5e3 --- /dev/null +++ b/src/boost/libs/serialization/test/dll_polymorphic_base.cpp @@ -0,0 +1,12 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// dll_polymorphic_base.cpp + +// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#define POLYMORPHIC_BASE_EXPORT +#include "polymorphic_base.cpp" diff --git a/src/boost/libs/serialization/test/dll_polymorphic_derived2.cpp b/src/boost/libs/serialization/test/dll_polymorphic_derived2.cpp new file mode 100644 index 000000000..8f6ada43b --- /dev/null +++ b/src/boost/libs/serialization/test/dll_polymorphic_derived2.cpp @@ -0,0 +1,13 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_derived2.cpp + +// (C) Copyright 2018Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#define POLYMORPHIC_BASE_IMPORT +#define POLYMORPHIC_DERIVED2_EXPORT +#include "polymorphic_derived2.cpp" diff --git a/src/boost/libs/serialization/test/library_status.html b/src/boost/libs/serialization/test/library_status.html new file mode 100644 index 000000000..e108a5637 --- /dev/null +++ b/src/boost/libs/serialization/test/library_status.html @@ -0,0 +1,369 @@ + + +Boost Library Status Automatic Test + + + +

Library Status: serialization/test

+Run Date: 21:44:22 UTC, Friday 11 October 2019 +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Test Nameclang-darwin-03
debug
threading-multi
visibility-hidden
test_array_binary_archivePass
test_array_text_archivePass
test_array_text_warchivePass
test_array_xml_archivePass
test_array_xml_warchivePass
test_binary_binary_archivePass
test_binary_text_archivePass
test_binary_text_warchivePass
test_binary_xml_archivePass
test_binary_xml_warchivePass
test_bitset_binary_archivePass
test_bitset_text_archivePass
test_bitset_text_warchivePass
test_bitset_xml_archivePass
test_bitset_xml_warchivePass
test_boost_array_binary_archivePass
test_boost_array_text_archivePass
test_boost_array_text_warchivePass
test_boost_array_xml_archivePass
test_boost_array_xml_warchivePass
test_checkWarn
test_class_info_load_binary_archivePass
test_class_info_load_text_archivePass
test_class_info_load_text_warchivePass
test_class_info_load_xml_archivePass
test_class_info_load_xml_warchivePass
test_class_info_save_binary_archivePass
test_class_info_save_text_archivePass
test_class_info_save_text_warchivePass
test_class_info_save_xml_archivePass
test_class_info_save_xml_warchivePass
test_codecvt_nullPass
test_complex_binary_archivePass
test_complex_text_archivePass
test_complex_text_warchivePass
test_complex_xml_archivePass
test_complex_xml_warchivePass
test_const_load_fail1Warn
test_const_load_fail1_nvpWarn
test_const_load_fail2Warn
test_const_load_fail2_nvpWarn
test_const_load_fail3Warn
test_const_load_fail3_nvpWarn
test_const_passPass
test_const_save_warn1Pass
test_const_save_warn2Pass
test_const_save_warn3Pass
test_contained_class_binary_archivePass
test_contained_class_text_archivePass
test_contained_class_text_warchivePass
test_contained_class_xml_archivePass
test_contained_class_xml_warchivePass
test_cyclic_ptrs_binary_archivePass
test_cyclic_ptrs_text_archivePass
test_cyclic_ptrs_text_warchivePass
test_cyclic_ptrs_xml_archivePass
test_cyclic_ptrs_xml_warchivePass
test_delete_pointer_binary_archivePass
test_delete_pointer_text_archivePass
test_delete_pointer_text_warchivePass
test_delete_pointer_xml_archivePass
test_delete_pointer_xml_warchivePass
test_deque_binary_archivePass
test_deque_text_archivePass
test_deque_text_warchivePass
test_deque_xml_archivePass
test_deque_xml_warchivePass
test_derived_binary_archivePass
test_derived_class_binary_archivePass
test_derived_class_ptr_binary_archivePass
test_derived_class_ptr_text_archivePass
test_derived_class_ptr_text_warchivePass
test_derived_class_ptr_xml_archivePass
test_derived_class_ptr_xml_warchivePass
test_derived_class_text_archivePass
test_derived_class_text_warchivePass
test_derived_class_xml_archivePass
test_derived_class_xml_warchivePass
test_derived_text_archivePass
test_derived_text_warchivePass
test_derived_xml_archivePass
test_derived_xml_warchivePass
test_diamond_binary_archivePass
test_diamond_complex_binary_archivePass
test_diamond_complex_text_archivePass
test_diamond_complex_text_warchivePass
test_diamond_complex_xml_archivePass
test_diamond_complex_xml_warchivePass
test_diamond_text_archivePass
test_diamond_text_warchivePass
test_diamond_xml_archivePass
test_diamond_xml_warchivePass
test_dll_exported_polymorphic_binary_archiveWarn
test_dll_exported_polymorphic_text_archiveWarn
test_dll_exported_polymorphic_text_warchiveWarn
test_dll_exported_polymorphic_xml_archivePass
test_dll_exported_polymorphic_xml_warchiveWarn
test_dll_simpleWarn
test_exported_polymorphic_binary_archivePass
test_exported_polymorphic_text_archivePass
test_exported_polymorphic_text_warchivePass
test_exported_polymorphic_xml_archivePass
test_exported_polymorphic_xml_warchivePass
test_forward_list_binary_archivePass
test_forward_list_ptrs_binary_archivePass
test_forward_list_ptrs_text_archivePass
test_forward_list_ptrs_text_warchivePass
test_forward_list_ptrs_xml_archivePass
test_forward_list_ptrs_xml_warchivePass
test_forward_list_text_archivePass
test_forward_list_text_warchivePass
test_forward_list_xml_archivePass
test_forward_list_xml_warchivePass
test_helper_support_binary_archivePass
test_helper_support_text_archivePass
test_helper_support_text_warchivePass
test_helper_support_xml_archivePass
test_helper_support_xml_warchivePass
test_inclusion2Pass
test_inclusionPass
test_interrupts_binary_archivePass
test_interrupts_text_archivePass
test_interrupts_text_warchivePass
test_interrupts_xml_archivePass
test_interrupts_xml_warchivePass
test_iteratorsPass
test_iterators_base64Pass
test_list_binary_archivePass
test_list_ptrs_binary_archivePass
test_list_ptrs_text_archivePass
test_list_ptrs_text_warchivePass
test_list_ptrs_xml_archivePass
test_list_ptrs_xml_warchivePass
test_list_text_archivePass
test_list_text_warchivePass
test_list_xml_archivePass
test_list_xml_warchivePass
test_map_binary_archivePass
test_map_boost_unordered_binary_archivePass
test_map_boost_unordered_text_archivePass
test_map_boost_unordered_text_warchivePass
test_map_boost_unordered_xml_archivePass
test_map_boost_unordered_xml_warchivePass
test_map_text_archivePass
test_map_text_warchivePass
test_map_xml_archivePass
test_map_xml_warchivePass
test_mi_binary_archivePass
test_mi_text_archivePass
test_mi_text_warchivePass
test_mi_xml_archivePass
test_mi_xml_warchivePass
test_mult_archive_typesPass
test_multiple_inheritance_binary_archivePass
test_multiple_inheritance_text_archivePass
test_multiple_inheritance_text_warchivePass
test_multiple_inheritance_xml_archivePass
test_multiple_inheritance_xml_warchivePass
test_multiple_ptrs_binary_archivePass
test_multiple_ptrs_text_archivePass
test_multiple_ptrs_text_warchivePass
test_multiple_ptrs_xml_archivePass
test_multiple_ptrs_xml_warchivePass
test_native_array_binary_archivePass
test_native_array_text_archivePass
test_native_array_text_warchivePass
test_native_array_xml_archivePass
test_native_array_xml_warchivePass
test_new_operator_binary_archivePass
test_new_operator_text_archivePass
test_new_operator_text_warchivePass
test_new_operator_xml_archivePass
test_new_operator_xml_warchivePass
test_no_rtti_polymorphic_binary_archivePass
test_no_rtti_polymorphic_text_archivePass
test_no_rtti_polymorphic_text_warchivePass
test_no_rtti_polymorphic_xml_archivePass
test_no_rtti_polymorphic_xml_warchivePass
test_non_default_ctor2_binary_archivePass
test_non_default_ctor2_text_archivePass
test_non_default_ctor2_text_warchivePass
test_non_default_ctor2_xml_archivePass
test_non_default_ctor2_xml_warchivePass
test_non_default_ctor_binary_archivePass
test_non_default_ctor_text_archivePass
test_non_default_ctor_text_warchivePass
test_non_default_ctor_xml_archivePass
test_non_default_ctor_xml_warchivePass
test_non_intrusive_binary_archivePass
test_non_intrusive_text_archivePass
test_non_intrusive_text_warchivePass
test_non_intrusive_xml_archivePass
test_non_intrusive_xml_warchivePass
test_not_serializableWarn
test_null_ptr_binary_archivePass
test_null_ptr_text_archivePass
test_null_ptr_text_warchivePass
test_null_ptr_xml_archivePass
test_null_ptr_xml_warchivePass
test_nvp_binary_archivePass
test_nvp_text_archivePass
test_nvp_text_warchivePass
test_nvp_xml_archivePass
test_nvp_xml_warchivePass
test_object_binary_archivePass
test_object_text_archivePass
test_object_text_warchivePass
test_object_xml_archivePass
test_object_xml_warchivePass
test_optional_binary_archivePass
test_optional_text_archivePass
test_optional_text_warchivePass
test_optional_xml_archivePass
test_optional_xml_warchivePass
test_p_helper_polymorphic_binary_archivePass
test_p_helper_polymorphic_text_archivePass
test_p_helper_polymorphic_text_warchivePass
test_p_helper_polymorphic_xml_archivePass
test_p_helper_polymorphic_xml_warchivePass
test_polymorphic2_polymorphic_binary_archivePass
test_polymorphic2_polymorphic_text_archivePass
test_polymorphic2_polymorphic_text_warchivePass
test_polymorphic2_polymorphic_xml_archivePass
test_polymorphic2_polymorphic_xml_warchivePass
test_polymorphic_helper_polymorphic_binary_archivePass
test_polymorphic_helper_polymorphic_text_archivePass
test_polymorphic_helper_polymorphic_text_warchivePass
test_polymorphic_helper_polymorphic_xml_archivePass
test_polymorphic_helper_polymorphic_xml_warchivePass
test_polymorphic_polymorphic_binary_archivePass
test_polymorphic_polymorphic_text_archivePass
test_polymorphic_polymorphic_text_warchivePass
test_polymorphic_polymorphic_xml_archivePass
test_polymorphic_polymorphic_xml_warchivePass
test_primitive_binary_archivePass
test_primitive_text_archivePass
test_primitive_text_warchivePass
test_primitive_xml_archivePass
test_primitive_xml_warchivePass
test_priority_queue_binary_archivePass
test_priority_queue_text_archivePass
test_priority_queue_text_warchivePass
test_priority_queue_xml_archivePass
test_priority_queue_xml_warchivePass
test_private_ctorPass
test_queue_binary_archivePass
test_queue_text_archivePass
test_queue_text_warchivePass
test_queue_xml_archivePass
test_queue_xml_warchivePass
test_recursion_binary_archivePass
test_recursion_text_archivePass
test_recursion_text_warchivePass
test_recursion_xml_archivePass
test_recursion_xml_warchivePass
test_registered_binary_archivePass
test_registered_text_archivePass
test_registered_text_warchivePass
test_registered_xml_archivePass
test_registered_xml_warchivePass
test_reset_object_addressPass
test_set_binary_archivePass
test_set_boost_unordered_binary_archivePass
test_set_boost_unordered_text_archivePass
test_set_boost_unordered_text_warchivePass
test_set_boost_unordered_xml_archivePass
test_set_boost_unordered_xml_warchivePass
test_set_text_archivePass
test_set_text_warchivePass
test_set_xml_archivePass
test_set_xml_warchivePass
test_shared_ptr_132_binary_archivePass
test_shared_ptr_132_text_archivePass
test_shared_ptr_132_text_warchivePass
test_shared_ptr_132_xml_archivePass
test_shared_ptr_132_xml_warchivePass
test_shared_ptr_binary_archivePass
test_shared_ptr_multi_base_binary_archivePass
test_shared_ptr_multi_base_text_archivePass
test_shared_ptr_multi_base_text_warchivePass
test_shared_ptr_multi_base_xml_archivePass
test_shared_ptr_multi_base_xml_warchivePass
test_shared_ptr_text_archivePass
test_shared_ptr_text_warchivePass
test_shared_ptr_xml_archivePass
test_shared_ptr_xml_warchivePass
test_simple_class_binary_archivePass
test_simple_class_ptr_binary_archivePass
test_simple_class_ptr_text_archivePass
test_simple_class_ptr_text_warchivePass
test_simple_class_ptr_xml_archivePass
test_simple_class_ptr_xml_warchivePass
test_simple_class_text_archivePass
test_simple_class_text_warchivePass
test_simple_class_xml_archivePass
test_simple_class_xml_warchivePass
test_singletonPass
test_singleton_inheritedWarn
test_singleton_plainWarn
test_smart_castWarn
test_split_binary_archivePass
test_split_text_archivePass
test_split_text_warchivePass
test_split_xml_archivePass
test_split_xml_warchivePass
test_stack_binary_archivePass
test_stack_text_archivePass
test_stack_text_warchivePass
test_stack_xml_archivePass
test_stack_xml_warchivePass
test_static_warningPass
test_strong_typedefPass
test_tracking_binary_archivePass
test_tracking_text_archivePass
test_tracking_text_warchivePass
test_tracking_xml_archivePass
test_tracking_xml_warchivePass
test_traits_failWarn
test_traits_passPass
test_unique_ptr_binary_archivePass
test_unique_ptr_text_archivePass
test_unique_ptr_text_warchivePass
test_unique_ptr_xml_archivePass
test_unique_ptr_xml_warchivePass
test_unregistered_binary_archivePass
test_unregistered_text_archivePass
test_unregistered_text_warchivePass
test_unregistered_xml_archivePass
test_unregistered_xml_warchivePass
test_valarray_binary_archivePass
test_valarray_text_archivePass
test_valarray_text_warchivePass
test_valarray_xml_archivePass
test_valarray_xml_warchivePass
test_variant_binary_archivePass
test_variant_text_archivePass
test_variant_text_warchivePass
test_variant_xml_archivePass
test_variant_xml_warchivePass
test_vector_binary_archivePass
test_vector_text_archivePass
test_vector_text_warchivePass
test_vector_xml_archivePass
test_vector_xml_warchivePass
test_void_castWarn
+ + diff --git a/src/boost/libs/serialization/test/links.html b/src/boost/libs/serialization/test/links.html new file mode 100644 index 000000000..2356ba5b7 --- /dev/null +++ b/src/boost/libs/serialization/test/links.html @@ -0,0 +1,748 @@ + + +Boost Library Status Error Log + + + +

Library Status: serialization/test

+Run Date: 21:44:22 UTC, Friday 11 October 2019 +
+
+

bin.v2/libs/serialization/test/test_check.test/clang-darwin-03/debug/threading-multi/visibility-hidden

+

Compiler output:

+In file included from test_check.cpp:18:
+In file included from ../../../boost/archive/text_iarchive.hpp:24:
+In file included from ../../../boost/archive/basic_text_iarchive.hpp:30:
+In file included from ../../../boost/archive/detail/common_iarchive.hpp:23:
+In file included from ../../../boost/archive/detail/interface_iarchive.hpp:22:
+In file included from ../../../boost/archive/detail/iserializer.hpp:90:
+../../../boost/archive/detail/check.hpp:78:5: error: implicit instantiation of undefined template 'boost::STATIC_ASSERTION_FAILURE&lt;false&gt;'
+    BOOST_STATIC_ASSERT(typex::value);
+    ^
+../../../boost/static_assert.hpp:154:13: note: expanded from macro 'BOOST_STATIC_ASSERT'
+            sizeof(::boost::STATIC_ASSERTION_FAILURE&lt; BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) &gt;)&gt;\
+            ^
+../../../boost/archive/detail/oserializer.hpp:314:9: note: in instantiation of function template specialization 'boost::archive::detail::check_object_versioning&lt;check2&gt;' requested here
+        check_object_versioning&lt; T &gt;();
+        ^
+../../../boost/archive/detail/oserializer.hpp:539:12: note: in instantiation of function template specialization 'boost::archive::detail::save_non_pointer_type&lt;boost::archive::text_oarchive&gt;::invoke&lt;check2&gt;' requested here
+    typex::invoke(ar, t);
+           ^
+../../../boost/archive/detail/common_oarchive.hpp:71:18: note: in instantiation of function template specialization 'boost::archive::save&lt;boost::archive::text_oarchive, const check2&gt;' requested here
+        archive::save(* this-&gt;This(), t);
+                 ^
+../../../boost/archive/basic_text_oarchive.hpp:83:39: note: in instantiation of function template specialization 'boost::archive::detail::common_oarchive&lt;boost::archive::text_oarchive&gt;::save_override&lt;const check2&gt;' requested here
+        this-&gt;detail_common_oarchive::save_override(t);
+                                      ^
+../../../boost/archive/detail/interface_oarchive.hpp:70:23: note: in instantiation of function template specialization 'boost::archive::basic_text_oarchive&lt;boost::archive::text_oarchive&gt;::save_override&lt;const check2&gt;' requested here
+        this-&gt;This()-&gt;save_override(t);
+                      ^
+test_check.cpp:85:12: note: in instantiation of function template specialization 'boost::archive::detail::interface_oarchive&lt;boost::archive::text_oarchive&gt;::operator&lt;&lt;&lt;check2&gt;' requested here
+        oa &lt;&lt; c2_out; // error check_object_versioning
+           ^
+../../../boost/static_assert.hpp:79:26: note: template is declared here
+template &lt;bool x&gt; struct STATIC_ASSERTION_FAILURE;
+                         ^
+In file included from test_check.cpp:18:
+In file included from ../../../boost/archive/text_iarchive.hpp:24:
+In file included from ../../../boost/archive/basic_text_iarchive.hpp:30:
+In file included from ../../../boost/archive/detail/common_iarchive.hpp:23:
+In file included from ../../../boost/archive/detail/interface_iarchive.hpp:22:
+In file included from ../../../boost/archive/detail/iserializer.hpp:90:
+../../../boost/archive/detail/check.hpp:162:5: error: implicit instantiation of undefined template 'boost::STATIC_ASSERTION_FAILURE&lt;false&gt;'
+    BOOST_STATIC_ASSERT(typex::value);
+    ^
+../../../boost/static_assert.hpp:154:13: note: expanded from macro 'BOOST_STATIC_ASSERT'
+            sizeof(::boost::STATIC_ASSERTION_FAILURE&lt; BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) &gt;)&gt;\
+            ^
+../../../boost/archive/detail/iserializer.hpp:609:13: note: in instantiation of function template specialization 'boost::archive::detail::check_const_loading&lt;const check1&gt;' requested here
+    detail::check_const_loading&lt; T &gt;();
+            ^
+../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load&lt;boost::archive::text_iarchive, const check1&gt;' requested here
+        archive::load(* this-&gt;This(), t);
+                 ^
+../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const check1&gt;' requested here
+        this-&gt;detail_common_iarchive::load_override(t);
+                                      ^
+../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const check1&gt;' requested here
+        basic_text_iarchive&lt;Archive&gt;::load_override(t);
+                                      ^
+../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl&lt;boost::archive::text_iarchive&gt;::load_override&lt;const check1&gt;' requested here
+        this-&gt;This()-&gt;load_override(t);
+                      ^
+test_check.cpp:91:12: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive&lt;boost::archive::text_iarchive&gt;::operator&gt;&gt;&lt;const check1&gt;' requested here
+        ia &gt;&gt; c1_in; // check_const_loading
+           ^
+../../../boost/static_assert.hpp:79:26: note: template is declared here
+template &lt;bool x&gt; struct STATIC_ASSERTION_FAILURE;
+                         ^
+2 errors generated.
+(failed-as-expected) ../../../bin.v2/libs/serialization/test/test_check.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_check.o
+
+

bin.v2/libs/serialization/test/test_dll_exported_polymorphic_xml_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden

+

Compiler output:

+In file included from test_dll_exported.cpp:51:
+./polymorphic_base.hpp:29:13: warning: polymorphic_base imported [-W#pragma-messages]
+    #pragma message ("polymorphic_base imported")
+            ^
+In file included from test_dll_exported.cpp:56:
+./polymorphic_derived2.hpp:29:13: warning: polymorphic_derived2 imported [-W#pragma-messages]
+    #pragma message ("polymorphic_derived2 imported")
+            ^
+2 warnings generated.
+
+

bin.v2/libs/serialization/test/test_not_serializable.test/clang-darwin-03/debug/threading-multi/visibility-hidden

+

Compiler output:

+In file included from test_not_serializable.cpp:14:
+In file included from ./test_tools.hpp:246:
+In file included from ./text_archive.hpp:8:
+In file included from ../../../boost/archive/text_oarchive.hpp:31:
+In file included from ../../../boost/archive/basic_text_oarchive.hpp:29:
+In file included from ../../../boost/archive/detail/common_oarchive.hpp:22:
+In file included from ../../../boost/archive/detail/interface_oarchive.hpp:23:
+In file included from ../../../boost/archive/detail/oserializer.hpp:40:
+In file included from ../../../boost/serialization/extended_type_info_typeid.hpp:37:
+../../../boost/serialization/access.hpp:116:11: error: no member named 'serialize' in 'A'
+        t.serialize(ar, file_version);
+        ~ ^
+../../../boost/serialization/serialization.hpp:68:13: note: in instantiation of function template specialization 'boost::serialization::access::serialize&lt;boost::archive::text_oarchive, A&gt;' requested here
+    access::serialize(ar, t, static_cast&lt;unsigned int&gt;(file_version));
+            ^
+../../../boost/serialization/serialization.hpp:126:5: note: in instantiation of function template specialization 'boost::serialization::serialize&lt;boost::archive::text_oarchive, A&gt;' requested here
+    serialize(ar, t, v);
+    ^
+../../../boost/archive/detail/oserializer.hpp:153:27: note: in instantiation of function template specialization 'boost::serialization::serialize_adl&lt;boost::archive::text_oarchive, A&gt;' requested here
+    boost::serialization::serialize_adl(
+                          ^
+../../../boost/serialization/singleton.hpp:147:5: note: in instantiation of member function 'boost::archive::detail::oserializer&lt;boost::archive::text_oarchive, A&gt;::save_object_data' requested here
+    singleton_wrapper(){
+    ^
+../../../boost/serialization/singleton.hpp:171:47: note: in instantiation of member function 'boost::serialization::detail::singleton_wrapper&lt;boost::archive::detail::oserializer&lt;boost::archive::text_oarchive, A&gt; &gt;::singleton_wrapper' requested here
+        static detail::singleton_wrapper&lt; T &gt; t;
+                                              ^
+../../../boost/serialization/singleton.hpp:196:16: note: (skipping 15 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
+        return get_instance();
+               ^
+../../../boost/archive/detail/oserializer.hpp:539:12: note: in instantiation of function template specialization 'boost::archive::detail::save_non_pointer_type&lt;boost::archive::text_oarchive&gt;::invoke&lt;boost::serialization::nvp&lt;A&gt; &gt;' requested here
+    typex::invoke(ar, t);
+           ^
+../../../boost/archive/detail/common_oarchive.hpp:71:18: note: in instantiation of function template specialization 'boost::archive::save&lt;boost::archive::text_oarchive, const boost::serialization::nvp&lt;A&gt; &gt;' requested here
+        archive::save(* this-&gt;This(), t);
+                 ^
+../../../boost/archive/basic_text_oarchive.hpp:83:39: note: in instantiation of function template specialization 'boost::archive::detail::common_oarchive&lt;boost::archive::text_oarchive&gt;::save_override&lt;const boost::serialization::nvp&lt;A&gt; &gt;' requested here
+        this-&gt;detail_common_oarchive::save_override(t);
+                                      ^
+../../../boost/archive/detail/interface_oarchive.hpp:70:23: note: in instantiation of function template specialization 'boost::archive::basic_text_oarchive&lt;boost::archive::text_oarchive&gt;::save_override&lt;const boost::serialization::nvp&lt;A&gt; &gt;' requested here
+        this-&gt;This()-&gt;save_override(t);
+                      ^
+test_not_serializable.cpp:28:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_oarchive&lt;boost::archive::text_oarchive&gt;::operator&lt;&lt;&lt;boost::serialization::nvp&lt;A&gt; &gt;' requested here
+    oa &lt;&lt; BOOST_SERIALIZATION_NVP(a);
+       ^
+In file included from test_not_serializable.cpp:14:
+In file included from ./test_tools.hpp:246:
+In file included from ./text_archive.hpp:8:
+In file included from ../../../boost/archive/text_oarchive.hpp:31:
+In file included from ../../../boost/archive/basic_text_oarchive.hpp:29:
+In file included from ../../../boost/archive/detail/common_oarchive.hpp:22:
+In file included from ../../../boost/archive/detail/interface_oarchive.hpp:23:
+In file included from ../../../boost/archive/detail/oserializer.hpp:70:
+../../../boost/archive/detail/check.hpp:60:5: error: implicit instantiation of undefined template 'boost::STATIC_ASSERTION_FAILURE&lt;false&gt;'
+    BOOST_STATIC_ASSERT(typex::value);
+    ^
+../../../boost/static_assert.hpp:154:13: note: expanded from macro 'BOOST_STATIC_ASSERT'
+            sizeof(::boost::STATIC_ASSERTION_FAILURE&lt; BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) &gt;)&gt;\
+            ^
+../../../boost/archive/detail/iserializer.hpp:460:9: note: in instantiation of function template specialization 'boost::archive::detail::check_object_level&lt;A&gt;' requested here
+        check_object_level&lt; T &gt;();
+        ^
+../../../boost/archive/detail/iserializer.hpp:624:12: note: in instantiation of function template specialization 'boost::archive::detail::load_non_pointer_type&lt;boost::archive::text_iarchive&gt;::invoke&lt;A&gt;' requested here
+    typex::invoke(ar, t);
+           ^
+../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load&lt;boost::archive::text_iarchive, A&gt;' requested here
+        archive::load(* this-&gt;This(), t);
+                 ^
+../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;A&gt;' requested here
+        this-&gt;detail_common_iarchive::load_override(t);
+                                      ^
+../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;A&gt;' requested here
+        basic_text_iarchive&lt;Archive&gt;::load_override(t);
+                                      ^
+../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: (skipping 9 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
+        this-&gt;This()-&gt;load_override(t);
+                      ^
+../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load&lt;boost::archive::text_iarchive, const boost::serialization::nvp&lt;A&gt; &gt;' requested here
+        archive::load(* this-&gt;This(), t);
+                 ^
+../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const boost::serialization::nvp&lt;A&gt; &gt;' requested here
+        this-&gt;detail_common_iarchive::load_override(t);
+                                      ^
+../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const boost::serialization::nvp&lt;A&gt; &gt;' requested here
+        basic_text_iarchive&lt;Archive&gt;::load_override(t);
+                                      ^
+../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl&lt;boost::archive::text_iarchive&gt;::load_override&lt;const boost::serialization::nvp&lt;A&gt; &gt;' requested here
+        this-&gt;This()-&gt;load_override(t);
+                      ^
+test_not_serializable.cpp:35:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive&lt;boost::archive::text_iarchive&gt;::operator&gt;&gt;&lt;const boost::serialization::nvp&lt;A&gt; &gt;' requested here
+    ia &gt;&gt; BOOST_SERIALIZATION_NVP(a);
+       ^
+../../../boost/static_assert.hpp:79:26: note: template is declared here
+template &lt;bool x&gt; struct STATIC_ASSERTION_FAILURE;
+                         ^
+In file included from test_not_serializable.cpp:14:
+In file included from ./test_tools.hpp:246:
+In file included from ./text_archive.hpp:8:
+In file included from ../../../boost/archive/text_oarchive.hpp:31:
+In file included from ../../../boost/archive/basic_text_oarchive.hpp:29:
+In file included from ../../../boost/archive/detail/common_oarchive.hpp:22:
+In file included from ../../../boost/archive/detail/interface_oarchive.hpp:23:
+In file included from ../../../boost/archive/detail/oserializer.hpp:40:
+In file included from ../../../boost/serialization/extended_type_info_typeid.hpp:37:
+../../../boost/serialization/access.hpp:116:11: error: no member named 'serialize' in 'A'
+        t.serialize(ar, file_version);
+        ~ ^
+../../../boost/serialization/serialization.hpp:68:13: note: in instantiation of function template specialization 'boost::serialization::access::serialize&lt;boost::archive::text_iarchive, A&gt;' requested here
+    access::serialize(ar, t, static_cast&lt;unsigned int&gt;(file_version));
+            ^
+../../../boost/serialization/serialization.hpp:126:5: note: in instantiation of function template specialization 'boost::serialization::serialize&lt;boost::archive::text_iarchive, A&gt;' requested here
+    serialize(ar, t, v);
+    ^
+../../../boost/archive/detail/iserializer.hpp:187:27: note: in instantiation of function template specialization 'boost::serialization::serialize_adl&lt;boost::archive::text_iarchive, A&gt;' requested here
+    boost::serialization::serialize_adl(
+                          ^
+../../../boost/serialization/singleton.hpp:147:5: note: in instantiation of member function 'boost::archive::detail::iserializer&lt;boost...
+   (remainder deleted because of excessive size)
+
+

bin.v2/libs/serialization/test/test_const_load_fail2.test/clang-darwin-03/debug/threading-multi/visibility-hidden

+

Compiler output:

+In file included from test_const_load_fail2.cpp:11:
+In file included from ../../../boost/archive/text_iarchive.hpp:24:
+In file included from ../../../boost/archive/basic_text_iarchive.hpp:30:
+In file included from ../../../boost/archive/detail/common_iarchive.hpp:23:
+In file included from ../../../boost/archive/detail/interface_iarchive.hpp:22:
+In file included from ../../../boost/archive/detail/iserializer.hpp:90:
+../../../boost/archive/detail/check.hpp:162:5: error: implicit instantiation of undefined template 'boost::STATIC_ASSERTION_FAILURE&lt;false&gt;'
+    BOOST_STATIC_ASSERT(typex::value);
+    ^
+../../../boost/static_assert.hpp:154:13: note: expanded from macro 'BOOST_STATIC_ASSERT'
+            sizeof(::boost::STATIC_ASSERTION_FAILURE&lt; BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) &gt;)&gt;\
+            ^
+../../../boost/archive/detail/iserializer.hpp:609:13: note: in instantiation of function template specialization 'boost::archive::detail::check_const_loading&lt;A *const&gt;' requested here
+    detail::check_const_loading&lt; T &gt;();
+            ^
+../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load&lt;boost::archive::text_iarchive, A *const&gt;' requested here
+        archive::load(* this-&gt;This(), t);
+                 ^
+../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;A *const&gt;' requested here
+        this-&gt;detail_common_iarchive::load_override(t);
+                                      ^
+../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;A *const&gt;' requested here
+        basic_text_iarchive&lt;Archive&gt;::load_override(t);
+                                      ^
+../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl&lt;boost::archive::text_iarchive&gt;::load_override&lt;A *const&gt;' requested here
+        this-&gt;This()-&gt;load_override(t);
+                      ^
+test_const_load_fail2.cpp:22:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive&lt;boost::archive::text_iarchive&gt;::operator&gt;&gt;&lt;A *const&gt;' requested here
+    ia &gt;&gt; a;
+       ^
+../../../boost/static_assert.hpp:79:26: note: template is declared here
+template &lt;bool x&gt; struct STATIC_ASSERTION_FAILURE;
+                         ^
+In file included from test_const_load_fail2.cpp:11:
+In file included from ../../../boost/archive/text_iarchive.hpp:24:
+In file included from ../../../boost/archive/basic_text_iarchive.hpp:30:
+In file included from ../../../boost/archive/detail/common_iarchive.hpp:23:
+In file included from ../../../boost/archive/detail/interface_iarchive.hpp:22:
+../../../boost/archive/detail/iserializer.hpp:552:15: error: cannot assign to variable 't' with const-qualified type 'A *const &amp;'
+            t = pointer_tweak(newbpis_ptr-&gt;get_eti(), t, *t);
+            ~ ^
+../../../boost/archive/detail/iserializer.hpp:624:12: note: in instantiation of function template specialization 'boost::archive::detail::load_pointer_type&lt;boost::archive::text_iarchive&gt;::invoke&lt;A *const&gt;' requested here
+    typex::invoke(ar, t);
+           ^
+../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load&lt;boost::archive::text_iarchive, A *const&gt;' requested here
+        archive::load(* this-&gt;This(), t);
+                 ^
+../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;A *const&gt;' requested here
+        this-&gt;detail_common_iarchive::load_override(t);
+                                      ^
+../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;A *const&gt;' requested here
+        basic_text_iarchive&lt;Archive&gt;::load_override(t);
+                                      ^
+../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl&lt;boost::archive::text_iarchive&gt;::load_override&lt;A *const&gt;' requested here
+        this-&gt;This()-&gt;load_override(t);
+                      ^
+test_const_load_fail2.cpp:22:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive&lt;boost::archive::text_iarchive&gt;::operator&gt;&gt;&lt;A *const&gt;' requested here
+    ia &gt;&gt; a;
+       ^
+../../../boost/archive/detail/iserializer.hpp:538:45: note: variable 't' declared const here
+    static void invoke(Archive &amp; ar, Tptr &amp; t){
+                                     ~~~~~~~^
+2 errors generated.
+(failed-as-expected) ../../../bin.v2/libs/serialization/test/test_const_load_fail2.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_load_fail2.o
+
+

bin.v2/libs/serialization/test/test_const_load_fail1_nvp.test/clang-darwin-03/debug/threading-multi/visibility-hidden

+

Compiler output:

+In file included from test_const_load_fail1_nvp.cpp:11:
+In file included from ../../../boost/archive/text_iarchive.hpp:24:
+In file included from ../../../boost/archive/basic_text_iarchive.hpp:30:
+In file included from ../../../boost/archive/detail/common_iarchive.hpp:23:
+In file included from ../../../boost/archive/detail/interface_iarchive.hpp:22:
+In file included from ../../../boost/archive/detail/iserializer.hpp:90:
+../../../boost/archive/detail/check.hpp:162:5: error: implicit instantiation of undefined template 'boost::STATIC_ASSERTION_FAILURE&lt;false&gt;'
+    BOOST_STATIC_ASSERT(typex::value);
+    ^
+../../../boost/static_assert.hpp:154:13: note: expanded from macro 'BOOST_STATIC_ASSERT'
+            sizeof(::boost::STATIC_ASSERTION_FAILURE&lt; BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) &gt;)&gt;\
+            ^
+../../../boost/archive/detail/iserializer.hpp:609:13: note: in instantiation of function template specialization 'boost::archive::detail::check_const_loading&lt;const A&gt;' requested here
+    detail::check_const_loading&lt; T &gt;();
+            ^
+../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load&lt;boost::archive::text_iarchive, const A&gt;' requested here
+        archive::load(* this-&gt;This(), t);
+                 ^
+../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const A&gt;' requested here
+        this-&gt;detail_common_iarchive::load_override(t);
+                                      ^
+../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const A&gt;' requested here
+        basic_text_iarchive&lt;Archive&gt;::load_override(t);
+                                      ^
+../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl&lt;boost::archive::text_iarchive&gt;::load_override&lt;const A&gt;' requested here
+        this-&gt;This()-&gt;load_override(t);
+                      ^
+../../../boost/serialization/nvp.hpp:56:8: note: (skipping 8 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
+    ar &gt;&gt; t.value();
+       ^
+../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load&lt;boost::archive::text_iarchive, const boost::serialization::nvp&lt;const A&gt; &gt;' requested here
+        archive::load(* this-&gt;This(), t);
+                 ^
+../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const boost::serialization::nvp&lt;const A&gt; &gt;' requested here
+        this-&gt;detail_common_iarchive::load_override(t);
+                                      ^
+../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const boost::serialization::nvp&lt;const A&gt; &gt;' requested here
+        basic_text_iarchive&lt;Archive&gt;::load_override(t);
+                                      ^
+../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl&lt;boost::archive::text_iarchive&gt;::load_override&lt;const boost::serialization::nvp&lt;const A&gt; &gt;' requested here
+        this-&gt;This()-&gt;load_override(t);
+                      ^
+test_const_load_fail1_nvp.cpp:23:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive&lt;boost::archive::text_iarchive&gt;::operator&gt;&gt;&lt;const boost::serialization::nvp&lt;const A&gt; &gt;' requested here
+    ia &gt;&gt; BOOST_SERIALIZATION_NVP(a);
+       ^
+../../../boost/static_assert.hpp:79:26: note: template is declared here
+template &lt;bool x&gt; struct STATIC_ASSERTION_FAILURE;
+                         ^
+1 error generated.
+(failed-as-expected) ../../../bin.v2/libs/serialization/test/test_const_load_fail1_nvp.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_load_fail1_nvp.o
+
+

bin.v2/libs/serialization/test/test_const_load_fail3.test/clang-darwin-03/debug/threading-multi/visibility-hidden

+

Compiler output:

+In file included from test_const_load_fail3.cpp:11:
+In file included from ../../../boost/archive/text_iarchive.hpp:24:
+In file included from ../../../boost/archive/basic_text_iarchive.hpp:30:
+In file included from ../../../boost/archive/detail/common_iarchive.hpp:23:
+In file included from ../../../boost/archive/detail/interface_iarchive.hpp:22:
+In file included from ../../../boost/archive/detail/iserializer.hpp:90:
+../../../boost/archive/detail/check.hpp:162:5: error: implicit instantiation of undefined template 'boost::STATIC_ASSERTION_FAILURE&lt;false&gt;'
+    BOOST_STATIC_ASSERT(typex::value);
+    ^
+../../../boost/static_assert.hpp:154:13: note: expanded from macro 'BOOST_STATIC_ASSERT'
+            sizeof(::boost::STATIC_ASSERTION_FAILURE&lt; BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) &gt;)&gt;\
+            ^
+../../../boost/archive/detail/iserializer.hpp:609:13: note: in instantiation of function template specialization 'boost::archive::detail::check_const_loading&lt;const A *const&gt;' requested here
+    detail::check_const_loading&lt; T &gt;();
+            ^
+../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load&lt;boost::archive::text_iarchive, const A *const&gt;' requested here
+        archive::load(* this-&gt;This(), t);
+                 ^
+../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const A *const&gt;' requested here
+        this-&gt;detail_common_iarchive::load_override(t);
+                                      ^
+../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const A *const&gt;' requested here
+        basic_text_iarchive&lt;Archive&gt;::load_override(t);
+                                      ^
+../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl&lt;boost::archive::text_iarchive&gt;::load_override&lt;const A *const&gt;' requested here
+        this-&gt;This()-&gt;load_override(t);
+                      ^
+test_const_load_fail3.cpp:21:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive&lt;boost::archive::text_iarchive&gt;::operator&gt;&gt;&lt;const A *const&gt;' requested here
+    ia &gt;&gt; a;
+       ^
+../../../boost/static_assert.hpp:79:26: note: template is declared here
+template &lt;bool x&gt; struct STATIC_ASSERTION_FAILURE;
+                         ^
+In file included from test_const_load_fail3.cpp:11:
+In file included from ../../../boost/archive/text_iarchive.hpp:24:
+In file included from ../../../boost/archive/basic_text_iarchive.hpp:30:
+In file included from ../../../boost/archive/detail/common_iarchive.hpp:23:
+In file included from ../../../boost/archive/detail/interface_iarchive.hpp:22:
+../../../boost/archive/detail/iserializer.hpp:552:15: error: cannot assign to variable 't' with const-qualified type 'const A *const &amp;'
+            t = pointer_tweak(newbpis_ptr-&gt;get_eti(), t, *t);
+            ~ ^
+../../../boost/archive/detail/iserializer.hpp:624:12: note: in instantiation of function template specialization 'boost::archive::detail::load_pointer_type&lt;boost::archive::text_iarchive&gt;::invoke&lt;const A *const&gt;' requested here
+    typex::invoke(ar, t);
+           ^
+../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load&lt;boost::archive::text_iarchive, const A *const&gt;' requested here
+        archive::load(* this-&gt;This(), t);
+                 ^
+../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const A *const&gt;' requested here
+        this-&gt;detail_common_iarchive::load_override(t);
+                                      ^
+../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const A *const&gt;' requested here
+        basic_text_iarchive&lt;Archive&gt;::load_override(t);
+                                      ^
+../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl&lt;boost::archive::text_iarchive&gt;::load_override&lt;const A *const&gt;' requested here
+        this-&gt;This()-&gt;load_override(t);
+                      ^
+test_const_load_fail3.cpp:21:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive&lt;boost::archive::text_iarchive&gt;::operator&gt;&gt;&lt;const A *const&gt;' requested here
+    ia &gt;&gt; a;
+       ^
+../../../boost/archive/detail/iserializer.hpp:538:45: note: variable 't' declared const here
+    static void invoke(Archive &amp; ar, Tptr &amp; t){
+                                     ~~~~~~~^
+2 errors generated.
+(failed-as-expected) ../../../bin.v2/libs/serialization/test/test_const_load_fail3.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_load_fail3.o
+
+

bin.v2/libs/serialization/test/test_dll_exported_polymorphic_text_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden

+

Compiler output:

+In file included from test_dll_exported.cpp:51:
+./polymorphic_base.hpp:29:13: warning: polymorphic_base imported [-W#pragma-messages]
+    #pragma message ("polymorphic_base imported")
+            ^
+In file included from test_dll_exported.cpp:56:
+./polymorphic_derived2.hpp:29:13: warning: polymorphic_derived2 imported [-W#pragma-messages]
+    #pragma message ("polymorphic_derived2 imported")
+            ^
+2 warnings generated.
+
+

bin.v2/libs/serialization/test/test_singleton_plain.test/clang-darwin-03/debug/threading-multi/visibility-hidden

+

Compiler output:

+test_singleton_plain.cpp:25:32: warning: unknown warning group '-Wterminate', ignored [-Wunknown-warning-option]
+#pragma GCC diagnostic ignored "-Wterminate"
+                               ^
+1 warning generated.
+
+

bin.v2/libs/serialization/test/test_singleton_inherited.test/clang-darwin-03/debug/threading-multi/visibility-hidden

+

Compiler output:

+test_singleton_inherited.cpp:26:32: warning: unknown warning group '-Wterminate', ignored [-Wunknown-warning-option]
+#pragma GCC diagnostic ignored "-Wterminate"
+                               ^
+1 warning generated.
+
+

bin.v2/libs/serialization/test/test_dll_simple.test/clang-darwin-03/debug/threading-multi/visibility-hidden

+

Compiler output:

+In file included from test_dll_simple.cpp:33:
+./A.hpp:37:13: warning: A imported [-W#pragma-messages]
+    #pragma message("A imported")
+            ^
+1 warning generated.
+
+

bin.v2/libs/serialization/test/test_dll_exported_polymorphic_binary_archive.test/clang-darwin-03/debug/threading-multi/visibility-hidden

+

Compiler output:

+In file included from test_dll_exported.cpp:51:
+./polymorphic_base.hpp:29:13: warning: polymorphic_base imported [-W#pragma-messages]
+    #pragma message ("polymorphic_base imported")
+            ^
+In file included from test_dll_exported.cpp:56:
+./polymorphic_derived2.hpp:29:13: warning: polymorphic_derived2 imported [-W#pragma-messages]
+    #pragma message ("polymorphic_derived2 imported")
+            ^
+2 warnings generated.
+
+

bin.v2/libs/serialization/test/test_traits_fail.test/clang-darwin-03/debug/threading-multi/visibility-hidden

+

Compiler output:

+test_traits_fail.cpp:24:1: error: implicit instantiation of undefined template 'boost::STATIC_ASSERTION_FAILURE&lt;false&gt;'
+BOOST_CLASS_TRACKING(A, boost::serialization::track_never) 
+^
+../../../boost/serialization/tracking.hpp:108:5: note: expanded from macro 'BOOST_CLASS_TRACKING'
+    BOOST_STATIC_ASSERT((                    \
+    ^
+../../../boost/static_assert.hpp:154:13: note: expanded from macro 'BOOST_STATIC_ASSERT'
+            sizeof(::boost::STATIC_ASSERTION_FAILURE&lt; BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) &gt;)&gt;\
+            ^
+../../../boost/static_assert.hpp:79:26: note: template is declared here
+template &lt;bool x&gt; struct STATIC_ASSERTION_FAILURE;
+                         ^
+1 error generated.
+(failed-as-expected) ../../../bin.v2/libs/serialization/test/test_traits_fail.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_traits_fail.o
+
+

bin.v2/libs/serialization/test/test_const_load_fail1.test/clang-darwin-03/debug/threading-multi/visibility-hidden

+

Compiler output:

+In file included from test_const_load_fail1.cpp:11:
+In file included from ../../../boost/archive/text_iarchive.hpp:24:
+In file included from ../../../boost/archive/basic_text_iarchive.hpp:30:
+In file included from ../../../boost/archive/detail/common_iarchive.hpp:23:
+In file included from ../../../boost/archive/detail/interface_iarchive.hpp:22:
+In file included from ../../../boost/archive/detail/iserializer.hpp:90:
+../../../boost/archive/detail/check.hpp:162:5: error: implicit instantiation of undefined template 'boost::STATIC_ASSERTION_FAILURE&lt;false&gt;'
+    BOOST_STATIC_ASSERT(typex::value);
+    ^
+../../../boost/static_assert.hpp:154:13: note: expanded from macro 'BOOST_STATIC_ASSERT'
+            sizeof(::boost::STATIC_ASSERTION_FAILURE&lt; BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) &gt;)&gt;\
+            ^
+../../../boost/archive/detail/iserializer.hpp:609:13: note: in instantiation of function template specialization 'boost::archive::detail::check_const_loading&lt;const A&gt;' requested here
+    detail::check_const_loading&lt; T &gt;();
+            ^
+../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load&lt;boost::archive::text_iarchive, const A&gt;' requested here
+        archive::load(* this-&gt;This(), t);
+                 ^
+../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const A&gt;' requested here
+        this-&gt;detail_common_iarchive::load_override(t);
+                                      ^
+../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const A&gt;' requested here
+        basic_text_iarchive&lt;Archive&gt;::load_override(t);
+                                      ^
+../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl&lt;boost::archive::text_iarchive&gt;::load_override&lt;const A&gt;' requested here
+        this-&gt;This()-&gt;load_override(t);
+                      ^
+test_const_load_fail1.cpp:22:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive&lt;boost::archive::text_iarchive&gt;::operator&gt;&gt;&lt;const A&gt;' requested here
+    ia &gt;&gt; a;
+       ^
+../../../boost/static_assert.hpp:79:26: note: template is declared here
+template &lt;bool x&gt; struct STATIC_ASSERTION_FAILURE;
+                         ^
+1 error generated.
+(failed-as-expected) ../../../bin.v2/libs/serialization/test/test_const_load_fail1.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_load_fail1.o
+
+

bin.v2/libs/serialization/test/test_smart_cast.test/clang-darwin-03/debug/threading-multi/visibility-hidden

+

Compiler output:

+test_smart_cast.cpp:20:10: warning: private field 'a' is not used [-Wunused-private-field]
+    char a;
+         ^
+test_smart_cast.cpp:25:9: warning: private field 'b' is not used [-Wunused-private-field]
+    int b;
+        ^
+test_smart_cast.cpp:35:10: warning: private field 'c' is not used [-Wunused-private-field]
+    long c;
+         ^
+test_smart_cast.cpp:122:10: warning: private field 'a' is not used [-Wunused-private-field]
+    char a;
+         ^
+test_smart_cast.cpp:129:9: warning: private field 'b' is not used [-Wunused-private-field]
+    int b;
+        ^
+test_smart_cast.cpp:141:10: warning: private field 'c' is not used [-Wunused-private-field]
+    long c;
+         ^
+6 warnings generated.
+
+

bin.v2/libs/serialization/test/test_const_load_fail2_nvp.test/clang-darwin-03/debug/threading-multi/visibility-hidden

+

Compiler output:

+In file included from test_const_load_fail2_nvp.cpp:11:
+In file included from ../../../boost/archive/text_iarchive.hpp:24:
+In file included from ../../../boost/archive/basic_text_iarchive.hpp:30:
+In file included from ../../../boost/archive/detail/common_iarchive.hpp:23:
+In file included from ../../../boost/archive/detail/interface_iarchive.hpp:22:
+In file included from ../../../boost/archive/detail/iserializer.hpp:90:
+../../../boost/archive/detail/check.hpp:162:5: error: implicit instantiation of undefined template 'boost::STATIC_ASSERTION_FAILURE&lt;false&gt;'
+    BOOST_STATIC_ASSERT(typex::value);
+    ^
+../../../boost/static_assert.hpp:154:13: note: expanded from macro 'BOOST_STATIC_ASSERT'
+            sizeof(::boost::STATIC_ASSERTION_FAILURE&lt; BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) &gt;)&gt;\
+            ^
+../../../boost/archive/detail/iserializer.hpp:609:13: note: in instantiation of function template specialization 'boost::archive::detail::check_const_loading&lt;A *const&gt;' requested here
+    detail::check_const_loading&lt; T &gt;();
+            ^
+../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load&lt;boost::archive::text_iarchive, A *const&gt;' requested here
+        archive::load(* this-&gt;This(), t);
+                 ^
+../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;A *const&gt;' requested here
+        this-&gt;detail_common_iarchive::load_override(t);
+                                      ^
+../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;A *const&gt;' requested here
+        basic_text_iarchive&lt;Archive&gt;::load_override(t);
+                                      ^
+../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl&lt;boost::archive::text_iarchive&gt;::load_override&lt;A *const&gt;' requested here
+        this-&gt;This()-&gt;load_override(t);
+                      ^
+../../../boost/serialization/nvp.hpp:56:8: note: (skipping 8 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
+    ar &gt;&gt; t.value();
+       ^
+../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load&lt;boost::archive::text_iarchive, const boost::serialization::nvp&lt;A *const&gt; &gt;' requested here
+        archive::load(* this-&gt;This(), t);
+                 ^
+../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const boost::serialization::nvp&lt;A *const&gt; &gt;' requested here
+        this-&gt;detail_common_iarchive::load_override(t);
+                                      ^
+../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const boost::serialization::nvp&lt;A *const&gt; &gt;' requested here
+        basic_text_iarchive&lt;Archive&gt;::load_override(t);
+                                      ^
+../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl&lt;boost::archive::text_iarchive&gt;::load_override&lt;const boost::serialization::nvp&lt;A *const&gt; &gt;' requested here
+        this-&gt;This()-&gt;load_override(t);
+                      ^
+test_const_load_fail2_nvp.cpp:23:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive&lt;boost::archive::text_iarchive&gt;::operator&gt;&gt;&lt;const boost::serialization::nvp&lt;A *const&gt; &gt;' requested here
+    ia &gt;&gt; BOOST_SERIALIZATION_NVP(a);
+       ^
+../../../boost/static_assert.hpp:79:26: note: template is declared here
+template &lt;bool x&gt; struct STATIC_ASSERTION_FAILURE;
+                         ^
+In file included from test_const_load_fail2_nvp.cpp:11:
+In file included from ../../../boost/archive/text_iarchive.hpp:24:
+In file included from ../../../boost/archive/basic_text_iarchive.hpp:30:
+In file included from ../../../boost/archive/detail/common_iarchive.hpp:23:
+In file included from ../../../boost/archive/detail/interface_iarchive.hpp:22:
+../../../boost/archive/detail/iserializer.hpp:552:15: error: cannot assign to variable 't' with const-qualified type 'A *const &amp;'
+            t = pointer_tweak(newbpis_ptr-&gt;get_eti(), t, *t);
+            ~ ^
+../../../boost/archive/detail/iserializer.hpp:624:12: note: in instantiation of function template specialization 'boost::archive::detail::load_pointer_type&lt;boost::archive::text_iarchive&gt;::invoke&lt;A *const&gt;' requested here
+    typex::invoke(ar, t);
+           ^
+../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load&lt;boost::archive::text_iarchive, A *const&gt;' requested here
+        archive::load(* this-&gt;This(), t);
+                 ^
+../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;A *const&gt;' requested here
+        this-&gt;detail_common_iarchive::load_override(t);
+                                      ^
+../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;A *const&gt;' requested here
+        basic_text_iarchive&lt;Archive&gt;::load_override(t);
+                                      ^
+../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl&lt;boost::archive::text_iarchive&gt;::load_override&lt;A *const&gt;' requested here
+        this-&gt;This()-&gt;load_override(t);
+                      ^
+../../../boost/serialization/nvp.hpp:56:8: note: (skipping 8 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
+    ar &gt;&gt; t.value();
+       ^
+../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load&lt;boost::archive::text_iarchive, const boost::serialization::nvp&lt;A *const&gt; &gt;' requested here
+        archive::load(* this-&gt;This(), t);
+                 ^
+../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const boost::serialization::nvp&lt;A *const&gt; &gt;' requested here
+        this-&gt;detail_common_iarchive::load_override(t);
+                                      ^
+../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const boost::serialization::nvp&lt;A *const&gt; &gt;' requested here
+        basic_text_iarchive&lt;Archive&gt;::load_override(t);
+                                      ^
+../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl&lt;boost::archive::text_iarchive&gt;::load_override&lt;const boost::serialization::nvp&lt;A *const&gt; &gt;' requested here
+        this-&gt;This()-&gt;load_override(t);
+                      ^
+test_const_load_fail2_nvp.cpp:23:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive&lt;boost::archive::text_iarchive&gt;::operator&gt;&gt;&lt;const boost::serialization::nvp&lt;A *const&gt; &gt;' requested here
+    ia &gt;&gt; BOOST_SERIALIZATION_NVP(a);
+       ^
+../../../boost/archive/detail/iserializer.hpp:538:45: note: variable 't' declared const here
+    static void invoke(Archive &amp; ar, Tptr &amp; t){
+                                     ~~~~~~~^
+2 errors generated.
+(failed-as-expected) ../../../bin.v2/libs/serialization/test/test_const_load_fail2_nvp.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_load_fail2_nvp.o
+
+

bin.v2/libs/serialization/test/test_const_load_fail3_nvp.test/clang-darwin-03/debug/threading-multi/visibility-hidden

+

Compiler output:

+In file included from test_const_load_fail3_nvp.cpp:11:
+In file included from ../../../boost/archive/text_iarchive.hpp:24:
+In file included from ../../../boost/archive/basic_text_iarchive.hpp:30:
+In file included from ../../../boost/archive/detail/common_iarchive.hpp:23:
+In file included from ../../../boost/archive/detail/interface_iarchive.hpp:22:
+In file included from ../../../boost/archive/detail/iserializer.hpp:90:
+../../../boost/archive/detail/check.hpp:162:5: error: implicit instantiation of undefined template 'boost::STATIC_ASSERTION_FAILURE&lt;false&gt;'
+    BOOST_STATIC_ASSERT(typex::value);
+    ^
+../../../boost/static_assert.hpp:154:13: note: expanded from macro 'BOOST_STATIC_ASSERT'
+            sizeof(::boost::STATIC_ASSERTION_FAILURE&lt; BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) &gt;)&gt;\
+            ^
+../../../boost/archive/detail/iserializer.hpp:609:13: note: in instantiation of function template specialization 'boost::archive::detail::check_const_loading&lt;const A *const&gt;' requested here
+    detail::check_const_loading&lt; T &gt;();
+            ^
+../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load&lt;boost::archive::text_iarchive, const A *const&gt;' requested here
+        archive::load(* this-&gt;This(), t);
+                 ^
+../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const A *const&gt;' requested here
+        this-&gt;detail_common_iarchive::load_override(t);
+                                      ^
+../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const A *const&gt;' requested here
+        basic_text_iarchive&lt;Archive&gt;::load_override(t);
+                                      ^
+../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl&lt;boost::archive::text_iarchive&gt;::load_override&lt;const A *const&gt;' requested here
+        this-&gt;This()-&gt;load_override(t);
+                      ^
+../../../boost/serialization/nvp.hpp:56:8: note: (skipping 8 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
+    ar &gt;&gt; t.value();
+       ^
+../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load&lt;boost::archive::text_iarchive, const boost::serialization::nvp&lt;const A *const&gt; &gt;' requested here
+        archive::load(* this-&gt;This(), t);
+                 ^
+../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const boost::serialization::nvp&lt;const A *const&gt; &gt;' requested here
+        this-&gt;detail_common_iarchive::load_override(t);
+                                      ^
+../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const boost::serialization::nvp&lt;const A *const&gt; &gt;' requested here
+        basic_text_iarchive&lt;Archive&gt;::load_override(t);
+                                      ^
+../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl&lt;boost::archive::text_iarchive&gt;::load_override&lt;const boost::serialization::nvp&lt;const A *const&gt; &gt;' requested here
+        this-&gt;This()-&gt;load_override(t);
+                      ^
+test_const_load_fail3_nvp.cpp:23:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive&lt;boost::archive::text_iarchive&gt;::operator&gt;&gt;&lt;const boost::serialization::nvp&lt;const A *const&gt; &gt;' requested here
+    ia &gt;&gt; BOOST_SERIALIZATION_NVP(a);
+       ^
+../../../boost/static_assert.hpp:79:26: note: template is declared here
+template &lt;bool x&gt; struct STATIC_ASSERTION_FAILURE;
+                         ^
+In file included from test_const_load_fail3_nvp.cpp:11:
+In file included from ../../../boost/archive/text_iarchive.hpp:24:
+In file included from ../../../boost/archive/basic_text_iarchive.hpp:30:
+In file included from ../../../boost/archive/detail/common_iarchive.hpp:23:
+In file included from ../../../boost/archive/detail/interface_iarchive.hpp:22:
+../../../boost/archive/detail/iserializer.hpp:552:15: error: cannot assign to variable 't' with const-qualified type 'const A *const &amp;'
+            t = pointer_tweak(newbpis_ptr-&gt;get_eti(), t, *t);
+            ~ ^
+../../../boost/archive/detail/iserializer.hpp:624:12: note: in instantiation of function template specialization 'boost::archive::detail::load_pointer_type&lt;boost::archive::text_iarchive&gt;::invoke&lt;const A *const&gt;' requested here
+    typex::invoke(ar, t);
+           ^
+../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load&lt;boost::archive::text_iarchive, const A *const&gt;' requested here
+        archive::load(* this-&gt;This(), t);
+                 ^
+../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const A *const&gt;' requested here
+        this-&gt;detail_common_iarchive::load_override(t);
+                                      ^
+../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const A *const&gt;' requested here
+        basic_text_iarchive&lt;Archive&gt;::load_override(t);
+                                      ^
+../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl&lt;boost::archive::text_iarchive&gt;::load_override&lt;const A *const&gt;' requested here
+        this-&gt;This()-&gt;load_override(t);
+                      ^
+../../../boost/serialization/nvp.hpp:56:8: note: (skipping 8 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
+    ar &gt;&gt; t.value();
+       ^
+../../../boost/archive/detail/common_iarchive.hpp:67:18: note: in instantiation of function template specialization 'boost::archive::load&lt;boost::archive::text_iarchive, const boost::serialization::nvp&lt;const A *const&gt; &gt;' requested here
+        archive::load(* this-&gt;This(), t);
+                 ^
+../../../boost/archive/basic_text_iarchive.hpp:70:39: note: in instantiation of function template specialization 'boost::archive::detail::common_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const boost::serialization::nvp&lt;const A *const&gt; &gt;' requested here
+        this-&gt;detail_common_iarchive::load_override(t);
+                                      ^
+../../../boost/archive/text_iarchive.hpp:82:39: note: in instantiation of function template specialization 'boost::archive::basic_text_iarchive&lt;boost::archive::text_iarchive&gt;::load_override&lt;const boost::serialization::nvp&lt;const A *const&gt; &gt;' requested here
+        basic_text_iarchive&lt;Archive&gt;::load_override(t);
+                                      ^
+../../../boost/archive/detail/interface_iarchive.hpp:68:23: note: in instantiation of function template specialization 'boost::archive::text_iarchive_impl&lt;boost::archive::text_iarchive&gt;::load_override&lt;const boost::serialization::nvp&lt;const A *const&gt; &gt;' requested here
+        this-&gt;This()-&gt;load_override(t);
+                      ^
+test_const_load_fail3_nvp.cpp:23:8: note: in instantiation of function template specialization 'boost::archive::detail::interface_iarchive&lt;boost::archive::text_iarchive&gt;::operator&gt;&gt;&lt;const boost::serialization::nvp&lt;const A *const&gt; &gt;' requested here
+    ia &gt;&gt; BOOST_SERIALIZATION_NVP(a);
+       ^
+../../../boost/archive/detail/iserializer.hpp:538:45: note: variable 't' declared const here
+    static void invoke(Archive &amp; ar, Tptr &amp; t){
+                                     ~~~~~~~^
+2 errors generated.
+(failed-as-expected) ../../../bin.v2/libs/serialization/test/test_const_load_fail3_nvp.test/clang-darwin-03/debug/threading-multi/visibility-hidden/test_const_load_fail3_nvp.o
+
+

bin.v2/libs/serialization/test/test_dll_exported_polymorphic_text_warchive.test/clang-darwin-03/debug/threading-multi/visibility-hidden

+

Compiler output:

+In file included from test_dll_exported.cpp:51:
+./polymorphic_base.hpp:29:13: warning: polymorphic_base imported [-W#pragma-messages]
+    #pragma message ("polymorphic_base imported")
+            ^
+In file included from test_dll_exported.cpp:56:
+./polymorphic_derived2.hpp:29:13: warning: polymorphic_derived2 imported [-W#pragma-messages]
+    #pragma message ("polymorphic_derived2 imported")
+            ^
+2 warnings generated.
+
+

bin.v2/libs/serialization/test/test_void_cast.test/clang-darwin-03/debug/threading-multi/visibility-hidden

+

Compiler output:

+test_void_cast.cpp:18:10: warning: private field 'a' is not used [-Wunused-private-field]
+    char a;
+         ^
+test_void_cast.cpp:23:9: warning: private field 'b' is not used [-Wunused-private-field]
+    int b;
+        ^
+test_void_cast.cpp:28:10: warning: private field 'c' is not used [-Wunused-private-field]
+    long c;
+         ^
+test_void_cast.cpp:33:10: warning: private field 'd' is not used [-Wunused-private-field]
+    char d[32];
+         ^
+4 warnings generated.
+
+ + diff --git a/src/boost/libs/serialization/test/multi_shared1.cpp b/src/boost/libs/serialization/test/multi_shared1.cpp new file mode 100644 index 000000000..ddb6174e6 --- /dev/null +++ b/src/boost/libs/serialization/test/multi_shared1.cpp @@ -0,0 +1,23 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_multi_shared_lib.cpp: test that implementation of extented_type_info +// works when using multiple shared libraries + +// (C) Copyright 2018 Alexander Grund +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#include + +struct X1{ + template + void serialize(Archive &, const unsigned int){} +}; + +BOOST_CLASS_IMPLEMENTATION(X1, boost::serialization::object_class_info) + +BOOST_SYMBOL_EXPORT bool f(){ + boost::archive::text_oarchive(std::cout) & X1(); + return true; +} diff --git a/src/boost/libs/serialization/test/multi_shared2.cpp b/src/boost/libs/serialization/test/multi_shared2.cpp new file mode 100644 index 000000000..12e0a87fb --- /dev/null +++ b/src/boost/libs/serialization/test/multi_shared2.cpp @@ -0,0 +1,22 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// multi_shared2.cpp: library simply using extended_type_info_typeid + +// (C) Copyright 2018 Alexander Grund +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#include + +struct X2{ + template + void serialize(Archive &, const unsigned int){} +}; + +BOOST_CLASS_IMPLEMENTATION(X2, boost::serialization::object_class_info) + +BOOST_SYMBOL_EXPORT bool g(){ + boost::archive::text_oarchive(std::cout) & X2(); + return true; +} diff --git a/src/boost/libs/serialization/test/polymorphic_array_binary_archive.hpp b/src/boost/libs/serialization/test/polymorphic_array_binary_archive.hpp new file mode 100644 index 000000000..fbfae292c --- /dev/null +++ b/src/boost/libs/serialization/test/polymorphic_array_binary_archive.hpp @@ -0,0 +1,13 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +#include +typedef boost::archive::polymorphic_binary_oarchive test_oarchive; +typedef std::ofstream test_ostream; +#include +typedef boost::archive::polymorphic_binary_iarchive test_iarchive; +typedef std::ifstream test_istream; +#define TEST_STREAM_FLAGS std::ios::binary diff --git a/src/boost/libs/serialization/test/polymorphic_base.cpp b/src/boost/libs/serialization/test/polymorphic_base.cpp new file mode 100644 index 000000000..a3e50cda0 --- /dev/null +++ b/src/boost/libs/serialization/test/polymorphic_base.cpp @@ -0,0 +1,38 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_base.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#include "polymorphic_base.hpp" + +template +POLYMORPHIC_BASE_DLL_DECL void polymorphic_base::serialize( + Archive &ar, + const unsigned int /* file_version */ +){} + +POLYMORPHIC_BASE_DLL_DECL +polymorphic_base::polymorphic_base(){} +POLYMORPHIC_BASE_DLL_DECL +polymorphic_base::~polymorphic_base(){} + +#include +#include + +template +POLYMORPHIC_BASE_DLL_DECL void polymorphic_base::serialize( + boost::archive::polymorphic_oarchive &, + const unsigned int /* file_version */ +); +template POLYMORPHIC_BASE_DLL_DECL void polymorphic_base::serialize( + boost::archive::polymorphic_iarchive &, + const unsigned int +); +BOOST_CLASS_EXPORT_IMPLEMENT(polymorphic_base) diff --git a/src/boost/libs/serialization/test/polymorphic_base.hpp b/src/boost/libs/serialization/test/polymorphic_base.hpp new file mode 100644 index 000000000..f2f3a2fd4 --- /dev/null +++ b/src/boost/libs/serialization/test/polymorphic_base.hpp @@ -0,0 +1,66 @@ +#ifndef POLYMORPHIC_BASE_HPP +#define POLYMORPHIC_BASE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_base.hpp simple class test + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#include +#include +#include +#include +#include + +#if defined(POLYMORPHIC_BASE_IMPORT) + #define POLYMORPHIC_BASE_DLL_DECL BOOST_SYMBOL_IMPORT + #pragma message ("polymorphic_base imported") +#elif defined(POLYMORPHIC_BASE_EXPORT) + #define POLYMORPHIC_BASE_DLL_DECL BOOST_SYMBOL_EXPORT + #pragma message ("polymorphic_base exported") +#endif + +#ifndef POLYMORPHIC_BASE_DLL_DECL + #define POLYMORPHIC_BASE_DLL_DECL +#endif + +class BOOST_SYMBOL_VISIBLE polymorphic_base +{ + friend class boost::serialization::access; + template + POLYMORPHIC_BASE_DLL_DECL void serialize( + Archive & /* ar */, + const unsigned int /* file_version */ + ); +public: + // note that since this class uses the "no_rtti" + // extended_type_info implementation, it MUST + // implement this function + virtual const char * get_key() const = 0; + POLYMORPHIC_BASE_DLL_DECL polymorphic_base(); + POLYMORPHIC_BASE_DLL_DECL virtual ~polymorphic_base(); +}; + +BOOST_SERIALIZATION_ASSUME_ABSTRACT(polymorphic_base) + +// the no_rtti system requires this !!! +BOOST_CLASS_EXPORT_KEY(polymorphic_base) + +BOOST_CLASS_TYPE_INFO( + polymorphic_base, + extended_type_info_no_rtti +) + +#endif // POLYMORPHIC_BASE_HPP diff --git a/src/boost/libs/serialization/test/polymorphic_binary_archive.hpp b/src/boost/libs/serialization/test/polymorphic_binary_archive.hpp new file mode 100644 index 000000000..fbfae292c --- /dev/null +++ b/src/boost/libs/serialization/test/polymorphic_binary_archive.hpp @@ -0,0 +1,13 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +#include +typedef boost::archive::polymorphic_binary_oarchive test_oarchive; +typedef std::ofstream test_ostream; +#include +typedef boost::archive::polymorphic_binary_iarchive test_iarchive; +typedef std::ifstream test_istream; +#define TEST_STREAM_FLAGS std::ios::binary diff --git a/src/boost/libs/serialization/test/polymorphic_derived1.cpp b/src/boost/libs/serialization/test/polymorphic_derived1.cpp new file mode 100644 index 000000000..a3565f6c4 --- /dev/null +++ b/src/boost/libs/serialization/test/polymorphic_derived1.cpp @@ -0,0 +1,37 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_derived1.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include + +#include "polymorphic_derived1.hpp" + +const char * polymorphic_derived1::get_key() const { + return + boost::serialization::type_info_implementation< + polymorphic_derived1 + >::type::get_const_instance().get_key(); +} + +#include +#include + +template +void polymorphic_derived1::serialize( + boost::archive::polymorphic_oarchive &, + const unsigned int /* file_version */ +); +template +void polymorphic_derived1::serialize( + boost::archive::polymorphic_iarchive &, + const unsigned int +); + +BOOST_CLASS_EXPORT_IMPLEMENT(polymorphic_derived1) diff --git a/src/boost/libs/serialization/test/polymorphic_derived1.hpp b/src/boost/libs/serialization/test/polymorphic_derived1.hpp new file mode 100644 index 000000000..57a7c808b --- /dev/null +++ b/src/boost/libs/serialization/test/polymorphic_derived1.hpp @@ -0,0 +1,45 @@ +#ifndef POLYMORPHIC_DERIVED1_HPP +#define POLYMORPHIC_DERIVED1_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_derived1.hpp simple class test + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include +#include +#include + +#include "polymorphic_base.hpp" + +class polymorphic_derived1 : public polymorphic_base +{ + friend class boost::serialization::access; + template + void serialize(Archive &ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(polymorphic_base); + } +public: + virtual const char * get_key() const ; +}; + +BOOST_CLASS_EXPORT_KEY(polymorphic_derived1) + +BOOST_CLASS_TYPE_INFO( + polymorphic_derived1, + extended_type_info_no_rtti +) + +#endif // POLYMORPHIC_DERIVED1_HPP diff --git a/src/boost/libs/serialization/test/polymorphic_derived2.cpp b/src/boost/libs/serialization/test/polymorphic_derived2.cpp new file mode 100644 index 000000000..1c710d429 --- /dev/null +++ b/src/boost/libs/serialization/test/polymorphic_derived2.cpp @@ -0,0 +1,52 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_derived2.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#include +#include + +#include "polymorphic_base.hpp" +#include "polymorphic_derived2.hpp" + +template +POLYMORPHIC_DERIVED2_DLL_DECL void polymorphic_derived2::serialize( + Archive &ar, + const unsigned int /* file_version */ +){ + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(polymorphic_base); +} + +const char * polymorphic_derived2::get_key() const { + return "polymorphic_derived2"; +} +POLYMORPHIC_DERIVED2_DLL_DECL +polymorphic_derived2::polymorphic_derived2(){} +POLYMORPHIC_DERIVED2_DLL_DECL +polymorphic_derived2::~polymorphic_derived2(){} + +#include +#include + +template +POLYMORPHIC_DERIVED2_DLL_DECL void polymorphic_derived2::serialize( + boost::archive::polymorphic_oarchive &, + const unsigned int /* file_version */ +); +template +POLYMORPHIC_DERIVED2_DLL_DECL void polymorphic_derived2::serialize( + boost::archive::polymorphic_iarchive &, + const unsigned int +); + +// MWerks users can do this to make their code work +BOOST_SERIALIZATION_MWERKS_BASE_AND_DERIVED(polymorphic_base, polymorphic_derived2) + +// note: export has to be AFTER #includes for all archive classes +BOOST_CLASS_EXPORT_IMPLEMENT(polymorphic_derived2) diff --git a/src/boost/libs/serialization/test/polymorphic_derived2.hpp b/src/boost/libs/serialization/test/polymorphic_derived2.hpp new file mode 100644 index 000000000..0527631fe --- /dev/null +++ b/src/boost/libs/serialization/test/polymorphic_derived2.hpp @@ -0,0 +1,71 @@ +#ifndef BOOST_SERIALIZATION_TEST_POLYMORPHIC_DERIVED2_HPP +#define BOOST_SERIALIZATION_TEST_POLYMORPHIC_DERIVED2_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_derived2.hpp simple class test + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include + +#include +#include +#include +#include +#include + +#if defined(POLYMORPHIC_DERIVED2_IMPORT) + #define POLYMORPHIC_DERIVED2_DLL_DECL BOOST_SYMBOL_IMPORT + #pragma message ("polymorphic_derived2 imported") +#elif defined(POLYMORPHIC_DERIVED2_EXPORT) + #define POLYMORPHIC_DERIVED2_DLL_DECL BOOST_SYMBOL_EXPORT + #pragma message ("polymorphic_derived2 exported") +#endif + +#ifndef POLYMORPHIC_DERIVED2_DLL_DECL + #define POLYMORPHIC_DERIVED2_DLL_DECL +#endif + +#define POLYMORPHIC_BASE_IMPORT +#include "polymorphic_base.hpp" + +class BOOST_SYMBOL_VISIBLE polymorphic_derived2 : + public polymorphic_base +{ + friend class boost::serialization::access; + template + POLYMORPHIC_DERIVED2_DLL_DECL void serialize( + Archive &ar, + const unsigned int /* file_version */ + ); + POLYMORPHIC_DERIVED2_DLL_DECL const char * get_key() const; +public: + POLYMORPHIC_DERIVED2_DLL_DECL polymorphic_derived2(); + POLYMORPHIC_DERIVED2_DLL_DECL ~polymorphic_derived2(); +}; + +// we use this because we want to assign a key to this type +// but we don't want to explicitly instantiate code every time +// we do so!!!. If we don't do this, we end up with the same +// code in BOTH the DLL which implements polymorphic_derived2 +// as well as the main program. +BOOST_CLASS_EXPORT_KEY(polymorphic_derived2) + +// note the mixing of type_info systems is supported. +BOOST_CLASS_TYPE_INFO( + polymorphic_derived2, + boost::serialization::extended_type_info_typeid +) + +#endif // BOOST_SERIALIZATION_TEST_POLYMORPHIC_DERIVED2_HPP + diff --git a/src/boost/libs/serialization/test/polymorphic_text_archive.hpp b/src/boost/libs/serialization/test/polymorphic_text_archive.hpp new file mode 100644 index 000000000..bcda7509b --- /dev/null +++ b/src/boost/libs/serialization/test/polymorphic_text_archive.hpp @@ -0,0 +1,12 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +#include +typedef boost::archive::polymorphic_text_oarchive test_oarchive; +typedef std::ofstream test_ostream; +#include +typedef boost::archive::polymorphic_text_iarchive test_iarchive; +typedef std::ifstream test_istream; diff --git a/src/boost/libs/serialization/test/polymorphic_text_warchive.hpp b/src/boost/libs/serialization/test/polymorphic_text_warchive.hpp new file mode 100644 index 000000000..636ab25ca --- /dev/null +++ b/src/boost/libs/serialization/test/polymorphic_text_warchive.hpp @@ -0,0 +1,17 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +#include +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else +#include +typedef boost::archive::polymorphic_text_woarchive test_oarchive; +typedef std::wofstream test_ostream; +#include +typedef boost::archive::polymorphic_text_wiarchive test_iarchive; +typedef std::wifstream test_istream; +#endif diff --git a/src/boost/libs/serialization/test/polymorphic_xml_archive.hpp b/src/boost/libs/serialization/test/polymorphic_xml_archive.hpp new file mode 100644 index 000000000..fd8adbd31 --- /dev/null +++ b/src/boost/libs/serialization/test/polymorphic_xml_archive.hpp @@ -0,0 +1,12 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +#include +typedef boost::archive::polymorphic_xml_oarchive test_oarchive; +typedef std::ofstream test_ostream; +#include +typedef boost::archive::polymorphic_xml_iarchive test_iarchive; +typedef std::ifstream test_istream; diff --git a/src/boost/libs/serialization/test/polymorphic_xml_warchive.hpp b/src/boost/libs/serialization/test/polymorphic_xml_warchive.hpp new file mode 100644 index 000000000..15b5f704b --- /dev/null +++ b/src/boost/libs/serialization/test/polymorphic_xml_warchive.hpp @@ -0,0 +1,12 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +#include +typedef boost::archive::polymorphic_xml_woarchive test_oarchive; +typedef std::wofstream test_ostream; +#include +typedef boost::archive::polymorphic_xml_wiarchive test_iarchive; +typedef std::wifstream test_istream; diff --git a/src/boost/libs/serialization/test/portable_binary_archive.hpp b/src/boost/libs/serialization/test/portable_binary_archive.hpp new file mode 100644 index 000000000..768b9588e --- /dev/null +++ b/src/boost/libs/serialization/test/portable_binary_archive.hpp @@ -0,0 +1,31 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +// file includes for testing a custom archive. +// as an example this tests the portable binary archive + +#include + +// #include output archive header +#include "../example/portable_binary_oarchive.hpp" +// define output archive class to be used +typedef portable_binary_oarchive test_oarchive; +// and corresponding stream +typedef std::ofstream test_ostream; + +// repeat the above for correspondng input archive +#include "../example/portable_binary_iarchive.hpp" +typedef portable_binary_iarchive test_iarchive; +typedef std::ifstream test_istream; + +// since this archive class isn't compiled into the +// boost serialization library, include this here +// so that things get instantiated +#include "../example/portable_binary_oarchive.cpp" +#include "../example/portable_binary_iarchive.cpp" + +// and stream open flags +#define TEST_STREAM_FLAGS std::ios::binary diff --git a/src/boost/libs/serialization/test/test3.dat b/src/boost/libs/serialization/test/test3.dat new file mode 100644 index 000000000..9aef73950 --- /dev/null +++ b/src/boost/libs/serialization/test/test3.dat @@ -0,0 +1 @@ + 1 96953204 177129195 1 5627 23010 7419

16212

4086 2749 -33 124 28 32225 17543 0.84431422 1.0170664757130923 tjbx cuwjentqpkejp
\ No newline at end of file diff --git a/src/boost/libs/serialization/test/test__helper.cpp b/src/boost/libs/serialization/test/test__helper.cpp new file mode 100644 index 000000000..a4404e89a --- /dev/null +++ b/src/boost/libs/serialization/test/test__helper.cpp @@ -0,0 +1,160 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_polymorphic.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULL +#include // remove +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +// the following is to ensure that when one of the libraries changes +// BJAM rebuilds and relinks the test. +/* +#include "polymorphic_text_archive.hpp" +#include "polymorphic_text_warchive.hpp" +#include "polymorphic_binary_archive.hpp" +#include "polymorphic_xml_archive.hpp" +#include "polymorphic_xml_warchive.hpp" +*/ + +#include +#include + +#include "test_tools.hpp" +#include +#include +#include +#include +// this test uses a special string (my_string) whose contents are shared +// and hence saved in the archive only once. We need a helper in order +// to convert my_string into a serializable type + +class my_string:public std::string +{ + typedef std::string super; + +public: + my_string(){} + my_string(const super & str): super(str){} + my_string & operator=(const super& rhs) { + super::operator=(rhs); + return *this; + } +}; + +struct my_string_helper +{ + typedef std::vector table; + table m_t; +}; + +BOOST_SERIALIZATION_SPLIT_FREE(my_string) + +namespace boost { +namespace serialization { + +template +void save(Archive & ar, const my_string & str, const unsigned int /* version */) +{ + void (* const idx)(Archive &, const my_string &, const unsigned int) = & save; + void * const id = reinterpret_cast(idx); + my_string_helper & msh = ar.template get_helper(id); + + my_string_helper::table t = msh.m_t; + my_string_helper::table::iterator it = std::find(t.begin(), t.end(), str); + if(it == t.end()){ + my_string_helper::table::size_type s = t.size(); + ar << make_nvp("index", s); + t.push_back(str); + ar << make_nvp("string", static_cast(str)); + } + else{ + my_string_helper::table::size_type s = it - t.begin(); + ar << make_nvp("index", s); + } +} + +template +void load(Archive & ar, my_string & str, const unsigned int /* version */) +{ + void (* const idx)(Archive &, my_string &, const unsigned int) = & load; + void * const id = reinterpret_cast(idx); + my_string_helper & msh = ar.template get_helper(id); + + my_string_helper::table t = msh.m_t; + + my_string_helper::table::size_type s; + ar >> make_nvp("index", s); + t.reserve(s); + if(s >= t.size()){ + std::string tmp; + ar >> make_nvp("string", tmp); + str = tmp; + t.push_back(str); + } + else{ + str = t[s]; + } +} + +} // namespace serialization +} // namespace boost +#include +#include + +int test_main(int /* argc */, char * /* argv */ []) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + std::vector v1; + for(int i=0; i<1000; ++i){ + v1.push_back(my_string(boost::lexical_cast(i % 100))); + } + + // test using using polymorphic implementation. + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa_implementation(os, TEST_ARCHIVE_FLAGS); + oa_implementation << boost::serialization::make_nvp("vector", v1); + } + { + std::vector v2; + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia_implementation(is, TEST_ARCHIVE_FLAGS); + ia_implementation >> boost::serialization::make_nvp("vector", v2); + BOOST_CHECK(v1 == v2); + } + std::remove(testfile); + + // test using using polymorphic interface. + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa_implementation(os, TEST_ARCHIVE_FLAGS); + boost::archive::polymorphic_oarchive & oa_interface = oa_implementation; + oa_interface << boost::serialization::make_nvp("vector", v1); + } + { + std::vector v2; + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia_implementation(is, TEST_ARCHIVE_FLAGS); + boost::archive::polymorphic_iarchive & ia_interface = ia_implementation; + ia_interface >> boost::serialization::make_nvp("vector", v2); + BOOST_CHECK(v1 == v2); + } + std::remove(testfile); + std::remove(testfile); + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_array.cpp b/src/boost/libs/serialization/test/test_array.cpp new file mode 100644 index 000000000..b23995fa2 --- /dev/null +++ b/src/boost/libs/serialization/test/test_array.cpp @@ -0,0 +1,92 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_array.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include + +#include +#include +#include +#include // equal +#include // remove +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif +#include "test_tools.hpp" +#include +#include +#include + +#include "A.hpp" +#include "A.ipp" + +template +int test_std_array(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + // test array of objects + const std::array a_array = {{T(),T(),T(),T(),T(),T(),T(),T(),T(),T()}}; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("a_array", a_array); + } + { + std::array a_array1; + test_istream is(testfile, TEST_STREAM_FLAGS); + { + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("a_array", a_array1); + } + BOOST_CHECK(std::equal(a_array.begin(), a_array.end(), a_array1.begin())); + } + { + std::array a_array1; + test_istream is(testfile, TEST_STREAM_FLAGS); + { + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + bool exception_invoked = false; + BOOST_TRY { + ia >> boost::serialization::make_nvp("a_array", a_array1); + } + BOOST_CATCH (boost::archive::archive_exception const& ae){ + BOOST_CHECK( + boost::archive::archive_exception::array_size_too_short + == ae.code + ); + exception_invoked = true; + } + BOOST_CATCH_END + BOOST_CHECK(exception_invoked); + } + is.close(); + } + std::remove(testfile); + return EXIT_SUCCESS; +} + +int test_main( int /* argc */, char* /* argv */[] ){ + int res; + + // std array + res = test_std_array(); + if (res != EXIT_SUCCESS) + return EXIT_FAILURE; + // test an int array for which optimized versions should be available + res = test_std_array(); + if (res != EXIT_SUCCESS) + return EXIT_FAILURE; + + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_binary.cpp b/src/boost/libs/serialization/test/test_binary.cpp new file mode 100644 index 000000000..476f9ebd9 --- /dev/null +++ b/src/boost/libs/serialization/test/test_binary.cpp @@ -0,0 +1,167 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_simple_class.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // for rand(), NULL, size_t + +#include +#include + +#include // remove +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::rand; + using ::remove; +} +#endif + +#include "test_tools.hpp" + +#include +#include + +class A { + friend class boost::serialization::access; + char data[150]; + // note: from an aesthetic perspective, I would much prefer to have this + // defined out of line. Unfortunately, this trips a bug in the VC 6.0 + // compiler. So hold our nose and put it her to permit running of tests. + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + ar & boost::serialization::make_nvp( + "data", + boost::serialization::make_binary_object(data, sizeof(data)) + ); + } + +public: + A(); + bool operator==(const A & rhs) const; +}; + +A::A(){ + int i = sizeof(data); + while(i-- > 0) + data[i] = static_cast(0xff & std::rand()); +} + +bool A::operator==(const A & rhs) const { + int i = sizeof(data); + while(i-- > 0) + if(data[i] != rhs.data[i]) + return false; + return true; +} + +int test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + const A a; + char s1[] = "a"; + char s2[] = "ab"; + char s3[] = "abc"; + char s4[] = "abcd"; + const int i = 12345; + + A a1; + char s1_1[10]; + char s1_2[10]; + char s1_3[10]; + char s1_4[10]; + int i1 = 34790; + + std::memset(s1_1, '\0', sizeof(s1_1)); + std::memset(s1_2, '\0', sizeof(s1_2)); + std::memset(s1_3, '\0', sizeof(s1_3)); + std::memset(s1_4, '\0', sizeof(s1_4)); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp( + "s1", + boost::serialization::make_binary_object( + s1, + sizeof(s1) + ) + ); + oa << boost::serialization::make_nvp( + "s2", + boost::serialization::make_binary_object( + s2, + sizeof(s2) + ) + ); + oa << boost::serialization::make_nvp( + "s3", + boost::serialization::make_binary_object( + s3, + sizeof(s3) + ) + ); + oa << boost::serialization::make_nvp( + "s4", + boost::serialization::make_binary_object( + s4, + sizeof(s4) + ) + ); + oa << BOOST_SERIALIZATION_NVP(a); + // note: add a little bit on the end of the archive to detect + // failure of text mode binary. + oa << BOOST_SERIALIZATION_NVP(i); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp( + "s1", + boost::serialization::make_binary_object( + s1_1, + sizeof(s1) + ) + ); + ia >> boost::serialization::make_nvp( + "s2", + boost::serialization::make_binary_object( + s1_2, + sizeof(s2) + ) + ); + ia >> boost::serialization::make_nvp( + "s3", + boost::serialization::make_binary_object( + s1_3, + sizeof(s3) + ) + ); + ia >> boost::serialization::make_nvp( + "s4", + boost::serialization::make_binary_object( + s1_4, + sizeof(s4) + ) + ); + ia >> BOOST_SERIALIZATION_NVP(a1); + // note: add a little bit on the end of the archive to detect + // failure of text mode binary. + ia >> BOOST_SERIALIZATION_NVP(i1); + } + BOOST_CHECK(0 == std::strcmp(s1, s1_1)); + BOOST_CHECK(0 == std::strcmp(s2, s1_2)); + BOOST_CHECK(0 == std::strcmp(s3, s1_3)); + BOOST_CHECK(0 == std::strcmp(s4, s1_4)); + BOOST_CHECK(a == a1); + BOOST_CHECK(i == i1); + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_bitset.cpp b/src/boost/libs/serialization/test/test_bitset.cpp new file mode 100644 index 000000000..356c2231f --- /dev/null +++ b/src/boost/libs/serialization/test/test_bitset.cpp @@ -0,0 +1,64 @@ +// (C) Copyright 2009 Brian Ravnsgaard and Kenneth Riddile +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version including documentation. + +// Test that serialization of std::bitset works. +// Should pass compilation and execution +// 16.09.2004, updated 04.03.2009 + +#include // NULL +#include // remove +#include + +#include + +#if defined( BOOST_NO_STDC_NAMESPACE ) +namespace std +{ + using ::remove; +} +#endif + +#include "test_tools.hpp" + +#include +#include + +int test_main( int /* argc */, char* /* argv */[] ) +{ + const char* testfile = boost::archive::tmpnam( NULL ); + BOOST_REQUIRE( NULL != testfile ); + + std::bitset<8> bitsetA; + bitsetA.set( 0, false ); + bitsetA.set( 1, true ); + bitsetA.set( 2, false ); + bitsetA.set( 3, true ); + bitsetA.set( 4, false ); + bitsetA.set( 5, false ); + bitsetA.set( 6, true ); + bitsetA.set( 7, true ); + + { + test_ostream os( testfile, TEST_STREAM_FLAGS ); + test_oarchive oa( os ); + oa << boost::serialization::make_nvp( "bitset", bitsetA ); + } + + std::bitset<8> bitsetB; + { + test_istream is( testfile, TEST_STREAM_FLAGS ); + test_iarchive ia( is ); + ia >> boost::serialization::make_nvp( "bitset", bitsetB ); + } + + BOOST_CHECK( bitsetA == bitsetB ); + + std::remove( testfile ); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_boost_array.cpp b/src/boost/libs/serialization/test/test_boost_array.cpp new file mode 100644 index 000000000..39ad6583d --- /dev/null +++ b/src/boost/libs/serialization/test/test_boost_array.cpp @@ -0,0 +1,93 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_array.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include + +#include +#include +#include +#include // equal +#include // remove +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif +#include "test_tools.hpp" +#include +#include +#include + +#include "A.hpp" +#include "A.ipp" + +template +int test_boost_array(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + // test array of objects + const boost::array a_array = {{T(),T(),T(),T(),T(),T(),T(),T(),T(),T()}}; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("a_array", a_array); + } + { + boost::array a_array1; + test_istream is(testfile, TEST_STREAM_FLAGS); + { + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("a_array", a_array1); + } + is.close(); + BOOST_CHECK(std::equal(a_array.begin(), a_array.end(), a_array1.begin())); + } + { + boost::array a_array1; + test_istream is(testfile, TEST_STREAM_FLAGS); + { + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + bool exception_invoked = false; + BOOST_TRY { + ia >> boost::serialization::make_nvp("a_array", a_array1); + } + BOOST_CATCH (boost::archive::archive_exception const& ae){ + BOOST_CHECK( + boost::archive::archive_exception::array_size_too_short + == ae.code + ); + exception_invoked = true; + } + BOOST_CATCH_END + BOOST_CHECK(exception_invoked); + } + is.close(); + } + std::remove(testfile); + return EXIT_SUCCESS; +} + +int test_main( int /* argc */, char* /* argv */[] ){ + int res; + + // boost array + res = test_boost_array(); + if (res != EXIT_SUCCESS) + return EXIT_FAILURE; + // test an int array for which optimized versions should be available + res = test_boost_array(); + if (res != EXIT_SUCCESS) + return EXIT_FAILURE; + + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_check.cpp b/src/boost/libs/serialization/test/test_check.cpp new file mode 100644 index 000000000..5f1957d23 --- /dev/null +++ b/src/boost/libs/serialization/test/test_check.cpp @@ -0,0 +1,145 @@ +// (C) Copyright 2009 Robert Ramey +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version including documentation. + +// note: this is a compile only test. +#include +#include // BOOST_STATIC_CONST + +#include +#include +#include +#include +#include + +#include +#include + +// track_selectivly with class information in the archive +// is unsafe when used with a pointer and should trigger a warning +struct check1 { + template + void serialize(Archive & ar, const unsigned int version); + check1(){} +}; + +BOOST_CLASS_IMPLEMENTATION(check1, boost::serialization::object_serializable) +BOOST_CLASS_TRACKING(check1, boost::serialization::track_selectively) + +// the combination of versioning + no class information +// should trigger a warning +struct check2 { + template + void serialize(Archive & ar, const unsigned int version); + check2(){} +}; + +BOOST_CLASS_IMPLEMENTATION(check2, boost::serialization::object_serializable) +BOOST_CLASS_VERSION(check2, 1) +// use track always to turn off warning tested above +BOOST_CLASS_TRACKING(check2, boost::serialization::track_always) + +// serializing a type marked as "track_never" through a pointer +// is likely an error +struct check3 { + template + void serialize(Archive & ar, const unsigned int version); + check3(){} +}; + +BOOST_CLASS_TRACKING(check3, boost::serialization::track_never) + +template +int f(){ + BOOST_STATIC_WARNING(T::value); + BOOST_STATIC_ASSERT(T::value); + return 0; +} + +///////////////////////////////////////////////////////////////////////// +// compilation of this program should show a total of 10 warning messages +int main(int /* argc */, char * /* argv */[]){ + std::stringstream s; + { + boost::archive::text_oarchive oa(s); + + check1 const c1_out; + oa << c1_out; + + check1 c1_non_const_out; + oa << c1_non_const_out; // warn check_object_tracking + + check1 * const c1_ptr_out = 0; + oa << c1_ptr_out; // warn check_pointer_level + + check2 const * c2_ptr_out; + oa << c2_ptr_out; // error check_object_versioning + + check3 * const c3_ptr_out = 0; + oa << c3_ptr_out; // warning check_pointer_tracking + + check2 const c2_out; + oa << c2_out; // error check_object_versioning + } + { + boost::archive::text_iarchive ia(s); + + check1 const c1_in; + ia >> c1_in; // check_const_loading + + check1 * c1_ptr_in = 0; + ia >> c1_ptr_in; // warn check_pointer_level + + check2 * c2_ptr_in; + ia >> c2_ptr_in; // error check_object_versioning + + check3 * c3_ptr_in = 0; + ia >> c3_ptr_in; // warning check_pointer_tracking + + check2 c2_in; + ia >> c2_in; // error check_object_versioning + } + { + boost::archive::text_oarchive oa(s); + + check1 const c1_out; + oa << BOOST_SERIALIZATION_NVP(c1_out); + + check1 c1_non_const_out; + oa << BOOST_SERIALIZATION_NVP(c1_non_const_out); // warn check_object_tracking + + check1 * const c1_ptr_out = 0; + oa << BOOST_SERIALIZATION_NVP(c1_ptr_out); // warn check_pointer_level + + check2 const * c2_ptr_out; + oa << BOOST_SERIALIZATION_NVP(c2_ptr_out); // error check_object_versioning + + check3 * const c3_ptr_out = 0; + oa << BOOST_SERIALIZATION_NVP(c3_ptr_out); // warning check_pointer_tracking + + check2 const c2_out; + oa << BOOST_SERIALIZATION_NVP(c2_out); // error check_object_versioning + } + { + boost::archive::text_iarchive ia(s); + + check1 const c1_in; + ia >> BOOST_SERIALIZATION_NVP(c1_in); // check_const_loading + + check1 * c1_ptr_in = 0; + ia >> BOOST_SERIALIZATION_NVP(c1_ptr_in); // warn check_pointer_level + + check2 * c2_ptr_in; + ia >> BOOST_SERIALIZATION_NVP(c2_ptr_in); // error check_object_versioning + + check3 * c3_ptr_in = 0; + ia >> BOOST_SERIALIZATION_NVP(c3_ptr_in); // warning check_pointer_tracking + + check2 c2_in; + ia >> BOOST_SERIALIZATION_NVP(c2_in); // error check_object_versioning + } + return 0; +} diff --git a/src/boost/libs/serialization/test/test_class_info_load.cpp b/src/boost/libs/serialization/test/test_class_info_load.cpp new file mode 100644 index 000000000..fd4e92f47 --- /dev/null +++ b/src/boost/libs/serialization/test/test_class_info_load.cpp @@ -0,0 +1,92 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_class_info_load.cpp: test implementation level trait + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// test implementation level "object_class_info" +// should pass compilation and execution + +#include +#include + +#include +#include +#include "test_tools.hpp" + +#include +#include +#include +#include +#include + +class A +{ + friend class boost::serialization::access; + template + void serialize(Archive & /*ar*/, const unsigned int file_version){ + // class that don't save class info always have a version number of 0 + BOOST_CHECK(file_version == 0); + BOOST_STATIC_ASSERT(0 == ::boost::serialization::version::value); + ++count; + } +public: + unsigned int count; + A() : count(0) {} +}; + +BOOST_CLASS_IMPLEMENTATION(A, ::boost::serialization::object_serializable) +BOOST_CLASS_TRACKING(A, ::boost::serialization::track_never) + +// second case : serialize WITH class information +class B +{ + friend class boost::serialization::access; + template + void serialize(Archive & /*ar*/, const unsigned int file_version){ + // verify at execution that the version number corresponds to the saved + // one + BOOST_CHECK(file_version == 2); + ++count; + } +public: + unsigned int count; + B() : count(0) {} +}; + +BOOST_CLASS_IMPLEMENTATION(B, ::boost::serialization::object_class_info) +BOOST_CLASS_TRACKING(B, ::boost::serialization::track_never) +BOOST_CLASS_VERSION(B, 4) + +void in(const char *testfile, A & a, B & b) +{ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> BOOST_SERIALIZATION_NVP(a); + ia >> BOOST_SERIALIZATION_NVP(a); + BOOST_CHECK(a.count == 2); // no tracking => redundant loads + ia >> BOOST_SERIALIZATION_NVP(b); + ia >> BOOST_SERIALIZATION_NVP(b); + // note: archive was saved with tracking so that is what determines + // whether tracking is perform on load - regardless of the latest + // tracking setting. + BOOST_CHECK(b.count == 1); +} + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + A a; + B b; + std::string filename; + filename += boost::archive::tmpdir(); + filename += '/'; + filename += BOOST_PP_STRINGIZE(testfile_); + filename += BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST); + in(filename.c_str(), a, b); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_class_info_save.cpp b/src/boost/libs/serialization/test/test_class_info_save.cpp new file mode 100644 index 000000000..a2590bf8f --- /dev/null +++ b/src/boost/libs/serialization/test/test_class_info_save.cpp @@ -0,0 +1,100 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_class_info_save.cpp: test implementation level trait + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// test implementation level "object_class_info" +// should pass compilation and execution + +#include +#include + +#include +#include +#include +#include "test_tools.hpp" + +#include +#include +#include +#include + +// first case : serialize WITHOUT class information +class A +{ + friend class boost::serialization::access; + template + void serialize(Archive & /*ar*/, const unsigned int file_version){ + // class that don't save class info always have a version number of 0 + BOOST_CHECK(file_version == 0); + BOOST_STATIC_ASSERT(0 == ::boost::serialization::version::value); + ++count; + } +public: + unsigned int count; + A() : count(0) {} +}; + +BOOST_CLASS_IMPLEMENTATION(A, ::boost::serialization::object_serializable) +BOOST_CLASS_TRACKING(A, ::boost::serialization::track_never) + +// second case : serialize WITH class information +// note: GCC compile fails if this is after the class declaration +class B; +BOOST_CLASS_VERSION(B, 2) + +class B +{ + friend class boost::serialization::access; + template + void serialize(Archive & /*ar*/, const unsigned int file_version){ + // verify at execution that correct version number is passed on save + BOOST_CHECK( + static_cast(file_version) + == ::boost::serialization::version::value + ); + ++count; + } +public: + unsigned int count; + B() : count(0) {} +}; + +BOOST_CLASS_IMPLEMENTATION(B, ::boost::serialization::object_class_info) +BOOST_CLASS_TRACKING(B, boost::serialization::track_always) + +#include + +void out(const char *testfile, const A & a, const B & b) +{ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + // write object twice to check tracking + oa << BOOST_SERIALIZATION_NVP(a); + oa << BOOST_SERIALIZATION_NVP(a); + BOOST_CHECK(a.count == 2); // no tracking => redundant saves + std::cout << "a.count=" << a.count << '\n' ; + oa << BOOST_SERIALIZATION_NVP(b); + oa << BOOST_SERIALIZATION_NVP(b); + BOOST_CHECK(b.count == 1); // tracking => no redundant saves + std::cout << "b.count=" << b.count << '\n' ; +} + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + A a; + B b; + std::string filename; + filename += boost::archive::tmpdir(); + filename += '/'; + filename += BOOST_PP_STRINGIZE(testfile_); + filename += BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST); + out(filename.c_str(), a, b); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_codecvt_null.cpp b/src/boost/libs/serialization/test/test_codecvt_null.cpp new file mode 100644 index 000000000..11e434c52 --- /dev/null +++ b/src/boost/libs/serialization/test/test_codecvt_null.cpp @@ -0,0 +1,124 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_codecvt_null.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution. Note: compilation with compilers +// which use wchar_t as 2 byte objects will emit warnings. These should be +// ignored. + +#include // std::copy +#include +#include +#include +#include +#include +#include // remove +#include // NULL, size_t + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" + +#include +#include +#include + +template +struct test_data +{ + static wchar_t wchar_encoding[]; +}; + +template<> +wchar_t test_data<2>::wchar_encoding[] = { + (wchar_t) 0x0001, + (wchar_t) 0x007f, + (wchar_t) 0x0080, + (wchar_t) 0x07ff, + (wchar_t) 0x0800, + (wchar_t) 0x7fff +}; + +template<> +wchar_t test_data<4>::wchar_encoding[] = { + (wchar_t) 0x00000001, + (wchar_t) 0x0000007f, + (wchar_t) 0x00000080, + (wchar_t) 0x000007ff, + (wchar_t) 0x00000800, + (wchar_t) 0x0000ffff, + (wchar_t) 0x00010000, + (wchar_t) 0x0010ffff, + (wchar_t) 0x001fffff, + (wchar_t) 0x00200000, + (wchar_t) 0x03ffffff, + (wchar_t) 0x04000000, + (wchar_t) 0x7fffffff +}; + +#include + +int test_main( int /* argc */, char* /* argv */[] ) { + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + std::locale old_loc; + std::locale null_locale = std::locale( + old_loc, + new boost::archive::codecvt_null + ); + + typedef test_data td; + { + std::wofstream ofs; + ofs.imbue(null_locale); + ofs.open(testfile, std::ios::binary); + std::copy( + td::wchar_encoding, + td::wchar_encoding + sizeof(td::wchar_encoding)/sizeof(wchar_t), + boost::archive::iterators::ostream_iterator(ofs) + ); + } + bool ok = false; + { + std::wifstream ifs; + ifs.imbue(null_locale); + ifs.open(testfile, std::ios::binary); + ok = std::equal( + td::wchar_encoding, + td::wchar_encoding + sizeof(td::wchar_encoding)/sizeof(wchar_t), + boost::archive::iterators::istream_iterator(ifs) + ); + } + + BOOST_CHECK(ok); + { + std::wofstream ofs("testfile2"); + ofs.imbue(null_locale); + int i = 10; + ofs << i; + ofs.close(); + + std::wifstream ifs("testfile2"); + ifs.imbue(null_locale); + int i2; + ifs >> i2; + std::cout << "i=" << i << std::endl; + std::cout << "i2=" << i2 << std::endl; + BOOST_CHECK(i == i2); + ifs.close(); + } + + std::remove(testfile); + return EXIT_SUCCESS; +} + diff --git a/src/boost/libs/serialization/test/test_complex.cpp b/src/boost/libs/serialization/test/test_complex.cpp new file mode 100644 index 000000000..7caca8717 --- /dev/null +++ b/src/boost/libs/serialization/test/test_complex.cpp @@ -0,0 +1,82 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_complex.cpp + +// (C) Copyright 2005 Matthias Troyer . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include + +#include // NULL +#include // rand +#include // remove +#include +#include +#include + +#if defined(BOOST_NO_STDC_NAMESPACE) +#include +namespace std{ + using ::rand; + using ::remove; + #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(UNDER_CE) + using ::numeric_limits; + #endif +} +#endif + +#include "test_tools.hpp" + +#include +#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST) + +#include + +#include + +int test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + // test array of objects + std::complex a( + static_cast(std::rand()) / static_cast(std::rand()), + static_cast(std::rand()) / static_cast(std::rand()) + ); + std::complex b( + static_cast(std::rand()) / static_cast(std::rand()), + static_cast(std::rand()) / static_cast(std::rand()) + ); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os); + oa << boost::serialization::make_nvp("afloatcomplex", a); + oa << boost::serialization::make_nvp("adoublecomplex", b); + } + std::complex a1; + std::complex b1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is); + ia >> boost::serialization::make_nvp("afloatcomplex", a1); + ia >> boost::serialization::make_nvp("adoublecomplex", b1); + } + + std::cerr << "a.real()-a1a.real() distance = " << std::abs( boost::math::float_distance(a.real(), a1.real())) << std::endl; + BOOST_CHECK(std::abs(boost::math::float_distance(a.real(), a1.real())) < 2); + std::cerr << "a.imag() - a1a.imag() distance = " << std::abs( boost::math::float_distance(a.imag(), a1.imag())) << std::endl; + BOOST_CHECK(std::abs(boost::math::float_distance(a.imag(), a1.imag())) < 2); + std::cerr << "b.real() - b1.real() distance = " << std::abs( boost::math::float_distance(b.real(), b1.real())) << std::endl; + BOOST_CHECK(std::abs(boost::math::float_distance(b.real(), b1.real())) < 2); + std::cerr << "b.imag() - b1.imag() distance = " << std::abs( boost::math::float_distance(b.imag(), b1.imag())) << std::endl; + BOOST_CHECK(std::abs(boost::math::float_distance(b.imag(), b1.imag())) < 2); + + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_const_load_fail1.cpp b/src/boost/libs/serialization/test/test_const_load_fail1.cpp new file mode 100644 index 000000000..b756e6f56 --- /dev/null +++ b/src/boost/libs/serialization/test/test_const_load_fail1.cpp @@ -0,0 +1,23 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_const.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// compile only + +#include + +using namespace boost::archive; + +struct A { + template + void serialize(Archive & ar, unsigned int version) { + } +}; + +void f1(text_iarchive & ia, const A & a){ + ia >> a; +} diff --git a/src/boost/libs/serialization/test/test_const_load_fail1_nvp.cpp b/src/boost/libs/serialization/test/test_const_load_fail1_nvp.cpp new file mode 100644 index 000000000..dc8d0f471 --- /dev/null +++ b/src/boost/libs/serialization/test/test_const_load_fail1_nvp.cpp @@ -0,0 +1,24 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_const.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// compile only + +#include +#include + +using namespace boost::archive; + +struct A { + template + void serialize(Archive & ar, unsigned int version) { + } +}; + +void f1(text_iarchive & ia, const A & a){ + ia >> BOOST_SERIALIZATION_NVP(a); +} diff --git a/src/boost/libs/serialization/test/test_const_load_fail2.cpp b/src/boost/libs/serialization/test/test_const_load_fail2.cpp new file mode 100644 index 000000000..06d213fa1 --- /dev/null +++ b/src/boost/libs/serialization/test/test_const_load_fail2.cpp @@ -0,0 +1,23 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_const.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// compile only + +#include + +using namespace boost::archive; + +struct A { + template + void serialize(Archive & ar, unsigned int version) { + } +}; + +void f2(text_iarchive & ia, A * const & a){ + ia >> a; +} diff --git a/src/boost/libs/serialization/test/test_const_load_fail2_nvp.cpp b/src/boost/libs/serialization/test/test_const_load_fail2_nvp.cpp new file mode 100644 index 000000000..eadb0769f --- /dev/null +++ b/src/boost/libs/serialization/test/test_const_load_fail2_nvp.cpp @@ -0,0 +1,25 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_const.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// compile only + +#include +#include + +using namespace boost::archive; + +struct A { + template + void serialize(Archive & ar, unsigned int version) { + } +}; + +void f2(text_iarchive & ia, A * const & a){ + ia >> BOOST_SERIALIZATION_NVP(a); +} + diff --git a/src/boost/libs/serialization/test/test_const_load_fail3.cpp b/src/boost/libs/serialization/test/test_const_load_fail3.cpp new file mode 100644 index 000000000..f804a8d00 --- /dev/null +++ b/src/boost/libs/serialization/test/test_const_load_fail3.cpp @@ -0,0 +1,22 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_const.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// compile only + +#include +using namespace boost::archive; + +struct A { + template + void serialize(Archive & ar, unsigned int version) { + } +}; + +void f2(text_iarchive & ia, const A * const & a){ + ia >> a; +} diff --git a/src/boost/libs/serialization/test/test_const_load_fail3_nvp.cpp b/src/boost/libs/serialization/test/test_const_load_fail3_nvp.cpp new file mode 100644 index 000000000..8995f3eb8 --- /dev/null +++ b/src/boost/libs/serialization/test/test_const_load_fail3_nvp.cpp @@ -0,0 +1,24 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_const.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// compile only + +#include +#include + +using namespace boost::archive; + +struct A { + template + void serialize(Archive & ar, unsigned int version) { + } +}; + +void f2(text_iarchive & ia, const A * const & a){ + ia >> BOOST_SERIALIZATION_NVP(a); +} diff --git a/src/boost/libs/serialization/test/test_const_pass.cpp b/src/boost/libs/serialization/test/test_const_pass.cpp new file mode 100644 index 000000000..552d3acab --- /dev/null +++ b/src/boost/libs/serialization/test/test_const_pass.cpp @@ -0,0 +1,54 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_const.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// compile only + +#include +#include +#include + +struct A { + template + void serialize(Archive & ar, unsigned int version) { + } +}; + +// should compile w/o problem +void f1(boost::archive::text_oarchive & oa, const A & a){ + oa & a; + oa & BOOST_SERIALIZATION_NVP(a); + oa << a; + oa << BOOST_SERIALIZATION_NVP(a); +} +void f2(boost::archive::text_oarchive & oa, const A * const & a){ + oa & a; + oa & BOOST_SERIALIZATION_NVP(a); + oa << a; + oa << BOOST_SERIALIZATION_NVP(a); +} +void f3(boost::archive::text_iarchive & ia, A & a){ + ia & a; + ia & BOOST_SERIALIZATION_NVP(a); + ia >> a; + ia >> BOOST_SERIALIZATION_NVP(a); +} +void f4(boost::archive::text_iarchive & ia, A * & a){ + ia & a; + ia & BOOST_SERIALIZATION_NVP(a); + ia >> a; + ia >> BOOST_SERIALIZATION_NVP(a); +} +#if 0 +void f5(boost::archive::text_oarchive & oa, const A * & a){ + oa & a; + oa & BOOST_SERIALIZATION_NVP(a); + oa << a; + oa << BOOST_SERIALIZATION_NVP(a); +} +#endif + diff --git a/src/boost/libs/serialization/test/test_const_save_warn1.cpp b/src/boost/libs/serialization/test/test_const_save_warn1.cpp new file mode 100644 index 000000000..4e1625bcc --- /dev/null +++ b/src/boost/libs/serialization/test/test_const_save_warn1.cpp @@ -0,0 +1,25 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_const.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// compile only + +#include + +using namespace boost::archive; + +struct A { + template + void serialize(Archive & ar, unsigned int version) { + } +}; + +// should fail to compile +void f1(text_oarchive & oa, A & a){ + oa << a; +} + diff --git a/src/boost/libs/serialization/test/test_const_save_warn1_nvp.cpp b/src/boost/libs/serialization/test/test_const_save_warn1_nvp.cpp new file mode 100644 index 000000000..ffa9da596 --- /dev/null +++ b/src/boost/libs/serialization/test/test_const_save_warn1_nvp.cpp @@ -0,0 +1,26 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_const.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// compile only + +#include +#include +#include + +using namespace boost::archive; + +struct A { + template + void serialize(Archive & ar, unsigned int version) { + } +}; + +void f1(text_oarchive & oa, A & a){ + oa << BOOST_SERIALIZATION_NVP(a); +} + diff --git a/src/boost/libs/serialization/test/test_const_save_warn2.cpp b/src/boost/libs/serialization/test/test_const_save_warn2.cpp new file mode 100644 index 000000000..d2955b616 --- /dev/null +++ b/src/boost/libs/serialization/test/test_const_save_warn2.cpp @@ -0,0 +1,24 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_const.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// compile only + +#include + +using namespace boost::archive; + +struct A { + template + void serialize(Archive & ar, unsigned int version) { + } +}; + +void f2(text_oarchive & oa, A * & a){ + oa << a; +} + diff --git a/src/boost/libs/serialization/test/test_const_save_warn2_nvp.cpp b/src/boost/libs/serialization/test/test_const_save_warn2_nvp.cpp new file mode 100644 index 000000000..4a4d0388d --- /dev/null +++ b/src/boost/libs/serialization/test/test_const_save_warn2_nvp.cpp @@ -0,0 +1,25 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_const.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// compile only + +#include +#include + +using namespace boost::archive; + +struct A { + template + void serialize(Archive & ar, unsigned int version) { + } +}; + +void f2(text_oarchive & oa, A * & a){ + oa << BOOST_SERIALIZATION_NVP(a); +} + diff --git a/src/boost/libs/serialization/test/test_const_save_warn3.cpp b/src/boost/libs/serialization/test/test_const_save_warn3.cpp new file mode 100644 index 000000000..55759cc74 --- /dev/null +++ b/src/boost/libs/serialization/test/test_const_save_warn3.cpp @@ -0,0 +1,24 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_const.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// compile only + +#include + +using namespace boost::archive; + +struct A { + template + void serialize(Archive & ar, unsigned int version) { + } +}; + +void f3(text_oarchive & oa, const A * & a){ + oa << a; +} + diff --git a/src/boost/libs/serialization/test/test_const_save_warn3_nvp.cpp b/src/boost/libs/serialization/test/test_const_save_warn3_nvp.cpp new file mode 100644 index 000000000..fe8a9b0e2 --- /dev/null +++ b/src/boost/libs/serialization/test/test_const_save_warn3_nvp.cpp @@ -0,0 +1,25 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_const.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// compile only + +#include +#include + +using namespace boost::archive; + +struct A { + template + void serialize(Archive & ar, unsigned int version) { + } +}; + +void f3(text_oarchive & oa, const A * & a){ + oa << BOOST_SERIALIZATION_NVP(a); +} + diff --git a/src/boost/libs/serialization/test/test_const_save_warn4.cpp b/src/boost/libs/serialization/test/test_const_save_warn4.cpp new file mode 100644 index 000000000..53007165a --- /dev/null +++ b/src/boost/libs/serialization/test/test_const_save_warn4.cpp @@ -0,0 +1,37 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_const.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// compile only + +#include +#include + +using namespace boost::archive; + +struct A { + template + void serialize(Archive & ar, unsigned int version) { + } +}; + +// comment out this test case as a reminder not to keep inserting it !!! +// we don't trap this as an error in order to permit things like +// X * xptr; +// save(..){ +// ar << xptr; +// } +// +// for rational - consider the following example from demo.cpp +// std::list > schedule +// its not obvious to me how this can be cast to: +// std::list > schedule + +void f4(text_oarchive & oa, A * const & a){ + oa << a; +} + diff --git a/src/boost/libs/serialization/test/test_const_save_warn4_nvp.cpp b/src/boost/libs/serialization/test/test_const_save_warn4_nvp.cpp new file mode 100644 index 000000000..3cb59d413 --- /dev/null +++ b/src/boost/libs/serialization/test/test_const_save_warn4_nvp.cpp @@ -0,0 +1,39 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_const.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// compile only + +#include +#include + +using namespace boost::archive; + +struct A { + template + void serialize(Archive & ar, unsigned int version) { + } +}; + +// comment out this test case as a reminder not to keep inserting it !!! +// we don't trap this as an error in order to permit things like +// X * xptr; +// save(..){ +// ar << xptr; +// } +// +// for rational - consider the following example from demo.cpp +// +// std::list > schedule +// +// its not obvious to me how this can be cast to: +// +// std::list > schedule + +void f4(text_oarchive & oa, A * const & a){ + oa << BOOST_SERIALIZATION_NVP(a); +} diff --git a/src/boost/libs/serialization/test/test_contained_class.cpp b/src/boost/libs/serialization/test/test_contained_class.cpp new file mode 100644 index 000000000..4830fa996 --- /dev/null +++ b/src/boost/libs/serialization/test/test_contained_class.cpp @@ -0,0 +1,69 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_contained_class.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include +#include + +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" +#include + +#include "B.hpp" +#include "A.ipp" + +/////////////////////////////////////////////////////// +// Contained class +class C +{ +private: + friend class boost::serialization::access; + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_NVP(b); + } + B b; +public: + bool operator==(const C &rhs) const + { + return b == rhs.b; + } + C(){} +}; + +int test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + const C c; + C c1; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("c", c); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("c", c1); + } + BOOST_CHECK(c == c1); + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_cyclic_ptrs.cpp b/src/boost/libs/serialization/test/test_cyclic_ptrs.cpp new file mode 100644 index 000000000..cce8b6f9b --- /dev/null +++ b/src/boost/libs/serialization/test/test_cyclic_ptrs.cpp @@ -0,0 +1,204 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_cyclic_ptrs.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULL +#include + +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" +#include + +#include +#include +#include + +#include "A.hpp" +#include "A.ipp" + +/////////////////////////////////////////////////////// +// class with a member which refers to itself +class J : public A +{ +private: + friend class boost::serialization::access; + template + void serialize(Archive &ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(A); + ar & BOOST_SERIALIZATION_NVP(j); + } +public: + bool operator==(const J &rhs) const; + J *j; + J(J *_j) : j(_j) {} + J() : j(NULL){} +}; + +BOOST_CLASS_VERSION(J, 6) + +bool J::operator==(const J &rhs) const +{ + return static_cast(*this) == static_cast(rhs); +} + +/////////////////////////////////////////////////////// +// class with members that refer to each other +// this is an example of a class that, as written, cannot +// be serialized with this system. The problem is that the +// serialization of the first member - j1 , provokes serialization +// of those objects which it points to either directly or indirectly. +// When those objects are subsequently serialized, it is discovered +// that have already been serialized through pointers. This is +// detected by the system and an exception - pointer_conflict - +// is thrown. Permiting this to go undetected would result in the +// creation of multiple equal objects rather than the original +// structure. +class K +{ + J j1; + J j2; + J j3; + friend class boost::serialization::access; + template + void serialize( + Archive &ar, + const unsigned int /* file_version */ + ){ + ar & BOOST_SERIALIZATION_NVP(j1); + ar & BOOST_SERIALIZATION_NVP(j2); + ar & BOOST_SERIALIZATION_NVP(j3); + } +public: + bool operator==(const K &rhs) const; + K(); +}; + +K::K() +: j1(&j2), j2(&j3), j3(&j1) +{ +} + +bool K::operator==(const K &rhs) const +{ + return + j1.j == & j2 + && j2.j == & j3 + && j3.j == & j1 + && j1 == rhs.j1 + && j2 == rhs.j2 + && j3 == rhs.j3 + ; +} + +int test1(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + J j1, j2; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << BOOST_SERIALIZATION_NVP(j1); + } + { + // try to read the archive + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> BOOST_SERIALIZATION_NVP(j2); + } + BOOST_CHECK(j1 == j2); + std::remove(testfile); + return EXIT_SUCCESS; +} + +int test2(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + J *j1 = new J; + j1->j = j1; + J *j2 = reinterpret_cast(0xBAADF00D); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << BOOST_SERIALIZATION_NVP(j1); + } + { + // try to read the archive + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> BOOST_SERIALIZATION_NVP(j2); + } + BOOST_CHECK(*j1 == *j2); + delete j1; + BOOST_CHECK(j2 == j2->j); + std::remove(testfile); + return EXIT_SUCCESS; +} + +int test3(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + K k; + boost::archive::archive_exception exception( + boost::archive::archive_exception::no_exception + ); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + BOOST_TRY { + oa << BOOST_SERIALIZATION_NVP(k); + } + BOOST_CATCH (boost::archive::archive_exception const& ae){ + exception = ae; + } + BOOST_CATCH_END + BOOST_CHECK( + exception.code == boost::archive::archive_exception::pointer_conflict + ); + } + // if exception wasn't invoked + if(exception.code == boost::archive::archive_exception::no_exception){ + // try to read the archive + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + exception = boost::archive::archive_exception( + boost::archive::archive_exception::no_exception + ); + BOOST_TRY { + ia >> BOOST_SERIALIZATION_NVP(k); + } + BOOST_CATCH (boost::archive::archive_exception const& ae){ + exception = ae; + } + BOOST_CATCH_END + BOOST_CHECK( + exception.code == boost::archive::archive_exception::pointer_conflict + ); + } + std::remove(testfile); + return EXIT_SUCCESS; +} + +int test_main( int /* argc */, char* /* argv */[] ){ + test1(); + test2(); + test3(); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_delete_pointer.cpp b/src/boost/libs/serialization/test/test_delete_pointer.cpp new file mode 100644 index 000000000..80493e041 --- /dev/null +++ b/src/boost/libs/serialization/test/test_delete_pointer.cpp @@ -0,0 +1,119 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_delete_pointer.cpp + +// (C) Copyright 2002 Vahan Margaryan. +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include // NULL +#include + +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" +#include +#include + +#include +#include + +//A holds a pointer to another A, but doesn't own the pointer. +//objCount +class A +{ + friend class boost::serialization::access; + template + void save(Archive &ar, const unsigned int /* file_version */) const + { + ar << BOOST_SERIALIZATION_NVP(next_); + } + template + void load(Archive & ar, const unsigned int /* file_version */) + { + ar >> BOOST_SERIALIZATION_NVP(next_); + ++loadcount; + } + BOOST_SERIALIZATION_SPLIT_MEMBER() +public: + A() + { + if(test && objcount == 3) + boost::serialization::throw_exception(boost::archive::archive_exception( + boost::archive::archive_exception::no_exception + )); + next_ = 0; + ++objcount; + } + ~A(){ + delete next_; + --objcount; + } + A* next_; + static int objcount; + static bool test; + static int loadcount; +}; + + +int A::objcount = 0; +int A::loadcount = 0; +bool A::test = false; + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + + //fill the vector with chained A's. The vector is assumed + //to own the objects - we will destroy the objects through this vector. + + A * head = new A; + A* last = head; + unsigned int i; + for(i = 1; i < 9; ++i) + { + A *a = new A; + last->next_ = a; + last = a; + } + + const char * testfile = boost::archive::tmpnam(0); + BOOST_REQUIRE(NULL != testfile); + + //output the list + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << BOOST_SERIALIZATION_NVP(head); + } + + delete head; + BOOST_CHECK(A::objcount == 0); + + head = NULL; + A::test = true; + //read the list back + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + BOOST_TRY { + ia >> BOOST_SERIALIZATION_NVP(head); + } + BOOST_CATCH (...){ + ia.delete_created_pointers(); + } + BOOST_CATCH_END + } + + //identify the leaks + BOOST_CHECK(A::loadcount == 0); + std::remove(testfile); + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_deque.cpp b/src/boost/libs/serialization/test/test_deque.cpp new file mode 100644 index 000000000..37ab90a33 --- /dev/null +++ b/src/boost/libs/serialization/test/test_deque.cpp @@ -0,0 +1,55 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_deque.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include +#include + +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include +#include "test_tools.hpp" + +#include + +#include "A.hpp" +#include "A.ipp" + +int test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + // test array of objects + std::deque adeque, adeque1; + adeque.push_front(A()); + adeque.push_front(A()); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("adeque",adeque); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("adeque",adeque1); + } + BOOST_CHECK(adeque == adeque1); + + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_derived.cpp b/src/boost/libs/serialization/test/test_derived.cpp new file mode 100644 index 000000000..fb378e210 --- /dev/null +++ b/src/boost/libs/serialization/test/test_derived.cpp @@ -0,0 +1,148 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_derived.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULL +#include + +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include +#include "test_tools.hpp" + +#include +#include + +class base +{ + friend class boost::serialization::access; + template + void serialize(Archive & /* ar */, const unsigned int /* file_version */){ + } +public: + virtual ~base(){}; +}; + +class derived1 : public base +{ + friend class boost::serialization::access; + template + void serialize(Archive &ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(base); + } +}; + +class derived2 : public base +{ + friend class boost::serialization::access; + template + void serialize(Archive &ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(base); + } +}; + +// save non-polymorphic classes through a base class pointer +void save_derived(const char *testfile) +{ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + + // registration not necessary when serializing the most derived pointer + derived1 *d1 = new derived1; + derived2 *d2 = new derived2; + oa << BOOST_SERIALIZATION_NVP(d1) << BOOST_SERIALIZATION_NVP(d2); + + // upcasting non-polymorphic pointers may not lead to the expected + // result. In the current type id system + base *b1 = d1; + base *b2 = d2; + + // Warning, the current type id system does not yield true + // type id for non-polymorphic types + const boost::serialization::extended_type_info & this_type + = boost::serialization::type_info_implementation::type + ::get_const_instance(); + // retrieve the true type of the object pointed to + const boost::serialization::extended_type_info & true_type + = * boost::serialization::type_info_implementation::type + ::get_const_instance().get_derived_extended_type_info(*b1); + + BOOST_WARN_MESSAGE( + !(this_type == true_type), + "current type id system does not support non-polymorphic types" + ); + + oa << BOOST_SERIALIZATION_NVP(b1); + oa << BOOST_SERIALIZATION_NVP(b2); + + delete d1; + delete d2; +} + +// save non-polymorphic classes through a base class pointer +void load_derived(const char *testfile) +{ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + + // registration not necessary when serializing the most derived pointer + derived1 *d1 = NULL; + derived2 *d2 = NULL; + ia >> BOOST_SERIALIZATION_NVP(d1) >> BOOST_SERIALIZATION_NVP(d2); + + // upcasting non-polymorphic pointers may not lead to the expected + // result. In the current type id system + base *b1 = NULL; + base *b2 = NULL; + + // note: this will produce incorrect results for non-polymorphic classes + ia >> BOOST_SERIALIZATION_NVP(b1); + ia >> BOOST_SERIALIZATION_NVP(b2); + + // Warning, the current type id system does not yield true + // type id for non-polymorphic types + const boost::serialization::extended_type_info & this_type + = boost::serialization::type_info_implementation::type + ::get_const_instance(); + // retrieve the true type of the object pointed to + const boost::serialization::extended_type_info & true_type + = * boost::serialization::type_info_implementation::type + ::get_const_instance().get_derived_extended_type_info(*b1); + + BOOST_WARN_MESSAGE( + ! (this_type == true_type), + "current type id system does fails for non-polymorphic types" + ); + + BOOST_CHECK(b1 == static_cast(d1)); + BOOST_CHECK(b2 == static_cast(d2)); + + delete d1; + delete d2; +} + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + save_derived(testfile); + load_derived(testfile); + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_derived_class.cpp b/src/boost/libs/serialization/test/test_derived_class.cpp new file mode 100644 index 000000000..056c8ebec --- /dev/null +++ b/src/boost/libs/serialization/test/test_derived_class.cpp @@ -0,0 +1,49 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_derived_class.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include + +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" + +#include "B.hpp" +#include "A.ipp" + +int test_main( int /*argc*/, char* /*argv*/[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + + BOOST_REQUIRE(NULL != testfile); + + B b, b1; + + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("b", b); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("b1", b1); + } + BOOST_CHECK(b == b1); + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_derived_class_ptr.cpp b/src/boost/libs/serialization/test/test_derived_class_ptr.cpp new file mode 100644 index 000000000..6749c8221 --- /dev/null +++ b/src/boost/libs/serialization/test/test_derived_class_ptr.cpp @@ -0,0 +1,52 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_deriviec_class_.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULL +#include + +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" + +#include "B.hpp" +#include "A.ipp" + +int test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + B * tb = new B; + B * tb1 = NULL; + + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("tb", tb); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("tb",tb1); + } + BOOST_CHECK(tb != tb1); + BOOST_CHECK(*tb == *tb1); + delete tb; + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_diamond.cpp b/src/boost/libs/serialization/test/test_diamond.cpp new file mode 100644 index 000000000..9eaf4577a --- /dev/null +++ b/src/boost/libs/serialization/test/test_diamond.cpp @@ -0,0 +1,205 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_diamond.cpp + +// (C) Copyright 2002-2009 Vladimir Prus and Robert Ramey. +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// test of serialization library for diamond inheritence situations + +#include // NULL +#include +#include + +#include +#include // remove +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" + +#include +#include +#include +#include +#include +#include +#include + +int save_count = 0; // used to detect when base class is saved multiple times +int load_count = 0; // used to detect when base class is loaded multiple times + +class base { +public: + base() : i(0) {} + base(int i) : i(i) + { + m[i] = "text"; + } + + template + void save(Archive &ar, const unsigned int /* file_version */) const + { + std::cout << "Saving base\n"; + ar << BOOST_SERIALIZATION_NVP(i); + ar << BOOST_SERIALIZATION_NVP(m); + ++save_count; + } + + template + void load(Archive & ar, const unsigned int /* file_version */) + { + std::cout << "Restoring base\n"; + ar >> BOOST_SERIALIZATION_NVP(i); + ar >> BOOST_SERIALIZATION_NVP(m); + ++load_count; + } + + BOOST_SERIALIZATION_SPLIT_MEMBER() + + bool operator==(const base& another) const + { + return i == another.i && m == another.m; + } + // make polymorphic by marking at least one function virtual + virtual ~base() {}; +private: + int i; + std::map m; +}; + +// note: the default is for object tracking to be performed if and only +// if and object of the corresponding class is anywhere serialized +// through a pointer. In this example, that doesn't occur so +// by default, the shared base object wouldn't normally be tracked. +// This would leave to multiple save/load operation of the data in +// this shared base class. This wouldn't cause an error, but it would +// be a waste of time. So set the tracking behavior trait of the base +// class to always track serialized objects of that class. This permits +// the system to detect and elminate redundent save/load operations. +// (It is concievable that this might someday be detected automatically +// but for now, this is not done so we have to rely on the programmer +// to specify this trait) +BOOST_CLASS_TRACKING(base, track_always) + +class derived1 : virtual public base { +public: + template + void save(Archive &ar, const unsigned int /* file_version */) const + { + std::cout << "Saving derived1\n"; + ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(base); + } + + template + void load(Archive & ar, const unsigned int /* file_version */) + { + std::cout << "Restoring derived1\n"; + ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(base); + } + + BOOST_SERIALIZATION_SPLIT_MEMBER() +}; + +class derived2 : virtual public base { +public: + template + void save(Archive &ar, const unsigned int /* file_version */) const + { + std::cout << "Saving derived2\n"; + ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(base); + } + + template + void load(Archive & ar, const unsigned int /* file_version */) + { + std::cout << "Restoring derived2\n"; + ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(base); + } + + BOOST_SERIALIZATION_SPLIT_MEMBER() +}; + +class final : public derived1, public derived2 { +public: + final() {} + final(int i) : base(i) {} + + template + void save(Archive &ar, const unsigned int /* file_version */) const + { + std::cout << "Saving final\n"; + ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(derived1); + ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(derived2); + } + + template + void load(Archive & ar, const unsigned int /* file_version */) + { + std::cout << "Restoring final\n"; + ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(derived1); + ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(derived2); + } + + BOOST_SERIALIZATION_SPLIT_MEMBER() +}; + +BOOST_CLASS_EXPORT(final) + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + const final b(3); + { + test_ostream ofs(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(ofs); + oa << boost::serialization::make_nvp("b", b); + } + + final b2; + { + test_istream ifs(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(ifs); + ia >> boost::serialization::make_nvp("b2", b2); + } + BOOST_CHECK(1 == save_count); + BOOST_CHECK(1 == load_count); + BOOST_CHECK(b2 == b); + std::remove(testfile); + + // do the same test with pointers + testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + save_count = 0; + load_count = 0; + + const base* bp = new final( 3 ); + { + test_ostream ofs(testfile); + test_oarchive oa(ofs); + oa << BOOST_SERIALIZATION_NVP(bp); + } + + base* bp2; + { + test_istream ifs(testfile); + test_iarchive ia(ifs); + ia >> BOOST_SERIALIZATION_NVP(bp2); + } + + BOOST_CHECK(1 == save_count); + BOOST_CHECK(1 == load_count); + BOOST_CHECK(*bp2 == *bp); + delete bp; + std::remove(testfile); + + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_diamond_complex.cpp b/src/boost/libs/serialization/test/test_diamond_complex.cpp new file mode 100644 index 000000000..826c7fb8c --- /dev/null +++ b/src/boost/libs/serialization/test/test_diamond_complex.cpp @@ -0,0 +1,480 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_diamond.cpp + +// (C) Copyright 2002-2009 Vladimir Prus, Robert Ramey and Takatoshi Kondo. +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// test of serialization library for diamond inheritence situations + +#include // NULL +#include +#include + +#include +#include // remove +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" + +#include +#include +#include +#include +#include +#include +#include + +int save_count = 0; // used to detect when EXnLevel1 class is saved multiple times +int load_count = 0; // used to detect when EXnLevel1 class is loaded multiple times + +// inheritance structure +// +// EX1Level1<-+-EX1Level2_A<-+-+-EX1Level3_A +// | | | +// +-EX1Level2_B<-+ +-EX1Level3_B<--EX1Level4 +// +// EXPORT Sequence EX1Level3_A, EX1Level4 +//--------------------------------------------------------- +// EX2Level1<-+-EX2Level2_A<-+-+-EX2Level3_A +// | | | +// +-EX2Level2_B<-+ +-EX2Level3_B<--EX2Level4 +// +// EXPORT Sequence EX2Level4, EX2Level3_A + +class EX1Level1 { +public: + EX1Level1() : i(0) {} + EX1Level1(int i) : i(i) + { + m[i] = "text"; + } + + template + void save(Archive &ar, const unsigned int /* file_version */) const + { + std::cout << "Saving EX1Level1\n"; + ar << BOOST_SERIALIZATION_NVP(i); + ar << BOOST_SERIALIZATION_NVP(m); + ++save_count; + } + + template + void load(Archive & ar, const unsigned int /* file_version */) + { + std::cout << "Restoring EX1Level1\n"; + ar >> BOOST_SERIALIZATION_NVP(i); + ar >> BOOST_SERIALIZATION_NVP(m); + ++load_count; + } + + BOOST_SERIALIZATION_SPLIT_MEMBER() + + bool operator==(const EX1Level1& another) const + { + return i == another.i && m == another.m; + } + // make polymorphic by marking at least one function virtual + virtual ~EX1Level1() {}; +private: + int i; + std::map m; +}; + +// note: the default is for object tracking to be performed if and only +// if and object of the corresponding class is anywhere serialized +// through a pointer. In this example, that doesn't occur so +// by default, the shared EX1Level1 object wouldn't normally be tracked. +// This would leave to multiple save/load operation of the data in +// this shared EX1Level1 class. This wouldn't cause an error, but it would +// be a waste of time. So set the tracking behavior trait of the EX1Level1 +// class to always track serialized objects of that class. This permits +// the system to detect and elminate redundent save/load operations. +// (It is concievable that this might someday be detected automatically +// but for now, this is not done so we have to rely on the programmer +// to specify this trait) +BOOST_CLASS_TRACKING(EX1Level1, track_always) + +class EX1Level2_A : virtual public EX1Level1 { +public: + template + void save(Archive &ar, const unsigned int /* file_version */) const + { + std::cout << "Saving EX1Level2_A\n"; + ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX1Level1); + } + + template + void load(Archive & ar, const unsigned int /* file_version */) + { + std::cout << "Restoring EX1Level2_A\n"; + ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX1Level1); + } + + BOOST_SERIALIZATION_SPLIT_MEMBER() +}; + +class EX1Level2_B : virtual public EX1Level1 { +public: + template + void save(Archive &ar, const unsigned int /* file_version */) const + { + std::cout << "Saving EX1Level2_B\n"; + ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX1Level1); + } + + template + void load(Archive & ar, const unsigned int /* file_version */) + { + std::cout << "Restoring EX1Level2_B\n"; + ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX1Level1); + } + + BOOST_SERIALIZATION_SPLIT_MEMBER() +}; + +class EX1Level3_A : public EX1Level2_A, public EX1Level2_B { +public: + EX1Level3_A() {} + EX1Level3_A(int i) : EX1Level1(i) {} + + template + void save(Archive &ar, const unsigned int /* file_version */) const + { + std::cout << "Saving EX1Level3_A\n"; + ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX1Level2_A); + ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX1Level2_B); + } + + template + void load(Archive & ar, const unsigned int /* file_version */) + { + std::cout << "Restoring EX1Level3_A\n"; + ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX1Level2_A); + ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX1Level2_B); + } + + BOOST_SERIALIZATION_SPLIT_MEMBER() +}; + + +class EX1Level3_B : public EX1Level2_A, public EX1Level2_B { +public: + EX1Level3_B() {} + EX1Level3_B(int) {} + + template + void save(Archive &ar, const unsigned int /* file_version */) const + { + std::cout << "Saving EX1Level3_B\n"; + ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX1Level2_A); + ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX1Level2_B); + } + + template + void load(Archive & ar, const unsigned int /* file_version */) + { + std::cout << "Restoring EX1Level3_B\n"; + ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX1Level2_A); + ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX1Level2_B); + } + + BOOST_SERIALIZATION_SPLIT_MEMBER() +}; + +class EX1Level4 : public EX1Level3_B { +public: + EX1Level4() {} + EX1Level4(int i) : EX1Level1(i) {} + + template + void save(Archive &ar, const unsigned int /* file_version */) const + { + std::cout << "Saving EX1Level4\n"; + ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX1Level3_B); + } + + template + void load(Archive & ar, const unsigned int /* file_version */) + { + std::cout << "Restoring EX1Level4\n"; + ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX1Level3_B); + } + + BOOST_SERIALIZATION_SPLIT_MEMBER() +}; + + +class EX2Level1 { +public: + EX2Level1() : i(0) {} + EX2Level1(int i) : i(i) + { + m[i] = "text"; + } + + template + void save(Archive &ar, const unsigned int /* file_version */) const + { + std::cout << "Saving EX2Level1\n"; + ar << BOOST_SERIALIZATION_NVP(i); + ar << BOOST_SERIALIZATION_NVP(m); + ++save_count; + } + + template + void load(Archive & ar, const unsigned int /* file_version */) + { + std::cout << "Restoring EX2Level1\n"; + ar >> BOOST_SERIALIZATION_NVP(i); + ar >> BOOST_SERIALIZATION_NVP(m); + ++load_count; + } + + BOOST_SERIALIZATION_SPLIT_MEMBER() + + bool operator==(const EX2Level1& another) const + { + return i == another.i && m == another.m; + } + // make polymorphic by marking at least one function virtual + virtual ~EX2Level1() {}; +private: + int i; + std::map m; +}; + +// note: the default is for object tracking to be performed if and only +// if and object of the corresponding class is anywhere serialized +// through a pointer. In this example, that doesn't occur so +// by default, the shared EX2Level1 object wouldn't normally be tracked. +// This would leave to multiple save/load operation of the data in +// this shared EX2Level1 class. This wouldn't cause an error, but it would +// be a waste of time. So set the tracking behavior trait of the EX2Level1 +// class to always track serialized objects of that class. This permits +// the system to detect and elminate redundent save/load operations. +// (It is concievable that this might someday be detected automatically +// but for now, this is not done so we have to rely on the programmer +// to specify this trait) +BOOST_CLASS_TRACKING(EX2Level1, track_always) + +class EX2Level2_A : virtual public EX2Level1 { +public: + template + void save(Archive &ar, const unsigned int /* file_version */) const + { + std::cout << "Saving EX2Level2_A\n"; + ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX2Level1); + } + + template + void load(Archive & ar, const unsigned int /* file_version */) + { + std::cout << "Restoring EX2Level2_A\n"; + ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX2Level1); + } + + BOOST_SERIALIZATION_SPLIT_MEMBER() +}; + +class EX2Level2_B : virtual public EX2Level1 { +public: + template + void save(Archive &ar, const unsigned int /* file_version */) const + { + std::cout << "Saving EX2Level2_B\n"; + ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX2Level1); + } + + template + void load(Archive & ar, const unsigned int /* file_version */) + { + std::cout << "Restoring EX2Level2_B\n"; + ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX2Level1); + } + + BOOST_SERIALIZATION_SPLIT_MEMBER() +}; + +class EX2Level3_A : public EX2Level2_A, public EX2Level2_B { +public: + EX2Level3_A() {} + EX2Level3_A(int i) : EX2Level1(i) {} + + template + void save(Archive &ar, const unsigned int /* file_version */) const + { + std::cout << "Saving EX2Level3_A\n"; + ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX2Level2_A); + ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX2Level2_B); + } + + template + void load(Archive & ar, const unsigned int /* file_version */) + { + std::cout << "Restoring EX2Level3_A\n"; + ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX2Level2_A); + ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX2Level2_B); + } + + BOOST_SERIALIZATION_SPLIT_MEMBER() +}; + + +class EX2Level3_B : public EX2Level2_A, public EX2Level2_B { +public: + EX2Level3_B() {} + EX2Level3_B(int i) : EX2Level1(i) {} + + template + void save(Archive &ar, const unsigned int /* file_version */) const + { + std::cout << "Saving EX2Level3_B\n"; + ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX2Level2_A); + ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX2Level2_B); + } + + template + void load(Archive & ar, const unsigned int /* file_version */) + { + std::cout << "Restoring EX2Level3_B\n"; + ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX2Level2_A); + ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX2Level2_B); + } + + BOOST_SERIALIZATION_SPLIT_MEMBER() +}; + +class EX2Level4 : public EX2Level3_B { +public: + EX2Level4() {} + EX2Level4(int i) : EX2Level1(i) {} + + template + void save(Archive &ar, const unsigned int /* file_version */) const + { + std::cout << "Saving EX2Level4\n"; + ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX2Level3_B); + } + + template + void load(Archive & ar, const unsigned int /* file_version */) + { + std::cout << "Restoring EX2Level4\n"; + ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(EX2Level3_B); + } + + BOOST_SERIALIZATION_SPLIT_MEMBER() +}; + +BOOST_CLASS_EXPORT(EX1Level4) +BOOST_CLASS_EXPORT(EX1Level3_A) + +BOOST_CLASS_EXPORT(EX2Level3_A) +BOOST_CLASS_EXPORT(EX2Level4) + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + { + save_count = 0; + load_count = 0; + + const EX1Level3_A ex1L3a_save(3); + const EX1Level1 *ex1L1_save = &ex1L3a_save; + { + test_ostream ofs(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(ofs); + oa << boost::serialization::make_nvp("ex1L1_save", ex1L1_save); + } + + EX1Level1 *ex1L1_load; + { + test_istream ifs(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(ifs); + ia >> boost::serialization::make_nvp("ex1L1_load", ex1L1_load); + } + BOOST_CHECK(1 == save_count); + BOOST_CHECK(1 == load_count); + BOOST_CHECK(*ex1L1_save == *ex1L1_load); + std::remove(testfile); + } + { + save_count = 0; + load_count = 0; + + const EX1Level4 ex1L4_save(3); + const EX1Level1 *ex1L1_save = &ex1L4_save; + { + test_ostream ofs(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(ofs); + oa << boost::serialization::make_nvp("ex1L1_save", ex1L1_save); + } + + EX1Level1 *ex1L1_load; + { + test_istream ifs(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(ifs); + ia >> boost::serialization::make_nvp("ex1L1_load", ex1L1_load); + } + BOOST_CHECK(1 == save_count); + BOOST_CHECK(1 == load_count); + BOOST_CHECK(*ex1L1_save == *ex1L1_load); + std::remove(testfile); + } + { + save_count = 0; + load_count = 0; + + const EX2Level3_A ex2L3a_save(3); + const EX2Level1 *ex2L1_save = &ex2L3a_save; + { + test_ostream ofs(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(ofs); + oa << boost::serialization::make_nvp("ex2L1_save", ex2L1_save); + } + + EX2Level1 *ex2L1_load; + { + test_istream ifs(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(ifs); + ia >> boost::serialization::make_nvp("ex2L1_load", ex2L1_load); + } + BOOST_CHECK(1 == save_count); + BOOST_CHECK(1 == load_count); + BOOST_CHECK(*ex2L1_save == *ex2L1_load); + std::remove(testfile); + } + { + save_count = 0; + load_count = 0; + + const EX2Level4 ex2L4_save(3); + const EX2Level1 *ex2L1_save = &ex2L4_save; + { + test_ostream ofs(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(ofs); + oa << boost::serialization::make_nvp("ex2L1_save", ex2L1_save); + } + + EX2Level1 *ex2L1_load; + { + test_istream ifs(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(ifs); + ia >> boost::serialization::make_nvp("ex2L1_load", ex2L1_load); + } + BOOST_CHECK(1 == save_count); + BOOST_CHECK(1 == load_count); + BOOST_CHECK(*ex2L1_save == *ex2L1_load); + std::remove(testfile); + } + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_dll_exported.cpp b/src/boost/libs/serialization/test/test_dll_exported.cpp new file mode 100644 index 000000000..69b996c51 --- /dev/null +++ b/src/boost/libs/serialization/test/test_dll_exported.cpp @@ -0,0 +1,137 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_dll_exported.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +// This is an overly complex test. The purpose of this test is to +// demostrate and test the ability to serialize a hiarchy of class +// through a base class pointer even though those class might be +// implemente in different dlls and use different extended type info +// systems. +// +// polymorphic_ base is locally declared and defined. It use the +// "no_rtti" extended type info system. + +// polymorphic_derived1 is locally declared and defined. It uses +// the default "type_id" extended type info system + +// polymorphic_derived2 is declared in polymorphic_derived.hpp +// and defined in dll_polymorphic_derived2. It uses the typeid +// system. + +#include // NULL +#include + +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include +#include + +#include "test_tools.hpp" + +#include +#include + +#include +#include +#include + +#define POLYMORPHIC_BASE_IMPORT +#include "polymorphic_base.hpp" + +#include "polymorphic_derived1.hpp" + +#define POLYMORPHIC_DERIVED2_IMPORT +#include "polymorphic_derived2.hpp" + +// save exported polymorphic class +void save_exported(const char *testfile) +{ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa_implementation(os, TEST_ARCHIVE_FLAGS); + boost::archive::polymorphic_oarchive & oa_interface = oa_implementation; + + polymorphic_base *rb1 = new polymorphic_derived1; + polymorphic_base *rb2 = new polymorphic_derived2; + polymorphic_derived2 *rd21 = new polymorphic_derived2; + + // export will permit correct serialization + // through a pointer to a base class + oa_interface << BOOST_SERIALIZATION_NVP(rb1); + oa_interface << BOOST_SERIALIZATION_NVP(rb2); + oa_interface << BOOST_SERIALIZATION_NVP(rd21); + + delete rd21; + delete rb2; + delete rb1; +} + +// save exported polymorphic class +void load_exported(const char *testfile) +{ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia_implementation(is, TEST_ARCHIVE_FLAGS); + boost::archive::polymorphic_iarchive & ia_interface = ia_implementation; + + polymorphic_base *rb1 = NULL; + polymorphic_base *rb2 = NULL; + polymorphic_derived2 *rd21 = NULL; + + // export will permit correct serialization + // through a pointer to a base class + ia_interface >> BOOST_SERIALIZATION_NVP(rb1); + BOOST_CHECK_MESSAGE( + boost::serialization::type_info_implementation + ::type::get_const_instance() + == + * boost::serialization::type_info_implementation + ::type::get_const_instance().get_derived_extended_type_info(*rb1), + "restored pointer b1 not of correct type" + ); + ia_interface >> BOOST_SERIALIZATION_NVP(rb2); + BOOST_CHECK_MESSAGE( + boost::serialization::type_info_implementation + ::type::get_const_instance() + == + * boost::serialization::type_info_implementation + ::type::get_const_instance().get_derived_extended_type_info(*rb2), + "restored pointer b2 not of correct type" + ); + ia_interface >> BOOST_SERIALIZATION_NVP(rd21); + BOOST_CHECK_MESSAGE( + boost::serialization::type_info_implementation + ::type::get_const_instance() + == + * boost::serialization::type_info_implementation + ::type::get_const_instance().get_derived_extended_type_info(*rd21), + "restored pointer d2 not of correct type" + ); + delete rd21; + delete rb2; + delete rb1; +} + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + save_exported(testfile); + load_exported(testfile); + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_dll_plugin.cpp b/src/boost/libs/serialization/test/test_dll_plugin.cpp new file mode 100644 index 000000000..c5c4a5fb9 --- /dev/null +++ b/src/boost/libs/serialization/test/test_dll_plugin.cpp @@ -0,0 +1,211 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_dll_plugin.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +// Note this test creates, serializes, and destroys +// a class instance while knowing nothing more than its +// exported class ID (GUID) and a base class from which +// it is derived. This is referred to as a "plugin" +// since the same program could, without recompilation, +// manipulate any number of derived types - even those +// which have not been yet been created. + +#include + +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include + +// for now, only test with simple text and polymorphic archive +#include "test_tools.hpp" + +#include +#include +#include +#include +#include +#include + +#include "polymorphic_base.hpp" + +// declare and implement a derived class in our own executable +class polymorphic_derived1 : public polymorphic_base +{ + friend class boost::serialization::access; + template + void serialize(Archive &ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(polymorphic_base); + } + const char * get_key() const{ + return + boost::serialization::type_info_implementation< + polymorphic_derived1 + >::type::get_const_instance().get_key(); + } +public: + virtual ~polymorphic_derived1(){} +}; + +// This class is derived from polymorphic_base which uses the no_rtti system +// rather than the typeid system. This system uses the exported name as the +// type identifier key. This MUST be exported!!! +BOOST_CLASS_EXPORT(polymorphic_derived1) + +// MWerks users can do this to make their code work +BOOST_SERIALIZATION_MWERKS_BASE_AND_DERIVED(polymorphic_base, polymorphic_derived1) + +// save exported polymorphic class +void save_exported(const char *testfile) +{ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + + polymorphic_base *rb1 = new polymorphic_derived1; + + // get the eti record for the exported type "polymorphic_derived2" + boost::serialization::extended_type_info const * const d2_eti = + boost::serialization::extended_type_info::find( + "polymorphic_derived2" + ); + assert(NULL != d2_eti); + + // create a new instance of the type referred to by this record. + // in this example, we happen to know that the class constructor + // takes no arguments. + void const * const rd2 = d2_eti->construct(); + assert(NULL != rd2); + + // transform the pointer to a pointer to the base class + polymorphic_base const * const rb2 + = static_cast( + boost::serialization::void_upcast( + * d2_eti, + boost::serialization::type_info_implementation + ::type::get_const_instance(), + rd2 + ) + ); + + // export will permit correct serialization + // through a pointer to a base class + oa << BOOST_SERIALIZATION_NVP(rb1); + oa << BOOST_SERIALIZATION_NVP(rb2); + + // don't need these any more - don't leak memory + delete rb1; + // note delete original handle - not runtime cast one !!! + //delete rb2; + d2_eti->destroy(rd2); +} + +// save exported polymorphic class +void load_exported(const char *testfile) +{ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + + polymorphic_base *rb1 = NULL; + polymorphic_base *rb2 = NULL; + + // export will permit correct serialization + // through a pointer to a base class + ia >> BOOST_SERIALIZATION_NVP(rb1); + + BOOST_CHECK_MESSAGE( + boost::serialization::type_info_implementation + ::type::get_const_instance() + == + * boost::serialization::type_info_implementation + ::type::get_const_instance().get_derived_extended_type_info(*rb1), + "restored pointer b1 not of correct type" + ); + ia >> BOOST_SERIALIZATION_NVP(rb2); + + // get the eti record for the exported type "polymorphic_derived2" + boost::serialization::extended_type_info const * const d2_eti = + boost::serialization::extended_type_info::find( + "polymorphic_derived2" + ); + assert(NULL != d2_eti); + + BOOST_CHECK_MESSAGE( + * d2_eti + == + * boost::serialization::type_info_implementation + ::type::get_const_instance().get_derived_extended_type_info(*rb2), + "restored pointer b2 not of correct type" + ); + + delete rb1; + delete rb2; +} + +#ifdef BOOST_WINDOWS + +#define WIN32_LEAN_AND_MEAN +#include +#include + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + HINSTANCE hDLL; // Handle to DLL + hDLL = LoadLibrary(_T("polymorphic_derived2.dll")); + BOOST_CHECK_MESSAGE( + (0 != hDLL), + "Failed to find/load polymorphic_derived2" + ); + if(0 == hDLL) + return EXIT_FAILURE; + + save_exported(testfile); + load_exported(testfile); + FreeLibrary(hDLL); + + std::remove(testfile); + return EXIT_SUCCESS; +} + +#else // presume *nix + +#include + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + void * hDLL; // Handle to DLL + hDLL = dlopen("polymorphic_derived2.so", RTLD_NOW | RTLD_GLOBAL); + BOOST_CHECK_MESSAGE((0 != hDLL), "Failed to find/load plugin_polymorphic_derived2" ); + BOOST_CHECK_MESSAGE((0 != hDLL), dlerror() ); + if(0 == hDLL) + return EXIT_FAILURE; + + save_exported(testfile); + load_exported(testfile); + dlclose(hDLL); + + std::remove(testfile); + return EXIT_SUCCESS; +} + +#endif + +// EOF diff --git a/src/boost/libs/serialization/test/test_dll_simple.cpp b/src/boost/libs/serialization/test/test_dll_simple.cpp new file mode 100644 index 000000000..278d25c95 --- /dev/null +++ b/src/boost/libs/serialization/test/test_dll_simple.cpp @@ -0,0 +1,247 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_dll_simple.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +// invoke header for a custom archive test. + +#include // NULL +#include + +#include // remove +#include + +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +// for now, only test with simple text and polymorphic archive +#include "test_tools.hpp" +#include "text_archive.hpp" + +#include +#include + +#define A_IMPORT +#include "A.hpp" + +// simple class with text archive compiled in dll +void +test1(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + const A a; + A a1; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + boost::archive::text_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("a", a); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + boost::archive::text_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("a", a1); + } + BOOST_CHECK_EQUAL(a, a1); + + std::remove(testfile); +} + +// simple class with polymorphic archive compiled in dll +void +test2(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + const A a; + A a1; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + boost::archive::polymorphic_text_oarchive oa(os, TEST_ARCHIVE_FLAGS); + boost::archive::polymorphic_oarchive & poa(oa); + poa << boost::serialization::make_nvp("a", a); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + boost::archive::polymorphic_text_iarchive ia(is, TEST_ARCHIVE_FLAGS); + boost::archive::polymorphic_iarchive & pia(ia); + pia >> boost::serialization::make_nvp("a", a1); + } + BOOST_CHECK_EQUAL(a, a1); + + std::remove(testfile); +} + +// simple class pointer with text archive compiled in dll +void +test3(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + const A *a = new A; + A *a1; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + boost::archive::text_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("a", a); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + boost::archive::text_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("a", a1); + } + BOOST_CHECK_EQUAL(*a, *a1); + + std::remove(testfile); + delete a; +} + +// simple class pointer with polymorphic archive compiled in dll +void +test4(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + const A *a = new A; + A *a1; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + boost::archive::polymorphic_text_oarchive oa(os, TEST_ARCHIVE_FLAGS); + boost::archive::polymorphic_oarchive & poa(oa); + poa << boost::serialization::make_nvp("a", a); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + boost::archive::polymorphic_text_iarchive ia(is, TEST_ARCHIVE_FLAGS); + boost::archive::polymorphic_iarchive & pia(ia); + pia >> boost::serialization::make_nvp("a", a1); + } + BOOST_CHECK_EQUAL(*a, *a1); + + std::remove(testfile); + delete a; +} + +#include "B.hpp" + +// derived class with base text archive compiled in dll +void +test5(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + const B b; + B b1; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + boost::archive::text_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("b", b); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + boost::archive::text_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("b", b1); + } + BOOST_CHECK_EQUAL(b, b1); + + std::remove(testfile); +} + +// derived class with base base compiled with polymorphic archive in dll +void +test6(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + const B b; + B b1; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + boost::archive::polymorphic_text_oarchive oa(os, TEST_ARCHIVE_FLAGS); + boost::archive::polymorphic_oarchive & poa(oa); + poa << boost::serialization::make_nvp("b", b); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + boost::archive::polymorphic_text_iarchive ia(is, TEST_ARCHIVE_FLAGS); + boost::archive::polymorphic_iarchive & pia(ia); + pia >> boost::serialization::make_nvp("b", b1); + } + BOOST_CHECK_EQUAL(b, b1); + + std::remove(testfile); +} + +// derived class pointer with base text archive compiled in dll +void +test7(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + const B *b = new B; + B *b1; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + boost::archive::text_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("b", b); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + boost::archive::text_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("b", b1); + } + BOOST_CHECK_EQUAL(*b, *b1); + + std::remove(testfile); + delete b; +} + +// derived class pointer with base polymorphic archive compiled in dll +void +test8(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + const B *b = new B; + B *b1; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + boost::archive::polymorphic_text_oarchive oa(os, TEST_ARCHIVE_FLAGS); + boost::archive::polymorphic_oarchive & poa(oa); + poa << boost::serialization::make_nvp("b", b); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + boost::archive::polymorphic_text_iarchive ia(is, TEST_ARCHIVE_FLAGS); + boost::archive::polymorphic_iarchive & pia(ia); + pia >> boost::serialization::make_nvp("b", b1); + } + BOOST_CHECK_EQUAL(*b, *b1); + + std::remove(testfile); + delete b; +} + + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + test1(); + test2(); + test3(); + test4(); + test5(); + test6(); + test7(); + test8(); + return EXIT_SUCCESS; +} + diff --git a/src/boost/libs/serialization/test/test_enable_shared_from_this.cpp b/src/boost/libs/serialization/test/test_enable_shared_from_this.cpp new file mode 100644 index 000000000..608837e22 --- /dev/null +++ b/src/boost/libs/serialization/test/test_enable_shared_from_this.cpp @@ -0,0 +1,195 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_enable_shared_from_this.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// This demonstrates a problem with boost::serialization and boost::enable_shared_from_this. +// (boost version 1.53) +// See boost TRAC ticket #9567 +// +// Given the following class structure: +// Base is a simple class +// Derived inherits from Base +// Derived also inherits from boost::enable_shared_from_this +// Base and Derived implement boost::serialization +// +// When deserializing an instance of Derived into a vector of boost::shared_ptr: +// Base and Derived members are reconstructed correctly. +// Derived::shared_from_this() works as expected. +// +// But when deserializing an instance of Derived into a vector of boost::shared_ptr: +// Base and Derived members are still reconstructed correctly. +// Derived::shared_from_this() throws a bad_weak_ptr exception. +// This is because enable_shared_from_this::weak_ptr is NOT reconstructed - It is zero. + +#include + +#include +#include + +#include +#include +#include +#include + +#include "test_tools.hpp" + +#include + +namespace boost { +namespace serialization { + +struct enable_shared_from_this_helper { + std::set > m_esfth; + void record(boost::shared_ptr sp){ + m_esfth.insert(sp); + } +}; + +template +void serialize( + Archive & ar, + boost::enable_shared_from_this & t, + const unsigned int file_version +){ + enable_shared_from_this_helper & h = + ar.template get_helper< + enable_shared_from_this_helper + >(); + + shared_ptr sp = t.shared_from_this(); + h.record(sp); +} + +} // serialization +} // boost + +class Base { + friend class boost::serialization::access; + + template + void serialize(Archive & ar, const unsigned int version) + { + ar & BOOST_SERIALIZATION_NVP(m_base); + } +protected: + Base() {} + virtual ~Base() {} // "virtual" forces RTTI, to enable serialization of Derived from Base pointer +public: + int m_base; +}; + +class Derived : public Base, public boost::enable_shared_from_this { + friend class boost::serialization::access; + + template + void serialize(Archive & ar, const unsigned int version) + { + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base); + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( + boost::enable_shared_from_this + ); + ar & BOOST_SERIALIZATION_NVP(m_derived); + } +public: + boost::shared_ptr SharedPtr() { return shared_from_this(); } + int m_derived; + Derived() {} + ~Derived() {} +}; +// The following is required to enable serialization from Base pointer +BOOST_CLASS_EXPORT(Derived) + +// This test passes +void test_passes(){ + std::stringstream ss; + { + boost::shared_ptr d(new Derived()); + d->m_base = 1; + d->m_derived = 2; + + // Get a raw pointer to Derived + Derived* raw_d = d.get(); + + // Verify base and derived members + BOOST_CHECK(raw_d->m_base==1); + BOOST_CHECK(raw_d->m_derived==2); + + // verify shared_from_this + BOOST_CHECK(d == raw_d->SharedPtr()); + + boost::archive::text_oarchive oa(ss); + oa & BOOST_SERIALIZATION_NVP(d); + } + { + // Deserialize it back into a vector of shared_ptr + boost::shared_ptr d; + ss.seekg(0); + boost::archive::text_iarchive ia(ss); + ia & BOOST_SERIALIZATION_NVP(d); + + // Get a raw pointer to Derived + Derived* raw_d = d.get(); + + // Verify base and derived members + BOOST_CHECK(raw_d->m_base==1); + BOOST_CHECK(raw_d->m_derived==2); + + // verify shared_from_this + BOOST_CHECK(d == raw_d->SharedPtr()); + } +} + +// This test fails +void test_fails(){ + std::stringstream ss; + { + boost::shared_ptr b(new Derived()); + Derived* raw_d1 = static_cast(b.get()); + raw_d1->m_base = 1; + raw_d1->m_derived = 2; + + // Get a raw pointer to Derived via shared_ptr + Derived* raw_d = static_cast(b.get()); + + // Verify base and derived members + BOOST_CHECK(raw_d->m_base==1); + BOOST_CHECK(raw_d->m_derived==2); + + // verify shared_from_this + boost::shared_ptr d = raw_d->SharedPtr(); + BOOST_CHECK(d == b); + // Serialize the vector + boost::archive::text_oarchive oa(ss); + oa & BOOST_SERIALIZATION_NVP(b); + } + { + // Deserialize it back into a vector of shared_ptr + ss.seekg(0); + boost::archive::text_iarchive ia(ss); + boost::shared_ptr b; + ia & BOOST_SERIALIZATION_NVP(b); + + // Get a raw pointer to Derived via shared_ptr + Derived* raw_d = static_cast(b.get()); + // Verify base and derived members + BOOST_CHECK(raw_d->m_base==1); + BOOST_CHECK(raw_d->m_derived==2); + + // verify shared_from_this + // FAIL: The following line throws bad_weak_ptr exception + boost::shared_ptr d = raw_d->SharedPtr(); + BOOST_CHECK(d == b); + } +} + +int test_main(int /*argc*/, char * /*argv */[]){ + test_fails(); + test_passes(); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_exported.cpp b/src/boost/libs/serialization/test/test_exported.cpp new file mode 100644 index 000000000..2134c6c30 --- /dev/null +++ b/src/boost/libs/serialization/test/test_exported.cpp @@ -0,0 +1,104 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_exported.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include +#include + +#include +#include // remove +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include +#include +#include + +#include "test_tools.hpp" + +#include +#include + +#include "polymorphic_derived1.hpp" +#include "polymorphic_derived2.hpp" + +// save exported polymorphic class +void save_exported(const char *testfile) +{ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa_implementation(os, TEST_ARCHIVE_FLAGS); + boost::archive::polymorphic_oarchive & oa_interface = oa_implementation; + + const polymorphic_base *rb1 = new polymorphic_derived1; + const polymorphic_base *rb2 = new polymorphic_derived2; + + // export will permit correct serialization + // through a pointer to a base class + std::cout << "saving polymorphic_derived1 (no_rtti)\n"; + oa_interface << BOOST_SERIALIZATION_NVP(rb1); + + std::cout << "saving polymorphic_derived2\n"; + oa_interface << BOOST_SERIALIZATION_NVP(rb2); + + delete rb1; + delete rb2; +} + +// save exported polymorphic class +void load_exported(const char *testfile) +{ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia_implementation(is, TEST_ARCHIVE_FLAGS); + boost::archive::polymorphic_iarchive & ia_interface = ia_implementation; + + polymorphic_base *rb1 = NULL; + polymorphic_base *rb2 = NULL; + + // export will permit correct serialization + // through a pointer to a base class + ia_interface >> BOOST_SERIALIZATION_NVP(rb1); + BOOST_CHECK_MESSAGE( + boost::serialization::type_info_implementation + ::type::get_const_instance() + == + * boost::serialization::type_info_implementation + ::type::get_const_instance().get_derived_extended_type_info(*rb1), + "restored pointer b1 not of correct type" + ); + + ia_interface >> BOOST_SERIALIZATION_NVP(rb2); + BOOST_CHECK_MESSAGE( + boost::serialization::type_info_implementation + ::type::get_const_instance() + == + * boost::serialization::type_info_implementation + ::type::get_const_instance().get_derived_extended_type_info(*rb2), + "restored pointer b2 not of correct type" + ); + + delete rb1; + delete rb2; +} + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + save_exported(testfile); + load_exported(testfile); + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_forward_list.cpp b/src/boost/libs/serialization/test/test_forward_list.cpp new file mode 100644 index 000000000..ac8af3d9b --- /dev/null +++ b/src/boost/libs/serialization/test/test_forward_list.cpp @@ -0,0 +1,51 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_forward_list.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULL +#include +#include // remove +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include +#include + +#include +#include "test_tools.hpp" + +#include "A.hpp" +#include "A.ipp" + +int test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + std::forward_list aslist; + aslist.push_front(A()); + aslist.push_front(A()); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("aslist", aslist); + } + std::forward_list aslist1;{ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("aslist", aslist1); + } + BOOST_CHECK(aslist == aslist1); + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF + diff --git a/src/boost/libs/serialization/test/test_forward_list_ptrs.cpp b/src/boost/libs/serialization/test/test_forward_list_ptrs.cpp new file mode 100644 index 000000000..a5bfab084 --- /dev/null +++ b/src/boost/libs/serialization/test/test_forward_list_ptrs.cpp @@ -0,0 +1,94 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_list.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include +#include + +#include +#include // remove +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include +#include +#include + +#include +#include "test_tools.hpp" + +#include + +#include "A.hpp" +#include "A.ipp" + +template +struct ptr_equal_to { + BOOST_STATIC_ASSERT(::boost::is_pointer< T >::value); + bool operator()(T const _Left, T const _Right) const + { + if(NULL == _Left && NULL == _Right) + return true; + if(typeid(*_Left) != typeid(*_Right)) + return false; + return *_Left == *_Right; + } +}; + +#include +void test_forward_list(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + std::forward_list aslist; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + aslist.push_front(new A); + aslist.push_front(new A); + oa << boost::serialization::make_nvp("aslist", aslist); + } + std::forward_list aslist1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("aslist", aslist1); + BOOST_CHECK( + std::equal( + aslist.begin(), + aslist.end(), + aslist1.begin(), + ptr_equal_to() + ) + ); + } + std::for_each( + aslist.begin(), + aslist.end(), + boost::checked_deleter() + ); + std::for_each( + aslist1.begin(), + aslist1.end(), + boost::checked_deleter() + ); + std::remove(testfile); +} + +int test_main( int /* argc */, char* /* argv */[] ) +{ + test_forward_list(); + + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_helper_support.cpp b/src/boost/libs/serialization/test/test_helper_support.cpp new file mode 100644 index 000000000..b216543ba --- /dev/null +++ b/src/boost/libs/serialization/test/test_helper_support.cpp @@ -0,0 +1,129 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_helper_support.cpp + +// (C) Copyright 2008 Joaquin M Lopez Munoz. +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include +#include +#include + +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" +#include +#include +#include +#include +#include + +// this test uses a special string (my_string) whose contents are shared +// and hence saved in the archive only once. We need a helper in order +// to convert my_string into a serializable type + +class my_string:public std::string +{ + typedef std::string super; + +public: + my_string(){} + my_string(const super & str): super(str){} + my_string & operator=(const super& rhs) { + super::operator=(rhs); + return *this; + } +}; + +struct my_string_helper +{ + typedef std::vector table; + table m_t; +}; + +BOOST_SERIALIZATION_SPLIT_FREE(my_string) + +namespace boost { +namespace serialization { + +template +void save(Archive & ar, const my_string & str, const unsigned int /* version */) +{ + void (* const idx)(Archive &, const my_string &, const unsigned int) = & save; + void * const id = reinterpret_cast(idx); + my_string_helper & msh = ar.template get_helper(id); + + my_string_helper::table t = msh.m_t; + my_string_helper::table::iterator it = std::find(t.begin(), t.end(), str); + if(it == t.end()){ + my_string_helper::table::size_type s = t.size(); + ar << make_nvp("index", s); + t.push_back(str); + ar << make_nvp("string", static_cast(str)); + } + else{ + my_string_helper::table::size_type s = it - t.begin(); + ar << make_nvp("index", s); + } +} + +template +void load(Archive & ar, my_string & str, const unsigned int /* version */) +{ + void (* const idx)(Archive &, my_string &, const unsigned int) = & load; + void * const id = reinterpret_cast(idx); + my_string_helper & msh = ar.template get_helper(id); + + my_string_helper::table t = msh.m_t; + + my_string_helper::table::size_type s; + ar >> make_nvp("index", s); + t.reserve(s); + if(s >= t.size()){ + std::string tmp; + ar >> make_nvp("string", tmp); + str = tmp; + t.push_back(str); + } + else{ + str = t[s]; + } +} + +} // namespace serialization +} // namespace boost + +int test_main( int /* argc */, char* /* argv */[] ){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + std::vector v1; + for(int i=0; i<1000; ++i){ + v1.push_back(my_string(boost::lexical_cast(i % 100))); + } + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("vector", v1); + } + { + std::vector v2; + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("vector", v2); + BOOST_CHECK(v1 == v2); + } + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_inclusion.cpp b/src/boost/libs/serialization/test/test_inclusion.cpp new file mode 100644 index 000000000..f42639a69 --- /dev/null +++ b/src/boost/libs/serialization/test/test_inclusion.cpp @@ -0,0 +1,43 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_const.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct foo +{ + int x; +private: + friend class boost::serialization::access; + + template + void serialize(Archive & ar, const unsigned int version) + { + // In compilers implementing 2-phase lookup, the call to + // make_nvp is resolved even if foo::serialize() is never + // instantiated. + ar & boost::serialization::make_nvp("x",x); + } +}; + +int +main(int /*argc*/, char * /*argv*/[]){ + return 0; +} diff --git a/src/boost/libs/serialization/test/test_inclusion2.cpp b/src/boost/libs/serialization/test/test_inclusion2.cpp new file mode 100644 index 000000000..dfecccdcf --- /dev/null +++ b/src/boost/libs/serialization/test/test_inclusion2.cpp @@ -0,0 +1,25 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_const.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include +#include + +void f() +{ + std::stringstream iss; + boost::archive::binary_iarchive ar(iss); + std::vector out; + ar >> out; +} + +int +main(int /*argc*/, char * /*argv*/[]){ + return 0; +} diff --git a/src/boost/libs/serialization/test/test_interators.cpp b/src/boost/libs/serialization/test/test_interators.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/src/boost/libs/serialization/test/test_interrupts.cpp b/src/boost/libs/serialization/test/test_interrupts.cpp new file mode 100644 index 000000000..6dd599dd7 --- /dev/null +++ b/src/boost/libs/serialization/test/test_interrupts.cpp @@ -0,0 +1,147 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_array.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include + +#include +#include +#include +#include // equal +#include // remove +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" +#include +#include +#include +#include + +struct test_dummy_out { + template + void save(Archive &, const unsigned int /*version*/) const { + throw boost::archive::archive_exception( + boost::archive::archive_exception::other_exception + ); + } + template + void load(Archive & ar, const unsigned int version){ + } + BOOST_SERIALIZATION_SPLIT_MEMBER() + test_dummy_out(){} +}; + +template +int test_out(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + const T t; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + { + BOOST_TRY { + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + bool exception_invoked = false; + BOOST_TRY { + oa << BOOST_SERIALIZATION_NVP(t); + } + BOOST_CATCH (boost::archive::archive_exception const& ae){ + BOOST_CHECK( + boost::archive::archive_exception::other_exception + == ae.code + ); + exception_invoked = true; + } + BOOST_CATCH_END + BOOST_CHECK(exception_invoked); + } + BOOST_CATCH (boost::archive::archive_exception const& ae){} + BOOST_CATCH_END + } + os.close(); + } + std::remove(testfile); + return EXIT_SUCCESS; +} + +struct test_dummy_in { + template + void save(Archive & /* ar */, const unsigned int /*version*/) const { + } + template + void load(Archive & /* ar */, const unsigned int /*version*/){ + throw boost::archive::archive_exception( + boost::archive::archive_exception::other_exception + ); + } + BOOST_SERIALIZATION_SPLIT_MEMBER() + test_dummy_in(){} +}; + +template +int test_in(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + const T t; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + { + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << BOOST_SERIALIZATION_NVP(t); + } + os.close(); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + { + T t1; + BOOST_TRY { + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + bool exception_invoked = false; + BOOST_TRY { + ia >> BOOST_SERIALIZATION_NVP(t1); + } + BOOST_CATCH (boost::archive::archive_exception const& ae){ + BOOST_CHECK( + boost::archive::archive_exception::other_exception + == ae.code + ); + exception_invoked = true; + } + BOOST_CATCH_END + BOOST_CHECK(exception_invoked); + } + BOOST_CATCH (boost::archive::archive_exception const& ae){} + BOOST_CATCH_END + } + is.close(); + } + std::remove(testfile); + return EXIT_SUCCESS; +} + +int test_main( int /* argc */, char* /* argv */[] ) +{ + int res; + res = test_out(); + if (res != EXIT_SUCCESS) + return EXIT_FAILURE; + res = test_in(); + if (res != EXIT_SUCCESS) + return EXIT_FAILURE; + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_iterators.cpp b/src/boost/libs/serialization/test/test_iterators.cpp new file mode 100644 index 000000000..259e24672 --- /dev/null +++ b/src/boost/libs/serialization/test/test_iterators.cpp @@ -0,0 +1,257 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_iterators.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +//#include // std::copy, std::equal +#include +#include // for rand +#include +#include // used to test stream iterators +#include +#include // begin +#include // setlocale + +#include +#ifdef BOOST_NO_STDC_NAMESPACE +namespace std{ + using ::rand; +} +#endif + +#include +#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) +#include +#endif + +#ifndef BOOST_NO_CWCHAR +#include +#include +#endif +#include +#include +#include +#include +#include + +#include "test_tools.hpp" + +#ifndef BOOST_NO_CWCHAR + +void test_wchar_from_mb(const wchar_t *la, const char * a, const unsigned int size){ + typedef boost::archive::iterators::wchar_from_mb translator; + BOOST_CHECK(( + std::equal( + translator(a), + translator(a + size), + la + ) + )); +} + +void test_mb_from_wchar(const char * a, const wchar_t *la, const unsigned int size){ + typedef boost::archive::iterators::mb_from_wchar translator; + BOOST_CHECK( + std::equal( + translator(la), + translator(la + size), + a + ) + ); +} + +void test_roundtrip(const wchar_t * la){ + std::size_t s = std::wcslen(la); + std::vector a; + { + typedef boost::archive::iterators::mb_from_wchar translator; + std::copy( + translator(la), + translator(la + s), + std::back_inserter(a) + ); + // note: wchar_from_mb NEEDS a termination null in order to function! + a.push_back(static_cast(0)); + } + BOOST_CHECK(a.size() > 0); + std::vector la2; + { + typedef boost::archive::iterators::wchar_from_mb::const_iterator> translator; + std::copy( + translator(a.begin()), + translator(), + std::back_inserter(la2) + ); + } + BOOST_CHECK(la2.size() == s); + BOOST_CHECK(std::equal(la, la + s, la2.begin())); +} +#endif + +template +void test_xml_escape( + const CharType * xml_escaped, + const CharType * xml, + unsigned int size +){ + typedef boost::archive::iterators::xml_escape translator; + + BOOST_CHECK( + std::equal( + translator(xml), + translator(xml + size), + xml_escaped + ) + ); +} + +template +void test_xml_unescape( + const CharType * xml, + const CharType * xml_escaped, + unsigned int size +){ + + // test xml_unescape + typedef boost::archive::iterators::xml_unescape translator; + + BOOST_CHECK( + std::equal( + translator(xml_escaped), + translator(xml_escaped + size), + xml + ) + ); +} + +template +void test_transform_width(unsigned int size){ + // test transform_width + char rawdata[8]; + + char * rptr; + for(rptr = rawdata + size; rptr-- > rawdata;) + *rptr = static_cast(0xff & std::rand()); + + // convert 8 to 6 bit characters + typedef boost::archive::iterators::transform_width< + char *, BitsOut, BitsIn + > translator1; + + std::vector vout; + + std::copy( + translator1(static_cast(rawdata)), + translator1(rawdata + size), + std::back_inserter(vout) + ); + + // check to see we got the expected # of characters out + if(0 == size) + BOOST_CHECK(vout.size() == 0); + else + BOOST_CHECK(vout.size() == (size * BitsIn - 1 ) / BitsOut + 1); + + typedef boost::archive::iterators::transform_width< + std::vector::iterator, BitsIn, BitsOut + > translator2; + + std::vector vin; + std::copy( + translator2(vout.begin()), + translator2(vout.end()), + std::back_inserter(vin) + ); + + // check to see we got the expected # of characters out + BOOST_CHECK(vin.size() == size); + + BOOST_CHECK( + std::equal( + rawdata, + rawdata + size, + vin.begin() + ) + ); +} + +template +void test_stream_iterators( + const CharType * test_data, + unsigned int size +){ + std::basic_stringstream ss; + boost::archive::iterators::ostream_iterator osi = + boost::archive::iterators::ostream_iterator(ss); + std::copy(test_data, test_data + size, osi); + + BOOST_CHECK(size == ss.str().size()); + + boost::archive::iterators::istream_iterator isi = + boost::archive::iterators::istream_iterator(ss); + BOOST_CHECK(std::equal(test_data, test_data + size,isi)); +} + +int +test_main(int /* argc */, char* /* argv */ [] ) +{ + const char xml[] = "<+>+&+\"+'"; + const char xml_escaped[] = "<+>+&+"+'"; + test_xml_escape( + xml_escaped, + xml, + sizeof(xml) / sizeof(char) - 1 + ); + test_xml_unescape( + xml, + xml_escaped, + sizeof(xml_escaped) / sizeof(char) - 1 + ); + + + #ifndef BOOST_NO_CWCHAR + const wchar_t wxml[] = L"<+>+&+\"+'"; + const wchar_t wxml_escaped[] = L"<+>+&+"+'"; + test_xml_escape( + wxml_escaped, + wxml, + sizeof(wxml) / sizeof(wchar_t) - 1 + ); + test_xml_unescape( + wxml, + wxml_escaped, + sizeof(wxml_escaped) / sizeof(wchar_t) - 1 + ); + + const char b[] = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"; + const wchar_t lb[] = L"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"; + test_mb_from_wchar(b, lb, sizeof(lb) / sizeof(wchar_t) - 1); + test_wchar_from_mb(lb, b, sizeof(b) / sizeof(char) - 1); + + const char a[] = "abcdefghijklmnopqrstuvwxyz"; + const wchar_t la[] = L"abcdefghijklmnopqrstuvwxyz"; + test_mb_from_wchar(a, la, sizeof(la) / sizeof(wchar_t) - 1); + test_wchar_from_mb(la, a, sizeof(a) / sizeof(char) - 1); + + test_roundtrip(L"z\u00df\u6c34\U0001f34c"); + + test_stream_iterators(la, sizeof(la)/sizeof(wchar_t) - 1); + #endif + + test_stream_iterators(a, sizeof(a) - 1); + + test_transform_width<6, 8>(0); + test_transform_width<6, 8>(1); + test_transform_width<6, 8>(2); + test_transform_width<6, 8>(3); + test_transform_width<6, 8>(4); + test_transform_width<6, 8>(5); + test_transform_width<6, 8>(6); + test_transform_width<6, 8>(7); + test_transform_width<6, 8>(8); + + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_iterators_base64.cpp b/src/boost/libs/serialization/test/test_iterators_base64.cpp new file mode 100644 index 000000000..1f772c6d7 --- /dev/null +++ b/src/boost/libs/serialization/test/test_iterators_base64.cpp @@ -0,0 +1,105 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_iterators.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#include + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#include +#include // size_t + +#include +#ifdef BOOST_NO_STDC_NAMESPACE +namespace std{ + using ::rand; + using ::size_t; +} +#endif + +#include +#include +#include +#include +#include + +#include "test_tools.hpp" + +#include + +template +void test_base64(unsigned int size){ + CharType rawdata[150]; + CharType * rptr; + for(rptr = rawdata + size; rptr-- > rawdata;) + *rptr = static_cast(std::rand()& 0xff); + + // convert to base64 + typedef std::list text_base64_type; + text_base64_type text_base64; + + typedef + boost::archive::iterators::insert_linebreaks< + boost::archive::iterators::base64_from_binary< + boost::archive::iterators::transform_width< + CharType * + ,6 + ,sizeof(CharType) * 8 + > + > + ,76 + > + translate_out; + + std::copy( + translate_out(static_cast(rawdata)), + translate_out(rawdata + size), + std::back_inserter(text_base64) + ); + + // convert from base64 to binary and compare with the original + typedef + boost::archive::iterators::transform_width< + boost::archive::iterators::binary_from_base64< + boost::archive::iterators::remove_whitespace< + typename text_base64_type::iterator + > + >, + sizeof(CharType) * 8, + 6 + > translate_in; + + BOOST_CHECK( + std::equal( + rawdata, + rawdata + size, + translate_in(text_base64.begin()) + ) + ); + +} + +int +test_main( int /*argc*/, char* /*argv*/[] ) +{ + test_base64(1); + test_base64(2); + test_base64(3); + test_base64(4); + test_base64(150); + #ifndef BOOST_NO_CWCHAR + test_base64(1); + test_base64(2); + test_base64(3); + test_base64(4); + test_base64(150); + #endif + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_list.cpp b/src/boost/libs/serialization/test/test_list.cpp new file mode 100644 index 000000000..c76757ef5 --- /dev/null +++ b/src/boost/libs/serialization/test/test_list.cpp @@ -0,0 +1,59 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_list.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULL +#include + +#include +#include // remove +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include +#include "test_tools.hpp" + +#include "A.hpp" +#include "A.ipp" + +#include +void test_list(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + std::list alist; + alist.push_back(A()); + alist.push_back(A()); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("alist",alist); + } + + std::list alist1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("alist",alist1); + } + BOOST_CHECK(alist == alist1); + std::remove(testfile); +} + +int test_main( int /* argc */, char* /* argv */[] ) +{ + test_list(); + return EXIT_SUCCESS; +} + +// EOF + diff --git a/src/boost/libs/serialization/test/test_list_ptrs.cpp b/src/boost/libs/serialization/test/test_list_ptrs.cpp new file mode 100644 index 000000000..f5597fab8 --- /dev/null +++ b/src/boost/libs/serialization/test/test_list_ptrs.cpp @@ -0,0 +1,98 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_list.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include +#include + +#include +#include // remove +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include +#include +#include + +#include +#include "test_tools.hpp" + +#include + +#include "A.hpp" +#include "A.ipp" + +template +struct ptr_equal_to { + BOOST_STATIC_ASSERT(::boost::is_pointer< T >::value); + bool operator()(T const _Left, T const _Right) const + { + if(NULL == _Left && NULL == _Right) + return true; + if(typeid(*_Left) != typeid(*_Right)) + return false; + return *_Left == *_Right; + } +}; + +#include +void test_list(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + std::list alist; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + A * free_a_ptr = new A; + alist.push_back(free_a_ptr); + alist.push_back(new A); + // verify that first element is the same as the free pointer + BOOST_CHECK((*alist.begin()) == free_a_ptr); + oa << boost::serialization::make_nvp("alist", alist); + oa << boost::serialization::make_nvp("free_a_ptr", free_a_ptr); + } + std::list alist1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + A * free_a_ptr1; + ia >> boost::serialization::make_nvp("alist", alist1); + ia >> boost::serialization::make_nvp("free_a_ptr", free_a_ptr1); + BOOST_CHECK( + alist.size() == alist1.size() + && std::equal(alist.begin(),alist.end(),alist1.begin(),ptr_equal_to()) + ); + // verify that first element is the same as the free pointer + BOOST_CHECK((*alist1.begin()) == free_a_ptr1); + } + + std::for_each( + alist.begin(), + alist.end(), + boost::checked_deleter() + ); + std::for_each( + alist1.begin(), + alist1.end(), + boost::checked_deleter() + ); + std::remove(testfile); +} + +int test_main( int /* argc */, char* /* argv */[] ) +{ + test_list(); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_map.cpp b/src/boost/libs/serialization/test/test_map.cpp new file mode 100644 index 000000000..21e3f51ac --- /dev/null +++ b/src/boost/libs/serialization/test/test_map.cpp @@ -0,0 +1,149 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_map.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2014 Jim Bell +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // std::copy +#include +#include +#include // size_t, NULL + +#include +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::rand; + using ::size_t; +} +#endif + +#include "test_tools.hpp" + +#include +#include + +#include "A.hpp" +#include "A.ipp" + +/////////////////////////////////////////////////////// +// a key value initialized with a random value for use +// in testing STL map serialization +struct random_key { + friend class boost::serialization::access; + template + void serialize( + Archive & ar, + const unsigned int /* file_version */ + ){ + ar & boost::serialization::make_nvp("random_key", m_i); + } + int m_i; + random_key() : m_i(std::rand()){}; + bool operator<(const random_key &rhs) const { + return m_i < rhs.m_i; + } + bool operator==(const random_key &rhs) const { + return m_i == rhs.m_i; + } + operator std::size_t () const { // required by hash_map + return m_i; + } +}; + +void +test_map(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + BOOST_MESSAGE("map"); + // test map of objects + std::map amap; + amap.insert(std::make_pair(random_key(), A())); + amap.insert(std::make_pair(random_key(), A())); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("amap", amap); + } + std::map amap1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("amap", amap1); + } + BOOST_CHECK(amap == amap1); + std::remove(testfile); +} + +void +test_map_2(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + BOOST_MESSAGE("map_2"); + std::pair a(11, 22); + std::map b; + b[0] = 0; + b[-1] = -1; + b[1] = 1; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + std::pair * const pa = &a; + std::map * const pb = &b; + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << BOOST_SERIALIZATION_NVP(pb); + oa << BOOST_SERIALIZATION_NVP(pa); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + std::pair *pa = 0; + std::map *pb = 0; + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> BOOST_SERIALIZATION_NVP(pb); + ia >> BOOST_SERIALIZATION_NVP(pa); + delete pa; + delete pb; + } + std::remove(testfile); +} + +void +test_multimap(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + BOOST_MESSAGE("multimap"); + std::multimap amultimap; + amultimap.insert(std::make_pair(random_key(), A())); + amultimap.insert(std::make_pair(random_key(), A())); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("amultimap", amultimap); + } + std::multimap amultimap1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("amultimap", amultimap1); + } + BOOST_CHECK(amultimap == amultimap1); + std::remove(testfile); +} + +int test_main( int /* argc */, char* /* argv */[] ) +{ + test_map(); + test_map_2(); + test_multimap(); + + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_map_boost_unordered.cpp b/src/boost/libs/serialization/test/test_map_boost_unordered.cpp new file mode 100644 index 000000000..300ae4db1 --- /dev/null +++ b/src/boost/libs/serialization/test/test_map_boost_unordered.cpp @@ -0,0 +1,142 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_map.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2014 Jim Bell +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // std::copy +#include +#include +#include // size_t, NULL + +#include +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::rand; + using ::size_t; +} +#endif + +#include "test_tools.hpp" + +#include +#include + +#include "A.hpp" +#include "A.ipp" + +/////////////////////////////////////////////////////// +// a key value initialized with a random value for use +// in testing STL map serialization +struct random_key { + friend class boost::serialization::access; + template + void serialize( + Archive & ar, + const unsigned int /* file_version */ + ){ + ar & boost::serialization::make_nvp("random_key", m_i); + } + int m_i; + random_key() : m_i(std::rand()){}; + bool operator<(const random_key &rhs) const { + return m_i < rhs.m_i; + } + bool operator==(const random_key &rhs) const { + return m_i == rhs.m_i; + } + operator std::size_t () const { // required by hash_map + return m_i; + } +}; + +#include +#include // requires changeset [69520]; Ticket #5254 + +namespace boost { + template<> + struct hash{ + std::size_t operator()(const random_key& r) const { + return static_cast(r); + } + }; +} // namespace std + +void +test_unordered_map(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + BOOST_CHECKPOINT("unordered_map"); + // test unordered_map of objects + boost::unordered_map anunordered_map; + anunordered_map.insert(std::make_pair(random_key(), A())); + anunordered_map.insert(std::make_pair(random_key(), A())); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("anunorderedmap",anunordered_map); + } + boost::unordered_map anunordered_map1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("anunorderedmap",anunordered_map1); + } + + std::vector< std::pair > tvec, tvec1; + std::copy(anunordered_map.begin(), anunordered_map.end(), std::back_inserter(tvec)); + std::sort(tvec.begin(), tvec.end()); + std::copy(anunordered_map1.begin(), anunordered_map1.end(), std::back_inserter(tvec1)); + std::sort(tvec1.begin(), tvec1.end()); + BOOST_CHECK(tvec == tvec1); + + std::remove(testfile); +} + +void +test_unordered_multimap(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + BOOST_CHECKPOINT("unordered_multimap"); + boost::unordered_multimap anunordered_multimap; + anunordered_multimap.insert(std::make_pair(random_key(), A())); + anunordered_multimap.insert(std::make_pair(random_key(), A())); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("anunordered_multimap", anunordered_multimap); + } + boost::unordered_multimap anunordered_multimap1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("anunordered_multimap", anunordered_multimap1); + } + std::vector< std::pair > tvec, tvec1; + tvec.clear(); + tvec1.clear(); + std::copy(anunordered_multimap.begin(), anunordered_multimap.end(), std::back_inserter(tvec)); + std::sort(tvec.begin(), tvec.end()); + std::copy(anunordered_multimap1.begin(), anunordered_multimap1.end(), std::back_inserter(tvec1)); + std::sort(tvec1.begin(), tvec1.end()); + BOOST_CHECK(tvec == tvec1); + std::remove(testfile); +} + +int test_main( int /* argc */, char* /* argv */[] ) +{ + test_unordered_map(); + test_unordered_multimap(); + + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_map_hashed.cpp b/src/boost/libs/serialization/test/test_map_hashed.cpp new file mode 100644 index 000000000..8b009cd28 --- /dev/null +++ b/src/boost/libs/serialization/test/test_map_hashed.cpp @@ -0,0 +1,139 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_map.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2014 Jim Bell +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // std::copy +#include +#include +#include // size_t, NULL + +#include +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::rand; + using ::size_t; +} +#endif + +#include "test_tools.hpp" + +#include +#include + +#include "A.hpp" +#include "A.ipp" + +/////////////////////////////////////////////////////// +// a key value initialized with a random value for use +// in testing STL map serialization +struct random_key { + friend class boost::serialization::access; + template + void serialize( + Archive & ar, + const unsigned int /* file_version */ + ){ + ar & boost::serialization::make_nvp("random_key", m_i); + } + int m_i; + random_key() : m_i(std::rand()){}; + bool operator<(const random_key &rhs) const { + return m_i < rhs.m_i; + } + bool operator==(const random_key &rhs) const { + return m_i == rhs.m_i; + } + operator std::size_t () const { // required by hash_map + return m_i; + } +}; + +#include + +namespace BOOST_STD_EXTENSION_NAMESPACE { + template<> + struct hash{ + std::size_t operator()(const random_key& r) const { + return static_cast(r); + } + }; +} // namespace BOOST_STD_EXTENSION_NAMESPACE + +void +test_hash_map(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + BOOST_CHECKPOINT("hash_map"); + // test hash_map of objects + BOOST_STD_EXTENSION_NAMESPACE::hash_map ahash_map; + ahash_map.insert(std::make_pair(random_key(), A())); + ahash_map.insert(std::make_pair(random_key(), A())); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("ahashmap",ahash_map); + } + BOOST_STD_EXTENSION_NAMESPACE::hash_map ahash_map1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("ahashmap",ahash_map1); + } + + std::vector< std::pair > tvec, tvec1; + std::copy(ahash_map.begin(), ahash_map.end(), std::back_inserter(tvec)); + std::sort(tvec.begin(), tvec.end()); + std::copy(ahash_map1.begin(), ahash_map1.end(), std::back_inserter(tvec1)); + std::sort(tvec1.begin(), tvec1.end()); + BOOST_CHECK(tvec == tvec1); + + std::remove(testfile); +} + +void +test_hash_multimap(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + BOOST_CHECKPOINT("hash_multimap"); + BOOST_STD_EXTENSION_NAMESPACE::hash_multimap ahash_multimap; + ahash_multimap.insert(std::make_pair(random_key(), A())); + ahash_multimap.insert(std::make_pair(random_key(), A())); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("ahash_multimap", ahash_multimap); + } + BOOST_STD_EXTENSION_NAMESPACE::hash_multimap ahash_multimap1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("ahash_multimap", ahash_multimap1); + } + std::vector< std::pair > tvec, tvec1; + tvec.clear(); + tvec1.clear(); + std::copy(ahash_multimap.begin(), ahash_multimap.end(), std::back_inserter(tvec)); + std::sort(tvec.begin(), tvec.end()); + std::copy(ahash_multimap1.begin(), ahash_multimap1.end(), std::back_inserter(tvec1)); + std::sort(tvec1.begin(), tvec1.end()); + BOOST_CHECK(tvec == tvec1); + std::remove(testfile); +} +int test_main( int /* argc */, char* /* argv */[] ) +{ + test_hash_map(); + test_hash_multimap(); + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_map_unordered.cpp b/src/boost/libs/serialization/test/test_map_unordered.cpp new file mode 100644 index 000000000..631f1f225 --- /dev/null +++ b/src/boost/libs/serialization/test/test_map_unordered.cpp @@ -0,0 +1,142 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_map.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2014 Jim Bell +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // std::copy +#include +#include +#include // size_t, NULL + +#include +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::rand; + using ::size_t; +} +#endif + +#include "test_tools.hpp" + +#include +#include + +#include "A.hpp" +#include "A.ipp" + +/////////////////////////////////////////////////////// +// a key value initialized with a random value for use +// in testing STL map serialization +struct random_key { + friend class boost::serialization::access; + template + void serialize( + Archive & ar, + const unsigned int /* file_version */ + ){ + ar & boost::serialization::make_nvp("random_key", m_i); + } + int m_i; + random_key() : m_i(std::rand()){}; + bool operator<(const random_key &rhs) const { + return m_i < rhs.m_i; + } + bool operator==(const random_key &rhs) const { + return m_i == rhs.m_i; + } + operator std::size_t () const { // required by hash_map + return m_i; + } +}; + +#include +#include // requires changeset [69520]; Ticket #5254 + +namespace std { + template<> + struct hash{ + std::size_t operator()(const random_key& r) const { + return static_cast(r); + } + }; +} // namespace std + +void +test_unordered_map(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + BOOST_CHECKPOINT("unordered_map"); + // test unordered_map of objects + std::unordered_map anunordered_map; + anunordered_map.insert(std::make_pair(random_key(), A())); + anunordered_map.insert(std::make_pair(random_key(), A())); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("anunorderedmap",anunordered_map); + } + std::unordered_map anunordered_map1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("anunorderedmap",anunordered_map1); + } + + std::vector< std::pair > tvec, tvec1; + std::copy(anunordered_map.begin(), anunordered_map.end(), std::back_inserter(tvec)); + std::sort(tvec.begin(), tvec.end()); + std::copy(anunordered_map1.begin(), anunordered_map1.end(), std::back_inserter(tvec1)); + std::sort(tvec1.begin(), tvec1.end()); + BOOST_CHECK(tvec == tvec1); + + std::remove(testfile); +} + +void +test_unordered_multimap(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + BOOST_CHECKPOINT("unordered_multimap"); + std::unordered_multimap anunordered_multimap; + anunordered_multimap.insert(std::make_pair(random_key(), A())); + anunordered_multimap.insert(std::make_pair(random_key(), A())); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("anunordered_multimap", anunordered_multimap); + } + std::unordered_multimap anunordered_multimap1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("anunordered_multimap", anunordered_multimap1); + } + std::vector< std::pair > tvec, tvec1; + tvec.clear(); + tvec1.clear(); + std::copy(anunordered_multimap.begin(), anunordered_multimap.end(), std::back_inserter(tvec)); + std::sort(tvec.begin(), tvec.end()); + std::copy(anunordered_multimap1.begin(), anunordered_multimap1.end(), std::back_inserter(tvec1)); + std::sort(tvec1.begin(), tvec1.end()); + BOOST_CHECK(tvec == tvec1); + std::remove(testfile); +} + +int test_main( int /* argc */, char* /* argv */[] ) +{ + test_unordered_map(); + test_unordered_multimap(); + + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_mi.cpp b/src/boost/libs/serialization/test/test_mi.cpp new file mode 100644 index 000000000..cf9df90c3 --- /dev/null +++ b/src/boost/libs/serialization/test/test_mi.cpp @@ -0,0 +1,135 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_mi.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// test of serialization of base classes with multiple inheritance +// contributed by Peter Dimov + +#include +#include +#include + +#include +#include // remove +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" + +#include +#include + +class A +{ +private: + friend class boost::serialization::access; + int x; + template + void serialize(Archive &ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_NVP(x); + } +public: + explicit A(int x = 0): x(x) {} + virtual ~A(); // = 0; + int get_x() const + { + return x; + } +}; + +inline A::~A() +{ +} + +class B +{ +private: + int y; + friend class boost::serialization::access; + template + void serialize(Archive &ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_NVP(y); + } +public: + explicit B(int y = 0): y(y) {} + virtual ~B(){} + int get_y() const + { + return y; + } +}; + +class C: public A, public B +{ +private: + friend class boost::serialization::access; + template + void serialize(Archive &ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(A); + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(B); + } +public: + C(){} + C(int x, int y): A(x), B(y){} +}; + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + C * pc = new C(1, 2); + A * pa = pc; + B * pb = pc; + + BOOST_CHECK(pa == pc); + BOOST_CHECK(pb == pc); + + int x = pa->get_x(); + int y = pb->get_y(); + + std::cout << "pa->get_x(): " << pa->get_x() << std::endl; + std::cout << "pb->get_y(): " << pb->get_y() << std::endl; + + { + test_ostream ofs(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(ofs); + oa << BOOST_SERIALIZATION_NVP(pc); + oa << BOOST_SERIALIZATION_NVP(pa); + oa << BOOST_SERIALIZATION_NVP(pb); + } + + delete pc; + pc = NULL; + pa = NULL; + pb = NULL; + + { + test_istream ifs(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(ifs); + ia >> BOOST_SERIALIZATION_NVP(pc); + ia >> BOOST_SERIALIZATION_NVP(pa); + ia >> BOOST_SERIALIZATION_NVP(pb); + } + + BOOST_CHECK(pa == pc); + BOOST_CHECK(pb == pc); + + BOOST_CHECK(x == pa->get_x()); + BOOST_CHECK(y == pb->get_y()); + + std::cout << "pa->get_x(): " << pa->get_x() << std::endl; + std::cout << "pb->get_y(): " << pb->get_y() << std::endl; + + delete pc; + std::remove(testfile); + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_mult_archive_types.cpp b/src/boost/libs/serialization/test/test_mult_archive_types.cpp new file mode 100644 index 000000000..b211489af --- /dev/null +++ b/src/boost/libs/serialization/test/test_mult_archive_types.cpp @@ -0,0 +1,124 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_mult_archive_types.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#include + +#include +#include // remove +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include +#include +#include +#include +#include "test_tools.hpp" + +#include +#include + +// This is a simple class. It contains a counter of the number +// of objects of this class which have been instantiated. +class A +{ +private: + friend class boost::serialization::access; + int x; + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_NVP(x); + } +public: + static int count; + A(){++count;} // default constructor + virtual ~A(){--count;} // default destructor +}; + +BOOST_CLASS_EXPORT(A) + +// B is a subclass of A +class B : public A +{ +private: + friend class boost::serialization::access; + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(A); + } +public: + static int count; + B() : A() {}; + virtual ~B() {}; +}; + +BOOST_CLASS_EXPORT(B) + +int A::count = 0; + +// Run tests by serializing two shared_ptrs into an archive of type +// OARCH, clearing them (deleting the objects) and then reloading the +// objects back from an archive of type OARCH. +template +void test_save_and_load(A * first, A * second) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + // Save + { + std::ofstream os(testfile); + OA oa(os); + oa << BOOST_SERIALIZATION_NVP(first); + oa << BOOST_SERIALIZATION_NVP(second); + } + + // Clear the pointers, thereby destroying the objects they contain + first = NULL; + second = NULL; + + // Load + { + std::ifstream is(testfile); + IA ia(is); + ia >> BOOST_SERIALIZATION_NVP(first); + ia >> BOOST_SERIALIZATION_NVP(second); + } + BOOST_CHECK(first == second); + std::remove(testfile); +} + +using namespace boost::archive; + +// This does the tests +int test_main(int /* argc */, char * /* argv */[]) +{ + // Try to save and load pointers to As, to a text archive + A * a = new A; + A * a1 = a; + test_save_and_load(a, a1); + + // Try to save and load pointers to Bs, to a text archive + B * b = new B; + B * b1 = b; + test_save_and_load(b, b1); + + // Try to save and load pointers to As, to an xml archive + test_save_and_load(a, a1); + + // Try to save and load pointers to Bs, to an xml archive + test_save_and_load(b, b1); + + delete a; + delete b; + + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_multi_shared_lib.cpp b/src/boost/libs/serialization/test/test_multi_shared_lib.cpp new file mode 100644 index 000000000..978e95916 --- /dev/null +++ b/src/boost/libs/serialization/test/test_multi_shared_lib.cpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_multi_shared_lib.cpp: test that implementation of extented_type_info +// works when using multiple shared libraries +// +// This reproduces a crash that occurred when multiple shared libraries were +// using Boost.Serialization built statically. That causes core singletons to be +// instantiated in each shared library separately. Due to some destruction order +// mixup in the context of shared libraries on linux it is possible, that +// singletons accessed in destructors of other singletons are already destructed. +// Accessing them will then lead to a crash or memory corruption. +// For this we need 2 shared libraries, linked against static boost. They need to +// instantiate extended_type_info_typeid with different types, either by serializing +// 2 types (which will do that internally) or by accessing the singletons directly. + +// (C) Copyright 2018 Alexander Grund +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include + +// Both shall instantiate different(!) singletons and return true +BOOST_SYMBOL_IMPORT bool f(); +BOOST_SYMBOL_IMPORT bool g(); + +int main(int argc, char**){ + if(f() && g()) + return 0; + return 1; +} diff --git a/src/boost/libs/serialization/test/test_multiple_inheritance.cpp b/src/boost/libs/serialization/test/test_multiple_inheritance.cpp new file mode 100644 index 000000000..08c304f83 --- /dev/null +++ b/src/boost/libs/serialization/test/test_multiple_inheritance.cpp @@ -0,0 +1,125 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_multiple_inheritance.cpp + +// (C) Copyright 2009 Robert Ramey. +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// test of serialization library for multiple inheritence situations + +#include +#include + +#include +#include // remove +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" + +#include +#include +#include +#include + +struct Base1 { + int m_x; + Base1(){} + Base1(int x) : m_x(1 + x) {} + virtual ~Base1() {} + bool operator==(Base1 & rhs) const { + return m_x == rhs.m_x; + } + // serialize + friend class boost::serialization::access; + template + void serialize(Archive & ar, const unsigned int /* file_version */) { + ar & BOOST_SERIALIZATION_NVP(m_x); + } +}; + +//BOOST_CLASS_EXPORT(Base1) + +struct Base2 { + int m_x; + Base2(){} + Base2(int x) : m_x(2 + x) {} + virtual ~Base2() {} + bool operator==(Base2 & rhs) const { + return m_x == rhs.m_x; + } + // serialize + friend class boost::serialization::access; + template + void serialize(Archive & ar, const unsigned int /* file_version */) { + ar & BOOST_SERIALIZATION_NVP(m_x); + } +}; + +//BOOST_CLASS_EXPORT(Base2) + +struct Sub : + public Base1, + public Base2 +{ + int m_x; + Sub(){} + Sub(int x) : + Base1(x), + Base2(x), + m_x(x) + {} + bool operator==(Sub & rhs) const { + if(! Base2::operator==(rhs)) + return false; + if(! Base1::operator==(rhs)) + return false; + return m_x == rhs.m_x; + } + virtual ~Sub() {} + + // serialize + friend class boost::serialization::access; + template + void serialize(Archive &ar, const unsigned int /* file_version */) + { + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base1); + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base2); + ar & BOOST_SERIALIZATION_NVP(m_x); + } +}; + +BOOST_CLASS_EXPORT(Sub) + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + Base2 * pb2; + { + // serialize + pb2 = new Sub(2); + + test_ostream ofs(testfile); + test_oarchive oa(ofs); + oa << boost::serialization::make_nvp("Base2", pb2); + } + Base2 * pb2_1; + { + // de-serialize + test_istream ifs(testfile); + test_iarchive ia(ifs); + ia >> boost::serialization::make_nvp("Base2", pb2_1); + } + Sub *s1 = dynamic_cast(pb2); + BOOST_CHECK(0 != s1); + Sub *s2 = dynamic_cast(pb2_1); + BOOST_CHECK(0 != s2); + BOOST_CHECK(*s1 == *s2); + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_multiple_ptrs.cpp b/src/boost/libs/serialization/test/test_multiple_ptrs.cpp new file mode 100644 index 000000000..b1da84227 --- /dev/null +++ b/src/boost/libs/serialization/test/test_multiple_ptrs.cpp @@ -0,0 +1,50 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_archive_derivation.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include +#include + +#include +#include // remove +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" + +#include "D.hpp" +#include "A.ipp" + +int test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + const A a; + A a1; + + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("a", a); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("a", a1); + } + BOOST_CHECK(a == a1); + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_native_array.cpp b/src/boost/libs/serialization/test/test_native_array.cpp new file mode 100644 index 000000000..a08cdcc0e --- /dev/null +++ b/src/boost/libs/serialization/test/test_native_array.cpp @@ -0,0 +1,103 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_array.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include + +#include +#include +#include +#include // equal +#include // remove +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif +#include "test_tools.hpp" +#include +#include + +#include "A.hpp" +#include "A.ipp" + +template +int test_native_array(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + // test array of objects + const T a_array[10]={T(),T(),T(),T(),T(),T(),T(),T(),T(),T()}; + const T b_array[2][3]={{T(),T(),T()},{T(),T(),T()}}; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + { + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("a_array", a_array); + oa << boost::serialization::make_nvp("b_array", b_array); + } + os.close(); + } + { + T a_array1[10]; + T b_array1[2][3]; + test_istream is(testfile, TEST_STREAM_FLAGS); + { + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("a_array", a_array1); + ia >> boost::serialization::make_nvp("b_array", b_array1); + } + is.close(); + BOOST_CHECK(std::equal(& a_array[0], & a_array[10], & a_array1[0])); + BOOST_CHECK(b_array[0][0] == b_array1[0][0]); + BOOST_CHECK(b_array[1][0] == b_array1[1][0]); + } + { + T a_array1[9]; + T b_array1[2][3]; + test_istream is(testfile, TEST_STREAM_FLAGS); + { + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + bool exception_invoked = false; + BOOST_TRY { + ia >> boost::serialization::make_nvp("a_array", a_array1); + ia >> boost::serialization::make_nvp("b_array", b_array1); + } + BOOST_CATCH (boost::archive::archive_exception const& ae){ + BOOST_CHECK( + boost::archive::archive_exception::array_size_too_short + == ae.code + ); + exception_invoked = true; + } + BOOST_CATCH_END + BOOST_CHECK(exception_invoked); + } + is.close(); + } + std::remove(testfile); + return EXIT_SUCCESS; +} + +int test_main( int /* argc */, char* /* argv */[] ){ + int res; + + // native array + res = test_native_array(); + if (res != EXIT_SUCCESS) + return EXIT_FAILURE; + // test an int array for which optimized versions should be available + res = test_native_array(); + if (res != EXIT_SUCCESS) + return EXIT_FAILURE; + + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_new_operator.cpp b/src/boost/libs/serialization/test/test_new_operator.cpp new file mode 100644 index 000000000..c7b1e7e62 --- /dev/null +++ b/src/boost/libs/serialization/test/test_new_operator.cpp @@ -0,0 +1,154 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_new_operator.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULL +#include // remove +#include +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include + +#include "test_tools.hpp" + +#include "A.hpp" +#include "A.ipp" + +class ANew : public A { + friend class boost::serialization::access; + template + void serialize(Archive & ar, const unsigned /*file_version*/){ + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(A); + } +public: + static unsigned int m_new_calls; + static unsigned int m_delete_calls; + // implement class specific new/delete in terms standard + // implementation - we're testing serialization + // not "new" here. + static void * operator new(size_t s){ + ++m_new_calls; + return ::operator new(s); + } + static void operator delete(void *p, std::size_t){ + ++m_delete_calls; + ::operator delete(p); + } +}; +unsigned int ANew::m_new_calls = 0; +unsigned int ANew::m_delete_calls = 0; + +class ANew1 : public A { + friend class boost::serialization::access; + template + void serialize(Archive & ar, const unsigned /*file_version*/){ + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(A); + } +public: + static unsigned int m_new_calls; + static unsigned int m_delete_calls; + // implement class specific new/delete in terms standard + // implementation - we're testing serialization + // not "new" here. + static void * operator new(size_t s){ + ++m_new_calls; + return ::operator new(s); + } + static void operator delete(void *p){ + ++m_delete_calls; + ::operator delete(p); + } +}; +unsigned int ANew1::m_new_calls = 0; +unsigned int ANew1::m_delete_calls = 0; + + +class ANew2 : public A { + friend class boost::serialization::access; + template + void serialize(Archive & ar, const unsigned /*file_version*/){ + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(A); + } +public: + static unsigned int m_new_calls; + static unsigned int m_delete_calls; + // implement class specific new/delete in terms standard + // implementation - we're testing serialization + // not "new" here. + static void * operator new(size_t s){ + ++m_new_calls; + return ::operator new(s); + } +}; +unsigned int ANew2::m_new_calls = 0; +unsigned int ANew2::m_delete_calls = 0; + +template +int test(){ + const char * testfile = boost::archive::tmpnam(NULL); + + BOOST_REQUIRE(NULL != testfile); + + + T *ta = new T(); + + BOOST_CHECK(1 == T::m_new_calls); + BOOST_CHECK(0 == T::m_delete_calls); + + T *ta1 = NULL; + + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("ta", ta); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("ta", ta1); + } + BOOST_CHECK(ta != ta1); + BOOST_CHECK(*ta == *ta1); + + BOOST_CHECK(2 == T::m_new_calls); + BOOST_CHECK(0 == T::m_delete_calls); + + std::remove(testfile); + + delete ta; + delete ta1; + + BOOST_CHECK(2 == T::m_new_calls); + BOOST_CHECK(2 == T::m_delete_calls); + + return EXIT_SUCCESS; +} +int test_main( int /* argc */, char* /* argv */[] ){ + if(EXIT_SUCCESS != test()) + return EXIT_FAILURE; + if(EXIT_SUCCESS != test()) + return EXIT_FAILURE; + // Note the following test fails. To see why this is, look into the file + // iserializer line # 247. Feel free to send a patch to detect the absense + // of a class specific delete. + /* + if(EXIT_SUCCESS != test()) + return EXIT_FAILURE; + */ + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_no_rtti.cpp b/src/boost/libs/serialization/test/test_no_rtti.cpp new file mode 100644 index 000000000..38ccd2dc0 --- /dev/null +++ b/src/boost/libs/serialization/test/test_no_rtti.cpp @@ -0,0 +1,166 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_no_rtti.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// note: this program tests the inter-operability of different +// extended typeinfo systems. In this example, one class is +// identified using the default RTTI while the other uses a custom +// system based on the export key. +// +// As this program uses RTTI for one of the types, the test will fail +// on a system for which RTTI is not enabled or not existent. + +#include +#include +#include + +#include +#include // remove +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include +#include +#include + +#include "test_tools.hpp" + +#include +#include + +#include "polymorphic_base.hpp" + +#include "polymorphic_derived1.hpp" + +#include "polymorphic_derived2.hpp" + +// save derived polymorphic class +void save_derived(const char *testfile) +{ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa_implementation(os, TEST_ARCHIVE_FLAGS); + boost::archive::polymorphic_oarchive & oa_interface = oa_implementation; + + polymorphic_derived1 *rd1 = new polymorphic_derived1; + polymorphic_derived2 *rd2 = new polymorphic_derived2; + + std::cout << "saving polymorphic_derived1 (no_rtti)\n"; + oa_interface << BOOST_SERIALIZATION_NVP(rd1); + + std::cout << "saving polymorphic_derived2\n"; + oa_interface << BOOST_SERIALIZATION_NVP(rd2); + + const polymorphic_base *rb1 = rd1; + polymorphic_base *rb2 = rd2; + std::cout << "saving polymorphic_derived1 (no_rtti) through base (rtti)\n"; + oa_interface << BOOST_SERIALIZATION_NVP(rb1); + std::cout << "saving polymorphic_derived2 through base\n"; + oa_interface << BOOST_SERIALIZATION_NVP(rb2); + + delete rd1; + delete rd2; +} + +void load_derived(const char *testfile) +{ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia_implementation(is, TEST_ARCHIVE_FLAGS); + boost::archive::polymorphic_iarchive & ia_interface = ia_implementation; + + polymorphic_derived1 *rd1 = NULL; + polymorphic_derived2 *rd2 = NULL; + + std::cout << "loading polymorphic_derived1 (no_rtti)\n"; + ia_interface >> BOOST_SERIALIZATION_NVP(rd1); + BOOST_CHECK_MESSAGE( + boost::serialization::type_info_implementation< + polymorphic_derived1 + >::type::get_const_instance() + == + * boost::serialization::type_info_implementation< + polymorphic_derived1 + >::type::get_const_instance().get_derived_extended_type_info(*rd1) + , + "restored pointer d1 not of correct type" + ); + + std::cout << "loading polymorphic_derived2\n"; + ia_interface >> BOOST_SERIALIZATION_NVP(rd2); + BOOST_CHECK_MESSAGE( + boost::serialization::type_info_implementation< + polymorphic_derived2 + >::type::get_const_instance() + == + * boost::serialization::type_info_implementation< + polymorphic_derived2 + >::type::get_const_instance().get_derived_extended_type_info(*rd2) + , + "restored pointer d2 not of correct type" + ); + polymorphic_base *rb1 = NULL; + polymorphic_base *rb2 = NULL; + + // the above opereration registers the derived classes as a side + // effect. Hence, instances can now be correctly serialized through + // a base class pointer. + std::cout << "loading polymorphic_derived1 (no_rtti) through base (no_rtti)\n"; + ia_interface >> BOOST_SERIALIZATION_NVP(rb1); + + BOOST_CHECK_MESSAGE( + rb1 == dynamic_cast(rd1), + "serialized pointers not correctly restored" + ); + + BOOST_CHECK_MESSAGE( + boost::serialization::type_info_implementation< + polymorphic_derived1 + >::type::get_const_instance() + == + * boost::serialization::type_info_implementation< + polymorphic_base + >::type::get_const_instance().get_derived_extended_type_info(*rb1) + , + "restored pointer b1 not of correct type" + ); + std::cout << "loading polymorphic_derived2 through base (no_rtti)\n"; + ia_interface >> BOOST_SERIALIZATION_NVP(rb2); + + BOOST_CHECK_MESSAGE( + rb2 == dynamic_cast(rd2), + "serialized pointers not correctly restored" + ); + BOOST_CHECK_MESSAGE( + boost::serialization::type_info_implementation< + polymorphic_derived2 + >::type::get_const_instance() + == + * boost::serialization::type_info_implementation< + polymorphic_base + >::type::get_const_instance().get_derived_extended_type_info(*rb2) + , + "restored pointer b2 not of correct type" + ); + delete rb1; + delete rb2; +} + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + save_derived(testfile); + load_derived(testfile); + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_non_default_ctor.cpp b/src/boost/libs/serialization/test/test_non_default_ctor.cpp new file mode 100644 index 000000000..33780ce80 --- /dev/null +++ b/src/boost/libs/serialization/test/test_non_default_ctor.cpp @@ -0,0 +1,198 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_non_default_ctor.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +// this tests: +// a) non-intrusive method of implementing serialization +// b) usage of a non-default constructor + +#include // NULL +#include // remove() +#include +#include // for rand() +#include +#include +#include +#include + +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::rand; + using ::remove; + #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(UNDER_CE) + using ::numeric_limits; + #endif +} +#endif + +#include +#include "test_tools.hpp" + +/////////////////////////////////////////////////////// +// simple class test - using non-intrusive syntax +// illustrates the usage of the non-intrusve syntax +class A +{ + friend class boost::serialization::access; + + // note const values can only be initialized with a non + // non-default constructor + const int i; + + signed char s; + unsigned char t; + signed int u; + unsigned int v; + float w; + double x; + bool operator==(const A & rhs) const; + bool operator<(const A & rhs) const; + + template + void serialize(Archive & ar,const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_NVP(s); + ar & BOOST_SERIALIZATION_NVP(t); + ar & BOOST_SERIALIZATION_NVP(u); + ar & BOOST_SERIALIZATION_NVP(v); + ar & BOOST_SERIALIZATION_NVP(w); + ar & BOOST_SERIALIZATION_NVP(x); + } + A(const A & rhs); + A & operator=(const A & rhs); +public: + static int count; + const int & get_i() const { + return i; + } + A(int i_); + ~A(); +}; + +int A::count = 0; + +A::A(int i_) : + i(i_), + s(static_cast(0xff & std::rand())), + t(static_cast(0xff & std::rand())), + u(std::rand()), + v(std::rand()), + w((float)std::rand() / std::rand()), + x((double)std::rand() / std::rand()) +{ + ++count; +} + +A::~A(){ + --count; +} + +bool A::operator==(const A &rhs) const +{ + return + s == rhs.s + && t == rhs.t + && u == rhs.u + && v == rhs.v + && std::abs( boost::math::float_distance(w, rhs.w)) < 2 + && std::abs( boost::math::float_distance(x, rhs.x)) < 2 + ; +} + +bool A::operator<(const A &rhs) const +{ + if(! (s == rhs.s) ) + return s < rhs.s; + if(! (t == rhs.t) ) + return t < rhs.t; + if(! (u == rhs.u) ) + return t < rhs.u; + if(! (v == rhs.v) ) + return t < rhs.v; + if(std::abs( boost::math::float_distance(w, rhs.w)) > 1) + return false; + if(std::abs( boost::math::float_distance(x, rhs.x)) > 1) + return false; + return false; +} + +namespace boost { +namespace serialization { + +template +inline void save_construct_data( + Archive & ar, + const A * a, + const unsigned int /* file_version */ +){ + // variable used for construction + ar << boost::serialization::make_nvp("i", a->get_i()); +} + +template +inline void load_construct_data( + Archive & ar, + A * a, + const unsigned int /* file_version */ +){ + int i; + ar >> boost::serialization::make_nvp("i", i); + ::new(a)A(i); +} + +} // serialization +} // namespace boost + +void save(const char * testfile){ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + A a(2); + + oa << BOOST_SERIALIZATION_NVP(a); + + // save a copy pointer to this item + A *pa1 = &a; + oa << BOOST_SERIALIZATION_NVP(pa1); + + // save pointer to a new object + A *pa2 = new A(4); + oa << BOOST_SERIALIZATION_NVP(pa2); + + delete pa2; +} +void load(const char * testfile){ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + + A a(4); + ia >> BOOST_SERIALIZATION_NVP(a); + + A *pa1; + ia >> BOOST_SERIALIZATION_NVP(pa1); + BOOST_CHECK_MESSAGE(pa1 == &a, "Copy of pointer not correctly restored"); + + A *pa2; + ia >> BOOST_SERIALIZATION_NVP(pa2); + BOOST_CHECK_MESSAGE(pa2 != &a, "Pointer not correctly restored"); + + delete pa2; +} + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + save(testfile); + load(testfile); + BOOST_CHECK(0 == A::count); + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_non_default_ctor2.cpp b/src/boost/libs/serialization/test/test_non_default_ctor2.cpp new file mode 100644 index 000000000..ef855f3af --- /dev/null +++ b/src/boost/libs/serialization/test/test_non_default_ctor2.cpp @@ -0,0 +1,144 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_non_default_ctor2.cpp + +// (C) Copyright 2002 Martin Ecker. +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +// this tests complex usage of non-default constructor. Specifically +// the case where a constructor serializes a pointer member. + +#include + +#include + +#include "test_tools.hpp" + +class IntValueHolder +{ +public: + IntValueHolder() + : value(0) + {} + + IntValueHolder(int newvalue) + : value(newvalue) + {} + + int GetValue() const { return value; } + +private: + int value; + + friend class boost::serialization::access; + + template + void serialize(ArchiveT& ar, const unsigned int /* file_version */) + { + ar & BOOST_SERIALIZATION_NVP(value); + } +}; + +class FloatValueHolder +{ +public: + FloatValueHolder() + : value(0) + {} + + FloatValueHolder(float newvalue) + : value(newvalue) + {} + + float GetValue() const { return value; } + +private: + float value; + + friend class boost::serialization::access; + + template + void serialize(ArchiveT& ar, const unsigned int /* file_version */) + { + ar & BOOST_SERIALIZATION_NVP(value); + } +}; + +class A +{ +public: + A(const IntValueHolder& initialValue) + : value(initialValue), floatValue(new FloatValueHolder(10.0f)) + {} + + ~A() + { + delete floatValue; + } + + IntValueHolder value; + FloatValueHolder* floatValue; + +private: + friend class boost::serialization::access; + + template + void serialize(ArchiveT& ar, const unsigned int /* file_version */) + { + ar & BOOST_SERIALIZATION_NVP(floatValue); + } +}; + +namespace boost { +namespace serialization { + +template +void save_construct_data( + ArchiveT& archive, + const A* p, + const unsigned int /*version*/ +){ + archive & boost::serialization::make_nvp("initialValue", p->value); +} + +template +void load_construct_data( + ArchiveT& archive, + A* p, + const unsigned int /*version*/ +){ + IntValueHolder initialValue; + archive & boost::serialization::make_nvp("initialValue", initialValue); + + ::new (p) A(initialValue); +} + +} // serialization +} // namespace boost + +int test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + A* a = new A(5); + + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << BOOST_SERIALIZATION_NVP(a); + } + + A* a_new; + + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> BOOST_SERIALIZATION_NVP(a_new); + } + delete a; + delete a_new; + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_non_intrusive.cpp b/src/boost/libs/serialization/test/test_non_intrusive.cpp new file mode 100644 index 000000000..b3c3536c9 --- /dev/null +++ b/src/boost/libs/serialization/test/test_non_intrusive.cpp @@ -0,0 +1,174 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_non_intrursive.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +// this tests: +// a) non-intrusive method of implementing serialization +// b) usage of a non-default constructor + +#include +#include // for rand() +#include // remove +#include +#include +#include +#include + +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::rand; + using ::remove; + #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(UNDER_CE) + using ::numeric_limits; + #endif +} +#endif + +#include +#include "test_tools.hpp" + +/////////////////////////////////////////////////////// +// simple class test - using non-intrusive syntax +// illustrates the usage of the non-intrusve syntax +class A +{ +public: + signed char s; + unsigned char t; + signed int u; + unsigned int v; + float w; + double x; + A(); + bool operator==(const A & rhs) const; + bool operator<(const A & rhs) const; +}; + +A::A() : + s(static_cast(0xff & std::rand())), + t(static_cast(0xff & std::rand())), + u(std::rand()), + v(std::rand()), + w((float)std::rand() / std::rand()), + x((double)std::rand() / std::rand()) +{ +} + +bool A::operator==(const A &rhs) const +{ + return + s == rhs.s + && t == rhs.t + && u == rhs.u + && v == rhs.v + && std::abs( boost::math::float_distance(w, rhs.w)) < 2 + && std::abs( boost::math::float_distance(x, rhs.x)) < 2 + ; +} + +bool A::operator<(const A &rhs) const +{ + if(! (s == rhs.s) ) + return s < rhs.s; + if(! (t == rhs.t) ) + return t < rhs.t; + if(! (u == rhs.u) ) + return t < rhs.u; + if(! (v == rhs.v) ) + return t < rhs.v; + if(std::abs( boost::math::float_distance(w, rhs.w)) > 1) + return false; + if(std::abs( boost::math::float_distance(x, rhs.x)) > 1) + return false; + return false; +} + +// note the following: + +// function specializations must be defined in the appropriate +// namespace - boost::serialization +namespace boost { +namespace serialization { + +// This first set of overrides should work with all compilers. + +// The last argument is int while the default versions +// defined in serialization.hpp have long as the last argument. +// This is part of the work around for compilers that don't +// support correct function template ordering. These functions +// are always called with 0 (i.e. an int) as the last argument. +// Our specialized versions also have int as the last argument +// while the default versions have a long as the last argument. +// This makes our specialized versions a better match than the +// default ones as no argument conversion is required to make a match +template +void serialize( + Archive & ar, + A & a, + const unsigned int /* file_version */ +){ + ar & boost::serialization::make_nvp("s", a.s); + ar & boost::serialization::make_nvp("t", a.t); + ar & boost::serialization::make_nvp("u", a.u); + ar & boost::serialization::make_nvp("v", a.v); + ar & boost::serialization::make_nvp("w", a.w); + ar & boost::serialization::make_nvp("x", a.x); +} + +} // serialization +} // namespace boost + +void save(const char * testfile){ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + A a; + + oa << BOOST_SERIALIZATION_NVP(a); + + // save a copy pointer to this item + A *pa1 = &a; + oa << BOOST_SERIALIZATION_NVP(pa1); + + // save pointer to a new object + A *pa2 = new A(); + oa << BOOST_SERIALIZATION_NVP(pa2); + + delete pa2; +} + +void load(const char * testfile){ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + + A a; + ia >> BOOST_SERIALIZATION_NVP(a); + + A *pa1; + ia >> BOOST_SERIALIZATION_NVP(pa1); + BOOST_CHECK_MESSAGE(pa1 == &a, "Copy of pointer not correctly restored"); + + A *pa2; + ia >> BOOST_SERIALIZATION_NVP(pa2); + BOOST_CHECK_MESSAGE(pa2 != &a, "Pointer not correctly restored"); + + delete pa2; +} + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + save(testfile); + load(testfile); + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_not_serializable.cpp b/src/boost/libs/serialization/test/test_not_serializable.cpp new file mode 100644 index 000000000..178f383d1 --- /dev/null +++ b/src/boost/libs/serialization/test/test_not_serializable.cpp @@ -0,0 +1,47 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_non_serializable.cpp: test implementation level trait + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// test implementation level "not_serializable" +// should fail compilation + +#include + +#include "test_tools.hpp" +#include +#include + +class A +{ +}; + +BOOST_CLASS_IMPLEMENTATION(A, boost::serialization::not_serializable) + +void out(A & a) +{ + test_ostream os("testfile", TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << BOOST_SERIALIZATION_NVP(a); +} + +void in(A & a) +{ + test_istream is("testfile", TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> BOOST_SERIALIZATION_NVP(a); +} + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + A a; + out(a); + in(a); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_null_ptr.cpp b/src/boost/libs/serialization/test/test_null_ptr.cpp new file mode 100644 index 000000000..7868799e8 --- /dev/null +++ b/src/boost/libs/serialization/test/test_null_ptr.cpp @@ -0,0 +1,89 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_null_ptr.cpp: test implementation level trait + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULL +#include // remove +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" +#include + +class polymorphic_base +{ + friend class boost::serialization::access; + template + void serialize(Archive & /* ar */, const unsigned int /* file_version */){ + } +public: + virtual ~polymorphic_base(){}; +}; + +class polymorphic_derived1 : public polymorphic_base +{ + friend class boost::serialization::access; + template + void serialize(Archive &ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(polymorphic_base); + } +}; + +// save unregistered polymorphic classes +void save(const char *testfile) +{ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + + polymorphic_base *rb1 = NULL; + polymorphic_derived1 *rd1 = NULL; + + oa << BOOST_SERIALIZATION_NVP(rb1); + oa << BOOST_SERIALIZATION_NVP(rd1); +} + +// load unregistered polymorphic classes +void load(const char *testfile) +{ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + + polymorphic_derived1 dummy; + + polymorphic_base *rb1 = & dummy; + polymorphic_derived1 *rd1 = & dummy; + + ia >> BOOST_SERIALIZATION_NVP(rb1); + BOOST_CHECK_MESSAGE(NULL == rb1, "Null pointer not restored"); + + ia >> BOOST_SERIALIZATION_NVP(rd1); + BOOST_CHECK_MESSAGE(NULL == rd1, "Null pointer not restored"); + + delete rb1; + delete rd1; +} + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + save(testfile); + load(testfile); + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_nvp.cpp b/src/boost/libs/serialization/test/test_nvp.cpp new file mode 100644 index 000000000..5390db23a --- /dev/null +++ b/src/boost/libs/serialization/test/test_nvp.cpp @@ -0,0 +1,68 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_nvp.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULL +#include // remove +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" + +#include + +#include "B.hpp" +#include "A.ipp" + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + B b, b1; + + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << BOOST_SERIALIZATION_NVP(b); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> BOOST_SERIALIZATION_NVP(b1); + } + BOOST_CHECK(b == b1); + + B *bptr = &b; + B *bptr1; + + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << BOOST_SERIALIZATION_NVP(bptr); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> BOOST_SERIALIZATION_NVP(bptr1); + } + BOOST_CHECK(b == *bptr1); + + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_object.cpp b/src/boost/libs/serialization/test/test_object.cpp new file mode 100644 index 000000000..54bdc30bb --- /dev/null +++ b/src/boost/libs/serialization/test/test_object.cpp @@ -0,0 +1,70 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_object.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// test implementation level "object_serializable" +// should pass compilation and execution + +#include // NULL +#include // remove +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" + +#include +#include + +class A +{ + friend class boost::serialization::access; + template + void serialize(Archive & /* ar */, const unsigned int /* file_version */){ + } +}; + +BOOST_CLASS_IMPLEMENTATION(A, boost::serialization::object_serializable) + +// note: version can be assigned only to objects whose implementation +// level is object_class_info. So, doing the following will result in +// a static assertion +// BOOST_CLASS_VERSION(A, 2); + +void out(const char *testfile, A & a) +{ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << BOOST_SERIALIZATION_NVP(a); +} + +void in(const char *testfile, A & a) +{ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> BOOST_SERIALIZATION_NVP(a); +} + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + A a; + out(testfile, a); + in(testfile, a); + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_optional.cpp b/src/boost/libs/serialization/test/test_optional.cpp new file mode 100644 index 000000000..579056317 --- /dev/null +++ b/src/boost/libs/serialization/test/test_optional.cpp @@ -0,0 +1,96 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_optional.cpp + +// (C) Copyright 2004 Pavel Vozenilek +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULL +#include // remove +#include + +#include + +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include +#include "test_tools.hpp" + +#include +#include + +struct A { + int m_x; + template + void serialize(Archive & ar, const unsigned int /* version */){ + ar & boost::serialization::make_nvp("x", m_x); + }; + bool operator==(const A & rhs) const { + return m_x == rhs.m_x; + } + // note that default constructor is not trivial + A() : + m_x(0) + {} + A(int x) : + m_x(x) + {} +}; + +int test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + const boost::optional aoptional1; + const boost::optional aoptional2(123); + const boost::optional aoptional3; + A a(1); + const boost::optional aoptional4(a); + const boost::optional aoptional5; + const boost::optional aoptional6(& a); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("aoptional1",aoptional1); + oa << boost::serialization::make_nvp("aoptional2",aoptional2); + oa << boost::serialization::make_nvp("aoptional3",aoptional3); + oa << boost::serialization::make_nvp("aoptional4",aoptional4); + oa << boost::serialization::make_nvp("aoptional5",aoptional5); + oa << boost::serialization::make_nvp("aoptional6",aoptional6); + } + boost::optional aoptional1a(999); + boost::optional aoptional2a; + boost::optional aoptional3a; + boost::optional aoptional4a; + boost::optional aoptional5a; + boost::optional aoptional6a; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("aoptional1",aoptional1a); + ia >> boost::serialization::make_nvp("aoptional2",aoptional2a); + ia >> boost::serialization::make_nvp("aoptional3",aoptional3a); + ia >> boost::serialization::make_nvp("aoptional4",aoptional4a); + ia >> boost::serialization::make_nvp("aoptional5",aoptional5a); + ia >> boost::serialization::make_nvp("aoptional6",aoptional6a); + } + BOOST_CHECK(aoptional1 == aoptional1a); + BOOST_CHECK(aoptional2 == aoptional2a); + BOOST_CHECK(aoptional3 == aoptional3a); + BOOST_CHECK(aoptional4.get() == aoptional4a.get()); + BOOST_CHECK(aoptional5 == aoptional5a); + BOOST_CHECK(*aoptional6.get() == *aoptional6a.get()); + + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_p_helper.cpp b/src/boost/libs/serialization/test/test_p_helper.cpp new file mode 100644 index 000000000..a4404e89a --- /dev/null +++ b/src/boost/libs/serialization/test/test_p_helper.cpp @@ -0,0 +1,160 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_polymorphic.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULL +#include // remove +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +// the following is to ensure that when one of the libraries changes +// BJAM rebuilds and relinks the test. +/* +#include "polymorphic_text_archive.hpp" +#include "polymorphic_text_warchive.hpp" +#include "polymorphic_binary_archive.hpp" +#include "polymorphic_xml_archive.hpp" +#include "polymorphic_xml_warchive.hpp" +*/ + +#include +#include + +#include "test_tools.hpp" +#include +#include +#include +#include +// this test uses a special string (my_string) whose contents are shared +// and hence saved in the archive only once. We need a helper in order +// to convert my_string into a serializable type + +class my_string:public std::string +{ + typedef std::string super; + +public: + my_string(){} + my_string(const super & str): super(str){} + my_string & operator=(const super& rhs) { + super::operator=(rhs); + return *this; + } +}; + +struct my_string_helper +{ + typedef std::vector table; + table m_t; +}; + +BOOST_SERIALIZATION_SPLIT_FREE(my_string) + +namespace boost { +namespace serialization { + +template +void save(Archive & ar, const my_string & str, const unsigned int /* version */) +{ + void (* const idx)(Archive &, const my_string &, const unsigned int) = & save; + void * const id = reinterpret_cast(idx); + my_string_helper & msh = ar.template get_helper(id); + + my_string_helper::table t = msh.m_t; + my_string_helper::table::iterator it = std::find(t.begin(), t.end(), str); + if(it == t.end()){ + my_string_helper::table::size_type s = t.size(); + ar << make_nvp("index", s); + t.push_back(str); + ar << make_nvp("string", static_cast(str)); + } + else{ + my_string_helper::table::size_type s = it - t.begin(); + ar << make_nvp("index", s); + } +} + +template +void load(Archive & ar, my_string & str, const unsigned int /* version */) +{ + void (* const idx)(Archive &, my_string &, const unsigned int) = & load; + void * const id = reinterpret_cast(idx); + my_string_helper & msh = ar.template get_helper(id); + + my_string_helper::table t = msh.m_t; + + my_string_helper::table::size_type s; + ar >> make_nvp("index", s); + t.reserve(s); + if(s >= t.size()){ + std::string tmp; + ar >> make_nvp("string", tmp); + str = tmp; + t.push_back(str); + } + else{ + str = t[s]; + } +} + +} // namespace serialization +} // namespace boost +#include +#include + +int test_main(int /* argc */, char * /* argv */ []) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + std::vector v1; + for(int i=0; i<1000; ++i){ + v1.push_back(my_string(boost::lexical_cast(i % 100))); + } + + // test using using polymorphic implementation. + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa_implementation(os, TEST_ARCHIVE_FLAGS); + oa_implementation << boost::serialization::make_nvp("vector", v1); + } + { + std::vector v2; + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia_implementation(is, TEST_ARCHIVE_FLAGS); + ia_implementation >> boost::serialization::make_nvp("vector", v2); + BOOST_CHECK(v1 == v2); + } + std::remove(testfile); + + // test using using polymorphic interface. + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa_implementation(os, TEST_ARCHIVE_FLAGS); + boost::archive::polymorphic_oarchive & oa_interface = oa_implementation; + oa_interface << boost::serialization::make_nvp("vector", v1); + } + { + std::vector v2; + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia_implementation(is, TEST_ARCHIVE_FLAGS); + boost::archive::polymorphic_iarchive & ia_interface = ia_implementation; + ia_interface >> boost::serialization::make_nvp("vector", v2); + BOOST_CHECK(v1 == v2); + } + std::remove(testfile); + std::remove(testfile); + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_pimpl.cpp b/src/boost/libs/serialization/test/test_pimpl.cpp new file mode 100644 index 000000000..267bb5d1e --- /dev/null +++ b/src/boost/libs/serialization/test/test_pimpl.cpp @@ -0,0 +1,48 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_pimpl.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // for tmpnam + +#include +#include + +#include "test_tools.hpp" + +class B; + +class A { + friend boost::serialization::access; + B *pimpl; + template + void serialize(Archive & ar, const unsigned int file_version); +}; + +int test_main( int argc, char* argv[] ) +{ + char testfile[TMP_MAX]; + std::tmpnam(testfile); +// BOOST_REQUIRE(NULL != testfile); + + A a, a1; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os); + oa << BOOST_SERIALIZATION_NVP(a); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is); + BOOST_SERIALIZATION_NVP(a1); + } +// BOOST_CHECK(a != a1); + return 0; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_polymorphic.cpp b/src/boost/libs/serialization/test/test_polymorphic.cpp new file mode 100644 index 000000000..468809882 --- /dev/null +++ b/src/boost/libs/serialization/test/test_polymorphic.cpp @@ -0,0 +1,94 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_polymorphic.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULL +#include // remove +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +// the following is to ensure that when one of the libraries changes +// BJAM rebuilds and relinks the test. +/* +#include "polymorphic_text_archive.hpp" +#include "polymorphic_text_warchive.hpp" +#include "polymorphic_binary_archive.hpp" +#include "polymorphic_xml_archive.hpp" +#include "polymorphic_xml_warchive.hpp" +*/ + +#include "test_tools.hpp" + +#include +#include + +#include +#include "test_polymorphic_A.hpp" + +int test_main(int /* argc */, char * /* argv */ []) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + const data d; + data d1; + // test using using polymorphic interface + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa_implementation(os, TEST_ARCHIVE_FLAGS); + boost::archive::polymorphic_oarchive & oa_interface = oa_implementation; + oa_interface << BOOST_SERIALIZATION_NVP(d); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia_implementation(is, TEST_ARCHIVE_FLAGS); + boost::archive::polymorphic_iarchive & ia_interface = ia_implementation; + ia_interface >> BOOST_SERIALIZATION_NVP(d1); + } + BOOST_CHECK(d == d1); + std::remove(testfile); + + // test using using polymorphic implementation. + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa_implementation(os, TEST_ARCHIVE_FLAGS); + oa_implementation << BOOST_SERIALIZATION_NVP(d); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia_implementation(is, TEST_ARCHIVE_FLAGS); + ia_implementation >> BOOST_SERIALIZATION_NVP(d1); + } + BOOST_CHECK(d == d1); + std::remove(testfile); + + // test using using polymorphic interface. + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + boost::archive::polymorphic_oarchive * oa_implementation + = new test_oarchive(os, TEST_ARCHIVE_FLAGS); + *oa_implementation << BOOST_SERIALIZATION_NVP(d); + delete oa_implementation; + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + boost::archive::polymorphic_iarchive * ia_implementation + = new test_iarchive(is, TEST_ARCHIVE_FLAGS); + *ia_implementation >> BOOST_SERIALIZATION_NVP(d1); + delete ia_implementation; + } + BOOST_CHECK(d == d1); + std::remove(testfile); + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_polymorphic2.cpp b/src/boost/libs/serialization/test/test_polymorphic2.cpp new file mode 100644 index 000000000..12c27dbea --- /dev/null +++ b/src/boost/libs/serialization/test/test_polymorphic2.cpp @@ -0,0 +1,40 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_polymorphic2.cpp + +// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution +#include + +#include "test_tools.hpp" + +#include "test_polymorphic2.hpp" + +int test_main(int /*argc*/, char* /*argv*/[]) +{ + A *a = new B(); + a->i = 3; + + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa_implementation(os, TEST_ARCHIVE_FLAGS); + boost::archive::polymorphic_oarchive & opa = oa_implementation; + opa << BOOST_SERIALIZATION_NVP(a); + } + A *loaded = 0; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia_implementation(is, TEST_ARCHIVE_FLAGS); + boost::archive::polymorphic_iarchive & ipa = ia_implementation; + ipa >> BOOST_SERIALIZATION_NVP(loaded); + } + BOOST_CHECK(a->i == loaded->i); + delete a; + delete loaded; + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_polymorphic2.hpp b/src/boost/libs/serialization/test/test_polymorphic2.hpp new file mode 100644 index 000000000..c8a041fcf --- /dev/null +++ b/src/boost/libs/serialization/test/test_polymorphic2.hpp @@ -0,0 +1,43 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_polymorphic2.hpp + +// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution +namespace boost { +namespace archive { + class polymorphic_oarchive; + class polymorphic_iarchive; +} +} + +struct A { +public: + A() {} + virtual ~A() {} + + void serialize( + boost::archive::polymorphic_oarchive &ar, + const unsigned int /*version*/ + ); + void serialize( + boost::archive::polymorphic_iarchive &ar, + const unsigned int /*version*/ + ); + + int i; +}; + +struct B : A { + void serialize( + boost::archive::polymorphic_oarchive &ar, + const unsigned int /*version*/ + ); + void serialize( + boost::archive::polymorphic_iarchive &ar, + const unsigned int /*version*/ + ); +}; diff --git a/src/boost/libs/serialization/test/test_polymorphic2imp.cpp b/src/boost/libs/serialization/test/test_polymorphic2imp.cpp new file mode 100644 index 000000000..cad50dd89 --- /dev/null +++ b/src/boost/libs/serialization/test/test_polymorphic2imp.cpp @@ -0,0 +1,44 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_polymorphic2imp.cpp + +// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include +#include +#include + +#include "test_polymorphic2.hpp" + +void A::serialize( + boost::archive::polymorphic_oarchive &ar, + const unsigned int /*version*/ +){ + ar & BOOST_SERIALIZATION_NVP(i); +} +void A::serialize( + boost::archive::polymorphic_iarchive &ar, + const unsigned int /*version*/ +){ + ar & BOOST_SERIALIZATION_NVP(i); +} +// note: only the most derived classes need be exported +// BOOST_CLASS_EXPORT(A) + +void B::serialize( + boost::archive::polymorphic_oarchive &ar, + const unsigned int /*version*/ +){ + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(A); +} +void B::serialize( + boost::archive::polymorphic_iarchive &ar, + const unsigned int /*version*/ +){ + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(A); +} +BOOST_CLASS_EXPORT(B) diff --git a/src/boost/libs/serialization/test/test_polymorphic_A.cpp b/src/boost/libs/serialization/test/test_polymorphic_A.cpp new file mode 100644 index 000000000..a4f4d1a0b --- /dev/null +++ b/src/boost/libs/serialization/test/test_polymorphic_A.cpp @@ -0,0 +1,58 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_polymorphic_A.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include "test_polymorphic_A.hpp" +#include + +#include "A.hpp" +#include "A.ipp" + +data::data() : + a(new A) +{} +data::~data(){ + delete a; +} + +bool data::operator==(const data & rhs) const { + return * (a) == *(rhs.a); +} + +#if 0 // this method fails with msvc 6.0 and borland +// now we can define the serialization for class A +template +void data::serialize(Archive & ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_NVP(a); +} + +// without the explicit instantiations below, the program will +// fail to link for lack of instantiantiation of the above function +// note: the following failed to fix link errors for vc 7.0 ! +#include + +template void data::serialize( + boost::archive::polymorphic_oarchive & ar, + const unsigned int file_version +); + +#include + +template void data::serialize( + boost::archive::polymorphic_iarchive & ar, + const unsigned int file_version +); +#endif + +// so use this +void data::serialize(boost::archive::polymorphic_oarchive & ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_NVP(a); +} + +void data::serialize(boost::archive::polymorphic_iarchive & ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_NVP(a); +} diff --git a/src/boost/libs/serialization/test/test_polymorphic_A.hpp b/src/boost/libs/serialization/test/test_polymorphic_A.hpp new file mode 100644 index 000000000..839ed27b6 --- /dev/null +++ b/src/boost/libs/serialization/test/test_polymorphic_A.hpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_polymorphic_A.hpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// class whose declaration is hidden by a pointer +// #include + +#include +#include + +class A; + +struct data { + // class a contains a pointer to a "hidden" declaration + // borland scoped_ptr doesn't work !!! + // boost::scoped_ptr a; + A * a; +// template +// void serialize(Archive & ar, const unsigned int file_version); + void serialize(boost::archive::polymorphic_oarchive & ar, const unsigned int file_version); + void serialize(boost::archive::polymorphic_iarchive & ar, const unsigned int file_version); + data(); + ~data(); + bool operator==(const data & rhs) const; +}; + diff --git a/src/boost/libs/serialization/test/test_primitive.cpp b/src/boost/libs/serialization/test/test_primitive.cpp new file mode 100644 index 000000000..02ea7902f --- /dev/null +++ b/src/boost/libs/serialization/test/test_primitive.cpp @@ -0,0 +1,66 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_primitive.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// test implementation level "primitive_type" + +#include // NULL +#include + +#include + +#include "test_tools.hpp" + +#include +#include + +struct A +{ + template + void serialize(Archive &ar, const unsigned int /* file_version */){ + // note: should never fail here + BOOST_STATIC_ASSERT(0 == sizeof(Archive)); + } +}; + +std::ostream & operator<<(std::ostream &os, const A & /* a */){ return os;} +std::istream & operator>>(std::istream &is, A & /* a */){return is;} + +#ifndef BOOST_NO_STD_WSTREAMBUF +std::wostream & operator<<(std::wostream &os, const A & /* a */){ return os;} +std::wistream & operator>>(std::wistream &is, A & /* a */){return is;} +#endif + +BOOST_CLASS_IMPLEMENTATION(A, boost::serialization::primitive_type) + +void out(const char *testfile, A & a) +{ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << BOOST_SERIALIZATION_NVP(a); +} + +void in(const char *testfile, A & a) +{ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> BOOST_SERIALIZATION_NVP(a); +} + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + A a; + out(testfile, a); + in(testfile, a); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_priority_queue.cpp b/src/boost/libs/serialization/test/test_priority_queue.cpp new file mode 100644 index 000000000..fe763bb9f --- /dev/null +++ b/src/boost/libs/serialization/test/test_priority_queue.cpp @@ -0,0 +1,65 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_priority_queue.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include +#include + +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" + +#include +#include + +#include "A.hpp" +#include "A.ipp" + +int test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + // test array of objects + std::priority_queue > a_priority_queue, a_priority_queue1; + a_priority_queue.push(A()); + a_priority_queue.push(A()); + a_priority_queue.push(A()); + a_priority_queue.push(A()); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("a_priority_queue",a_priority_queue); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("a_priority_queue",a_priority_queue1); + } + BOOST_CHECK(a_priority_queue.size() == a_priority_queue1.size()); + + for(int i = a_priority_queue.size(); i-- > 0;){ + const A & a1 = a_priority_queue.top(); + const A & a2 = a_priority_queue1.top(); + BOOST_CHECK(a1 == a2); + a_priority_queue.pop(); + a_priority_queue1.pop(); + } + + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_private_base.cpp b/src/boost/libs/serialization/test/test_private_base.cpp new file mode 100644 index 000000000..96d8bd0c7 --- /dev/null +++ b/src/boost/libs/serialization/test/test_private_base.cpp @@ -0,0 +1,84 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_private_base.cpp + +// (C) Copyright 2009 Eric Moyer - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +// invoke header for a custom archive test. + +#include +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include +#include +#include + +#include "test_tools.hpp" + +class Base { + friend class boost::serialization::access; + int m_i; + template + void serialize(Archive & ar, const unsigned int version){ + ar & BOOST_SERIALIZATION_NVP(m_i); + } +protected: + bool equals(const Base &rhs) const { + return m_i == rhs.m_i; + } + Base(int i = 0) : + m_i(i) + {} +public: +}; + +class Derived : private Base { + friend class boost::serialization::access; +private: + Base & base_cast(){ + return static_cast(*this); + } + template + void serialize(Archive & ar, const unsigned int version){ + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base); + } +public: + bool operator==(const Derived &rhs) const { + return Base::equals(static_cast(rhs)); + } + Derived(int i = 0) : + Base(i) + {} +}; + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + Derived a(1), a1(2); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("a", a); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("a", a1); + } + BOOST_CHECK_EQUAL(a, a1); + std::remove(testfile); + + return 0; +} diff --git a/src/boost/libs/serialization/test/test_private_base2.cpp b/src/boost/libs/serialization/test/test_private_base2.cpp new file mode 100644 index 000000000..67d714c4c --- /dev/null +++ b/src/boost/libs/serialization/test/test_private_base2.cpp @@ -0,0 +1,104 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_private_base.cpp + +// (C) Copyright 2009 Eric Moyer - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +// invoke header for a custom archive test. + +#include +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include +#include +#include + +#include "test_tools.hpp" + +class Base { + friend class boost::serialization::access; + int m_i; + template + void serialize(Archive & ar, const unsigned int version){ + ar & BOOST_SERIALIZATION_NVP(m_i); + } +protected: + bool equals(const Base &rhs) const { + return m_i == rhs.m_i; + } + Base(int i = 0) : + m_i(i) + {} + virtual ~Base(){}; +public: + virtual bool operator==(const Base &rhs) const { + return false; + }// = 0; +}; + +class Derived : private Base { + friend class boost::serialization::access; +public: + virtual bool operator==(const Derived &rhs) const { + return Base::equals(static_cast(rhs)); + } + Derived(int i = 0) : + Base(i) + {} +}; + +//BOOST_CLASS_EXPORT(Derived) + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + Derived a(1), a1(2); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("a", a); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("a", a1); + } + BOOST_CHECK_EQUAL(a, a1); + std::remove(testfile); + + //Base *ta = static_cast(&a); + //Base *ta1 = NULL; + + Derived *ta = &a; + Derived *ta1 = NULL; + + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("ta", ta); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("ta", ta1); + } + BOOST_CHECK(ta != ta1); + BOOST_CHECK(*ta == *ta1); + //BOOST_CHECK(*static_cast(ta) == *static_cast(ta1)); + + std::remove(testfile); + + return 0; +} diff --git a/src/boost/libs/serialization/test/test_private_ctor.cpp b/src/boost/libs/serialization/test/test_private_ctor.cpp new file mode 100644 index 000000000..84cc66c78 --- /dev/null +++ b/src/boost/libs/serialization/test/test_private_ctor.cpp @@ -0,0 +1,66 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_private_ctor.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include + +#include "test_tools.hpp" + +#include + +#include +#include + +class V { +private: + friend int test_main(int /* argc */, char * /* argv */[]); + friend class boost::serialization::access; + int m_i; + V() : + m_i(0) + {} + template + void serialize(Archive& ar, unsigned /*version*/) + { + ar & m_i; + } +public: + ~V(){} + bool operator==(const V & v) const { + return m_i == v.m_i; + } +}; + +int test_main(int /* argc */, char * /* argv */[]) +{ + std::stringstream ss; + const V v; + { + boost::archive::text_oarchive oa(ss); + oa << v; + } + V v1; + { + boost::archive::text_iarchive ia(ss); + ia >> v1; + } + BOOST_CHECK(v == v1); + + const V *vptr = & v; + { + boost::archive::text_oarchive oa(ss); + oa << vptr; + } + V *vptr1; + { + boost::archive::text_iarchive ia(ss); + ia >> vptr1; + } + BOOST_CHECK(*vptr == *vptr1); + + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_queue.cpp b/src/boost/libs/serialization/test/test_queue.cpp new file mode 100644 index 000000000..a2d25ef3e --- /dev/null +++ b/src/boost/libs/serialization/test/test_queue.cpp @@ -0,0 +1,56 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_queue.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include +#include + +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include +#include "test_tools.hpp" + +#include +#include + +#include "A.hpp" +#include "A.ipp" + +int test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + // test array of objects + std::queue aqueue, aqueue1; + aqueue.push(A()); + aqueue.push(A()); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("aqueue",aqueue); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("aqueue",aqueue1); + } + BOOST_CHECK(aqueue == aqueue1); + + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_recursion.cpp b/src/boost/libs/serialization/test/test_recursion.cpp new file mode 100644 index 000000000..b596f383a --- /dev/null +++ b/src/boost/libs/serialization/test/test_recursion.cpp @@ -0,0 +1,51 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_recurrsion.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULL +#include // remove +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" + +#include "J.hpp" +#include "A.ipp" + +int test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + // test recursive structure + J j, j1; + j.j = &j; + + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << BOOST_SERIALIZATION_NVP(j); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> BOOST_SERIALIZATION_NVP(j1); + } + BOOST_CHECK(j == j1); + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_registered.cpp b/src/boost/libs/serialization/test/test_registered.cpp new file mode 100644 index 000000000..322219643 --- /dev/null +++ b/src/boost/libs/serialization/test/test_registered.cpp @@ -0,0 +1,239 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_registered.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULL +#include // remove +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include +#include "test_tools.hpp" + +#include +#include + +class polymorphic_base +{ + friend class boost::serialization::access; + template + void serialize(Archive & /* ar */, const unsigned int /* file_version */){ + } +public: + virtual ~polymorphic_base(){}; +}; + +class polymorphic_derived1 : public polymorphic_base +{ + friend class boost::serialization::access; + template + void serialize(Archive &ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(polymorphic_base); + } +}; + +class polymorphic_derived2 : public polymorphic_base +{ + friend class boost::serialization::access; + template + void serialize(Archive &ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(polymorphic_base); + } +}; + +// save derived polymorphic class +void save_derived(const char *testfile) +{ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + + polymorphic_derived1 *rd1 = new polymorphic_derived1; + polymorphic_derived2 *rd2 = new polymorphic_derived2; + + // registration IS necessary when serializing pointers of + // polymorphic classes + oa.register_type(static_cast(NULL)); + oa.register_type(static_cast(NULL)); + oa << BOOST_SERIALIZATION_NVP(rd1); + oa << BOOST_SERIALIZATION_NVP(rd2); + + // the above opereration registers the derived classes as a side + // effect. Hence, instances can now be correctly serialized through + // a base class pointer. + polymorphic_base *rb1 = rd1; + polymorphic_base *rb2 = rd2; + oa << BOOST_SERIALIZATION_NVP(rb1); + oa << BOOST_SERIALIZATION_NVP(rb2); + + delete rd1; + delete rd2; +} + +// save derived polymorphic class +void load_derived(const char *testfile) +{ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + + polymorphic_derived1 *rd1 = NULL; + polymorphic_derived2 *rd2 = NULL; + + // registration IS necessary when serializing pointers of + // polymorphic classes + ia.register_type(static_cast(NULL)); + ia.register_type(static_cast(NULL)); + + ia >> BOOST_SERIALIZATION_NVP(rd1); + + const boost::serialization::extended_type_info * p1; + p1 = & boost::serialization::type_info_implementation + ::type::get_const_instance(); + + BOOST_CHECK(NULL != p1); + + const boost::serialization::extended_type_info * p2; + p2 = boost::serialization::type_info_implementation + ::type::get_const_instance().get_derived_extended_type_info(*rd1); + + BOOST_CHECK(NULL != p2); + + BOOST_CHECK_MESSAGE(p1 == p2, "restored pointer d1 not of correct type"); + + ia >> BOOST_SERIALIZATION_NVP(rd2); + + BOOST_CHECK_MESSAGE( + & boost::serialization::type_info_implementation + ::type::get_const_instance() + == + boost::serialization::type_info_implementation + ::type::get_const_instance().get_derived_extended_type_info(*rd2), + "restored pointer d2 not of correct type" + ); + + polymorphic_base *rb1 = NULL; + polymorphic_base *rb2 = NULL; + + // the above opereration registers the derived classes as a side + // effect. Hence, instances can now be correctly serialized through + // a base class pointer. + ia >> BOOST_SERIALIZATION_NVP(rb1); + + BOOST_CHECK_MESSAGE( + rb1 == dynamic_cast(rd1), + "serialized pointers not correctly restored" + ); + + p1 = & boost::serialization::type_info_implementation + ::type::get_const_instance(); + + BOOST_CHECK(NULL != p1); + + p2 = boost::serialization::type_info_implementation + ::type::get_const_instance().get_derived_extended_type_info(*rb1); + + BOOST_CHECK(NULL != p2); + + BOOST_CHECK_MESSAGE(p1 == p2, "restored pointer b1 not of correct type"); + + ia >> BOOST_SERIALIZATION_NVP(rb2); + + BOOST_CHECK_MESSAGE( + rb2 == dynamic_cast(rd2), + "serialized pointers not correctly restored" + ); + + BOOST_CHECK_MESSAGE( + & boost::serialization::type_info_implementation + ::type::get_const_instance() + == boost::serialization::type_info_implementation + ::type::get_const_instance().get_derived_extended_type_info(*rb2), + "restored pointer b2 not of correct type" + ); + + delete rb1; + delete rb2; +} + +// save registered polymorphic class +void save_registered(const char *testfile) +{ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + + polymorphic_base *rb1 = new polymorphic_derived1; + polymorphic_base *rb2 = new polymorphic_derived2; + + // registration (forward declaration) will permit correct serialization + // through a pointer to a base class + oa.register_type(static_cast(NULL)); + oa.register_type(static_cast(NULL)); + oa << BOOST_SERIALIZATION_NVP(rb1) << BOOST_SERIALIZATION_NVP(rb2); + + delete rb1; + delete rb2; +} + +// save registered polymorphic class +void load_registered(const char *testfile) +{ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + + polymorphic_base *rb1 = NULL; + polymorphic_base *rb2 = NULL; + + // registration (forward declaration) will permit correct serialization + // through a pointer to a base class + ia.register_type(static_cast(NULL)); + ia.register_type(static_cast(NULL)); + ia >> BOOST_SERIALIZATION_NVP(rb1) >> BOOST_SERIALIZATION_NVP(rb2); + + BOOST_CHECK_MESSAGE( + & boost::serialization::type_info_implementation + ::type::get_const_instance() + == boost::serialization::type_info_implementation + ::type::get_const_instance().get_derived_extended_type_info(*rb1), + "restored pointer b1 not of correct type" + ); + + BOOST_CHECK_MESSAGE( + & boost::serialization::type_info_implementation + ::type::get_const_instance() + == boost::serialization::type_info_implementation + ::type::get_const_instance().get_derived_extended_type_info(*rb2), + "restored pointer b2 not of correct type" + ); + + delete rb1; + delete rb2; +} + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + + BOOST_REQUIRE(NULL != testfile); + + save_derived(testfile); + load_derived(testfile); + save_registered(testfile); + load_registered(testfile); + + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_reset_object_address.cpp b/src/boost/libs/serialization/test/test_reset_object_address.cpp new file mode 100644 index 000000000..a3d0195f6 --- /dev/null +++ b/src/boost/libs/serialization/test/test_reset_object_address.cpp @@ -0,0 +1,412 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_reset_object_address.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include // for rand() +#include // size_t + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::rand; + using ::size_t; +} +#endif + +#include "test_tools.hpp" + +#include +#include +#include +#include + +#include +#include + +// Someday, maybe all tests will be converted to the unit test framework. +// but for now use the text execution monitor to be consistent with all +// the other tests. + +// simple test of untracked value +#include "A.hpp" +#include "A.ipp" + +void test1(){ + std::stringstream ss; + const A a; + { + boost::archive::text_oarchive oa(ss); + oa << a; + } + A a1; + { + boost::archive::text_iarchive ia(ss); + // load to temporary + A a2; + ia >> a2; + BOOST_CHECK_EQUAL(a, a2); + // move to final destination + a1 = a2; + ia.reset_object_address(& a1, & a2); + } + BOOST_CHECK_EQUAL(a, a1); +} + +// simple test of tracked value +class B { + friend class boost::serialization::access; + int m_i; + template + void serialize(Archive &ar, const unsigned int /*file_version*/){ + ar & m_i; + } +public: + bool operator==(const B & rhs) const { + return m_i == rhs.m_i; + } + B() : + m_i(std::rand()) + {} +}; + +//BOOST_TEST_DONT_PRINT_LOG_VALUE( B ) + +void test2(){ + std::stringstream ss; + B const b; + B const * const b_ptr = & b; + BOOST_CHECK_EQUAL(& b, b_ptr); + { + boost::archive::text_oarchive oa(ss); + oa << b; + oa << b_ptr; + } + B b1; + B * b1_ptr; + { + boost::archive::text_iarchive ia(ss); + // load to temporary + B b2; + ia >> b2; + BOOST_CHECK_EQUAL(b, b2); + // move to final destination + b1 = b2; + ia.reset_object_address(& b1, & b2); + ia >> b1_ptr; + } + BOOST_CHECK_EQUAL(b, b1); + BOOST_CHECK_EQUAL(& b1, b1_ptr); +} + +// check that nested member values are properly moved +class D { + friend class boost::serialization::access; + template + void serialize(Archive &ar, const unsigned int /*file_version*/){ + ar & m_b; + } +public: + B m_b; + bool operator==(const D & rhs) const { + return m_b == rhs.m_b; + } + D(){} +}; + +//BOOST_TEST_DONT_PRINT_LOG_VALUE( D ) + +void test3(){ + std::stringstream ss; + D const d; + B const * const b_ptr = & d.m_b; + { + boost::archive::text_oarchive oa(ss); + oa << d; + oa << b_ptr; + } + D d1; + B * b1_ptr; + { + boost::archive::text_iarchive ia(ss); + D d2; + ia >> d2; + d1 = d2; + ia.reset_object_address(& d1, & d2); + ia >> b1_ptr; + } + BOOST_CHECK_EQUAL(d, d1); + BOOST_CHECK_EQUAL(* b_ptr, * b1_ptr); +} + +// check that data pointed to by pointer members is NOT moved +class E { + int m_i; + friend class boost::serialization::access; + template + void serialize(Archive &ar, const unsigned int /*file_version*/){ + ar & m_i; + } +public: + bool operator==(const E &rhs) const { + return m_i == rhs.m_i; + } + E() : + m_i(std::rand()) + {} + E(const E & rhs) : + m_i(rhs.m_i) + {} +}; +//BOOST_TEST_DONT_PRINT_LOG_VALUE( E ) + +// check that moves don't move stuff pointed to +class F { + friend class boost::serialization::access; + E * m_eptr; + template + void serialize(Archive &ar, const unsigned int /*file_version*/){ + ar & m_eptr; + } +public: + bool operator==(const F &rhs) const { + return *m_eptr == *rhs.m_eptr; + } + F & operator=(const F & rhs) { + * m_eptr = * rhs.m_eptr; + return *this; + } + F(){ + m_eptr = new E; + } + F(const F & rhs){ + *this = rhs; + } + ~F(){ + delete m_eptr; + } +}; + +//BOOST_TEST_DONT_PRINT_LOG_VALUE( F ) + +void test4(){ + std::stringstream ss; + const F f; + { + boost::archive::text_oarchive oa(ss); + oa << f; + } + F f1; + { + boost::archive::text_iarchive ia(ss); + F f2; + ia >> f2; + f1 = f2; + ia.reset_object_address(& f1, & f2); + } + BOOST_CHECK_EQUAL(f, f1); +} + +// check that multiple moves keep track of the correct target +class G { + friend class boost::serialization::access; + A m_a1; + A m_a2; + A *m_pa2; + template + void save(Archive &ar, const unsigned int /*file_version*/) const { + ar << m_a1; + ar << m_a2; + ar << m_pa2; + } + template + void load(Archive &ar, const unsigned int /*file_version*/){ + A a; // temporary A + ar >> a; + m_a1 = a; + ar.reset_object_address(& m_a1, & a); + ar >> a; + m_a2 = a; + ar.reset_object_address(& m_a2, & a); + ar & m_pa2; + } + BOOST_SERIALIZATION_SPLIT_MEMBER() +public: + bool operator==(const G &rhs) const { + return + m_a1 == rhs.m_a1 + && m_a2 == rhs.m_a2 + && *m_pa2 == *rhs.m_pa2; + } + G & operator=(const G & rhs) { + m_a1 = rhs.m_a1; + m_a2 = rhs.m_a2; + m_pa2 = & m_a2; + return *this; + } + G(){ + m_pa2 = & m_a2; + } + G(const G & rhs){ + *this = rhs; + } + ~G(){} +}; + +//BOOST_TEST_DONT_PRINT_LOG_VALUE( G ) + +void test5(){ + std::stringstream ss; + const G g; + { + boost::archive::text_oarchive oa(ss); + oa << g; + } + G g1; + { + boost::archive::text_iarchive ia(ss); + ia >> g1; + } + BOOST_CHECK_EQUAL(g, g1); +} + +// joaquin's test - this tests the case where rest_object_address +// is applied to an item which in fact is not tracked so that +// the call is in fact superfluous. +struct foo +{ + int x; + +private: + friend class boost::serialization::access; + + template + void serialize(Archive &,const unsigned int) + { + } +}; + +struct bar +{ + foo f[2]; + foo* pf[2]; + +private: + friend class boost::serialization::access; + BOOST_SERIALIZATION_SPLIT_MEMBER() + + template + void save(Archive& ar,const unsigned int)const + { + for(int i=0;i<2;++i){ + ar< + void load(Archive& ar,const unsigned int) + { + for(int i=0;i<2;++i){ + int x; + ar>>x; + f[i].x=x; + ar.reset_object_address(&f[i].x,&x); + ar>>f[i]; + } + for(int j=0;j<2;++j){ + ar>>pf[j]; + } + } +}; + +int test6() +{ + bar b; + b.f[0].x=0; + b.f[1].x=1; + b.pf[0]=&b.f[0]; + b.pf[1]=&b.f[1]; + + std::ostringstream oss; + { + boost::archive::text_oarchive oa(oss); + oa<(b); + } + + bar b1; + b1.pf[0]=0; + b1.pf[1]=0; + + std::istringstream iss(oss.str()); + boost::archive::text_iarchive ia(iss); + ia>>b1; + BOOST_CHECK(b1.pf[0]==&b1.f[0]&&b1.pf[1]==&b1.f[1]); + + return 0; +} + +// test one of the collections +void test7(){ + std::stringstream ss; + B const b; + B const * const b_ptr = & b; + BOOST_CHECK_EQUAL(& b, b_ptr); + { + std::list l; + l.push_back(b_ptr); + boost::archive::text_oarchive oa(ss); + oa << const_cast &>(l); + } + B b1; + { + std::list l; + boost::archive::text_iarchive ia(ss); + ia >> l; + delete l.front(); // prevent memory leak + } +} + +// test one of the collections with polymorphic archive +void test8(){ + std::stringstream ss; + B const b; + B const * const b_ptr = & b; + BOOST_CHECK_EQUAL(& b, b_ptr); + { + std::list l; + l.push_back(b_ptr); + boost::archive::polymorphic_text_oarchive oa(ss); + boost::archive::polymorphic_oarchive & poa = oa; + poa << const_cast &>(l); + } + B b1; + { + std::list l; + boost::archive::polymorphic_text_iarchive ia(ss); + boost::archive::polymorphic_iarchive & pia = ia; + pia >> l; + delete l.front(); // prevent memory leak + } +} + +int test_main(int /* argc */, char * /* argv */[]) +{ + test1(); + test2(); + test3(); + test4(); + test5(); + test6(); + test7(); + test8(); + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_set.cpp b/src/boost/libs/serialization/test/test_set.cpp new file mode 100644 index 000000000..826f83a0a --- /dev/null +++ b/src/boost/libs/serialization/test/test_set.cpp @@ -0,0 +1,111 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_set.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2014 Jim Bell +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULLsize_t +#include // remove +#include + +#include // std::copy +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} +#endif + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include + +#include "test_tools.hpp" + +#include +#include + +#include "A.hpp" +#include "A.ipp" + +void +test_set(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + // test array of objects + std::set aset; + aset.insert(A()); + aset.insert(A()); + const A * a_ptr = & * aset.begin(); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("aset", aset); + // serialize a pointer into the set + oa << boost::serialization::make_nvp("a_ptr", a_ptr); + } + std::set aset1; + A * a_ptr1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("aset", aset1); + // deserialize a pointer into the set + ia >> boost::serialization::make_nvp("a_ptr1", a_ptr1); + } + BOOST_CHECK_EQUAL(aset, aset1); + BOOST_CHECK_EQUAL(*a_ptr1, * aset1.begin()); + BOOST_CHECK_EQUAL(a_ptr1, & * aset1.begin()); + std::remove(testfile); +} + +void +test_multiset(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + std::multiset amultiset; + amultiset.insert(A()); + amultiset.insert(A()); + const A * a_ptr = & * amultiset.begin(); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("amultiset", amultiset); + // serialize a pointer into the set + oa << boost::serialization::make_nvp("a_ptr", a_ptr); + } + std::multiset amultiset1; + A * a_ptr1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("amultiset", amultiset1); + // deserialize a pointer into the set + ia >> boost::serialization::make_nvp("a_ptr1", a_ptr1); + } + BOOST_CHECK(amultiset == amultiset1); + BOOST_CHECK_EQUAL(*a_ptr1, * amultiset1.begin()); + BOOST_CHECK_EQUAL(a_ptr1, & * amultiset1.begin()); + std::remove(testfile); +} + +int test_main( int /* argc */, char* /* argv */[] ){ + test_set(); + test_multiset(); + + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_set_boost_unordered.cpp b/src/boost/libs/serialization/test/test_set_boost_unordered.cpp new file mode 100644 index 000000000..8c5c8ff17 --- /dev/null +++ b/src/boost/libs/serialization/test/test_set_boost_unordered.cpp @@ -0,0 +1,123 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_set.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2014 Jim Bell +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULLsize_t +#include // remove +#include + +#include // std::copy +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} +#endif + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include + +#include "test_tools.hpp" + +#include +#include + +#include "A.hpp" +#include "A.ipp" + +#include +#include // requires changeset [69520]; Ticket #5254 + +namespace boost { + template<> + struct hash { + std::size_t operator()(const A& a) const { + return static_cast(a); + } + }; +} // namespace boost + +void +test_unordered_set(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + // test array of objects + boost::unordered_set anunordered_set; + A a, a1; + anunordered_set.insert(a); + anunordered_set.insert(a1); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("anunordered_set", anunordered_set); + } + boost::unordered_set anunordered_set1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("anunordered_set", anunordered_set1); + } + std::vector tvec, tvec1; + tvec.clear(); + tvec1.clear(); + std::copy(anunordered_set.begin(), anunordered_set.end(), std::back_inserter(tvec)); + std::sort(tvec.begin(), tvec.end()); + std::copy(anunordered_set1.begin(), anunordered_set1.end(), std::back_inserter(tvec1)); + std::sort(tvec1.begin(), tvec1.end()); + BOOST_CHECK(tvec == tvec1); + std::remove(testfile); +} + +void +test_unordered_multiset(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + boost::unordered_multiset anunordered_multiset; + anunordered_multiset.insert(A()); + anunordered_multiset.insert(A()); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("anunordered_multiset", anunordered_multiset); + } + boost::unordered_multiset anunordered_multiset1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("anunordered_multiset", anunordered_multiset1); + } + + std::vector tvec, tvec1; + tvec.clear(); + tvec1.clear(); + std::copy(anunordered_multiset.begin(), anunordered_multiset.end(), std::back_inserter(tvec)); + std::sort(tvec.begin(), tvec.end()); + std::copy(anunordered_multiset1.begin(), anunordered_multiset1.end(), std::back_inserter(tvec1)); + std::sort(tvec1.begin(), tvec1.end()); + BOOST_CHECK(tvec == tvec1); + + std::remove(testfile); +} + +int test_main( int /* argc */, char* /* argv */[] ){ + test_unordered_set(); + test_unordered_multiset(); + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_set_hashed.cpp b/src/boost/libs/serialization/test/test_set_hashed.cpp new file mode 100644 index 000000000..d60ed6288 --- /dev/null +++ b/src/boost/libs/serialization/test/test_set_hashed.cpp @@ -0,0 +1,262 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_set.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2014 Jim Bell +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULLsize_t +#include // remove +#include + +#include // std::copy +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} +#endif + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include + +#include "test_tools.hpp" + +#include +#include + +#include "A.hpp" +#include "A.ipp" + +void +test_set(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + // test array of objects + std::set aset; + aset.insert(A()); + aset.insert(A()); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("aset", aset); + } + std::set aset1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("aset", aset1); + } + BOOST_CHECK(aset == aset1); + std::remove(testfile); +} + +void +test_multiset(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + std::multiset amultiset; + amultiset.insert(A()); + amultiset.insert(A()); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("amultiset", amultiset); + } + std::multiset amultiset1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("amultiset", amultiset1); + } + BOOST_CHECK(amultiset == amultiset1); + std::remove(testfile); +} + +#ifdef BOOST_HAS_HASH + +#include + +namespace BOOST_STD_EXTENSION_NAMESPACE { + template<> + struct hash { + std::size_t operator()(const A& a) const { + return static_cast(a); + } + }; +} + +void +test_hash_set(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + // test array of objects + BOOST_STD_EXTENSION_NAMESPACE::hash_set ahash_set; + A a, a1; + ahash_set.insert(a); + ahash_set.insert(a1); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("ahash_set", ahash_set); + } + BOOST_STD_EXTENSION_NAMESPACE::hash_set ahash_set1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("ahash_set", ahash_set1); + } + std::vector tvec, tvec1; + tvec.clear(); + tvec1.clear(); + std::copy(ahash_set.begin(), ahash_set.end(), std::back_inserter(tvec)); + std::sort(tvec.begin(), tvec.end()); + std::copy(ahash_set1.begin(), ahash_set1.end(), std::back_inserter(tvec1)); + std::sort(tvec1.begin(), tvec1.end()); + BOOST_CHECK(tvec == tvec1); + std::remove(testfile); +} + +void +test_hash_multiset(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + BOOST_STD_EXTENSION_NAMESPACE::hash_multiset ahash_multiset; + ahash_multiset.insert(A()); + ahash_multiset.insert(A()); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("ahash_multiset", ahash_multiset); + } + BOOST_STD_EXTENSION_NAMESPACE::hash_multiset ahash_multiset1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("ahash_multiset", ahash_multiset1); + } + + std::vector tvec, tvec1; + tvec.clear(); + tvec1.clear(); + std::copy(ahash_multiset.begin(), ahash_multiset.end(), std::back_inserter(tvec)); + std::sort(tvec.begin(), tvec.end()); + std::copy(ahash_multiset1.begin(), ahash_multiset1.end(), std::back_inserter(tvec1)); + std::sort(tvec1.begin(), tvec1.end()); + BOOST_CHECK(tvec == tvec1); + + std::remove(testfile); +} +#endif + +#ifndef BOOST_NO_CXX11_HDR_UNORDERED_SET + +#include +#include // requires changeset [69520]; Ticket #5254 + +namespace std { + template<> + struct hash { + std::size_t operator()(const A& a) const { + return static_cast(a); + } + }; +} // namespace std + +void +test_unordered_set(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + // test array of objects + std::unordered_set anunordered_set; + A a, a1; + anunordered_set.insert(a); + anunordered_set.insert(a1); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("anunordered_set", anunordered_set); + } + std::unordered_set anunordered_set1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("anunordered_set", anunordered_set1); + } + std::vector tvec, tvec1; + tvec.clear(); + tvec1.clear(); + std::copy(anunordered_set.begin(), anunordered_set.end(), std::back_inserter(tvec)); + std::sort(tvec.begin(), tvec.end()); + std::copy(anunordered_set1.begin(), anunordered_set1.end(), std::back_inserter(tvec1)); + std::sort(tvec1.begin(), tvec1.end()); + BOOST_CHECK(tvec == tvec1); + std::remove(testfile); +} + +void +test_unordered_multiset(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + std::unordered_multiset anunordered_multiset; + anunordered_multiset.insert(A()); + anunordered_multiset.insert(A()); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("anunordered_multiset", anunordered_multiset); + } + std::unordered_multiset anunordered_multiset1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("anunordered_multiset", anunordered_multiset1); + } + + std::vector tvec, tvec1; + tvec.clear(); + tvec1.clear(); + std::copy(anunordered_multiset.begin(), anunordered_multiset.end(), std::back_inserter(tvec)); + std::sort(tvec.begin(), tvec.end()); + std::copy(anunordered_multiset1.begin(), anunordered_multiset1.end(), std::back_inserter(tvec1)); + std::sort(tvec1.begin(), tvec1.end()); + BOOST_CHECK(tvec == tvec1); + + std::remove(testfile); +} +#endif + +int test_main( int /* argc */, char* /* argv */[] ){ + test_set(); + test_multiset(); + + #ifdef BOOST_HAS_HASH + test_hash_set(); + test_hash_multiset(); + #endif + + #ifndef BOOST_NO_CXX11_HDR_UNORDERED_SET + test_unordered_set(); + test_unordered_multiset(); + #endif + + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_set_unordered.cpp b/src/boost/libs/serialization/test/test_set_unordered.cpp new file mode 100644 index 000000000..b8453bcf1 --- /dev/null +++ b/src/boost/libs/serialization/test/test_set_unordered.cpp @@ -0,0 +1,123 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_set.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2014 Jim Bell +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULLsize_t +#include // remove +#include + +#include // std::copy +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} +#endif + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include + +#include "test_tools.hpp" + +#include +#include + +#include "A.hpp" +#include "A.ipp" + +#include +#include // requires changeset [69520]; Ticket #5254 + +namespace std { + template<> + struct hash { + std::size_t operator()(const A& a) const { + return static_cast(a); + } + }; +} // namespace std + +void +test_unordered_set(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + // test array of objects + std::unordered_set anunordered_set; + A a, a1; + anunordered_set.insert(a); + anunordered_set.insert(a1); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("anunordered_set", anunordered_set); + } + std::unordered_set anunordered_set1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("anunordered_set", anunordered_set1); + } + std::vector tvec, tvec1; + tvec.clear(); + tvec1.clear(); + std::copy(anunordered_set.begin(), anunordered_set.end(), std::back_inserter(tvec)); + std::sort(tvec.begin(), tvec.end()); + std::copy(anunordered_set1.begin(), anunordered_set1.end(), std::back_inserter(tvec1)); + std::sort(tvec1.begin(), tvec1.end()); + BOOST_CHECK(tvec == tvec1); + std::remove(testfile); +} + +void +test_unordered_multiset(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + std::unordered_multiset anunordered_multiset; + anunordered_multiset.insert(A()); + anunordered_multiset.insert(A()); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("anunordered_multiset", anunordered_multiset); + } + std::unordered_multiset anunordered_multiset1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("anunordered_multiset", anunordered_multiset1); + } + + std::vector tvec, tvec1; + tvec.clear(); + tvec1.clear(); + std::copy(anunordered_multiset.begin(), anunordered_multiset.end(), std::back_inserter(tvec)); + std::sort(tvec.begin(), tvec.end()); + std::copy(anunordered_multiset1.begin(), anunordered_multiset1.end(), std::back_inserter(tvec1)); + std::sort(tvec1.begin(), tvec1.end()); + BOOST_CHECK(tvec == tvec1); + + std::remove(testfile); +} + +int test_main( int /* argc */, char* /* argv */[] ){ + test_unordered_set(); + test_unordered_multiset(); + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_shared_ptr.cpp b/src/boost/libs/serialization/test/test_shared_ptr.cpp new file mode 100644 index 000000000..dc35842be --- /dev/null +++ b/src/boost/libs/serialization/test/test_shared_ptr.cpp @@ -0,0 +1,322 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_shared_ptr.cpp + +// (C) Copyright 2002 Robert Ramey- http://www.rrsd.com - David Tonge . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org for updates, documentation, and revision history. + +#include // NULL +#include // remove +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include +#include +#include +#include + +#include "test_tools.hpp" + +// This is a simple class. It contains a counter of the number +// of objects of this class which have been instantiated. +class A +{ +private: + friend class boost::serialization::access; + int x; + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_NVP(x); + } + A(A const & rhs); + A& operator=(A const & rhs); +public: + static int count; + bool operator==(const A & rhs) const { + return x == rhs.x; + } + A(){++count;} // default constructor + virtual ~A(){--count;} // default destructor +}; + +BOOST_SERIALIZATION_SHARED_PTR(A) + +int A::count = 0; + +// B is a subclass of A +class B : public A +{ +private: + friend class boost::serialization::access; + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(A); + } +public: + static int count; + B() : A() {}; + virtual ~B() {}; +}; + +// B needs to be exported because its serialized via a base class pointer +BOOST_CLASS_EXPORT(B) +BOOST_SERIALIZATION_SHARED_PTR(B) + +// test a non-polymorphic class +class C +{ +private: + friend class boost::serialization::access; + int z; + template + void serialize(Archive & ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_NVP(z); + } +public: + static int count; + bool operator==(const C & rhs) const { + return z == rhs.z; + } + C() : + z(++count) // default constructor + {} + virtual ~C(){--count;} // default destructor +}; + +int C::count = 0; + +template +void save(const char * testfile, const SP & spa) +{ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << BOOST_SERIALIZATION_NVP(spa); +} + +template +void load(const char * testfile, SP & spa) +{ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> BOOST_SERIALIZATION_NVP(spa); +} + +// trivial test +template +void save_and_load(SP & spa) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + save(testfile, spa); + SP spa1; + load(testfile, spa1); + + BOOST_CHECK( + (spa.get() == NULL && spa1.get() == NULL) + || * spa == * spa1 + ); + std::remove(testfile); +} + +template +void save2( + const char * testfile, + const SP & first, + const SP & second +){ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << BOOST_SERIALIZATION_NVP(first); + oa << BOOST_SERIALIZATION_NVP(second); +} + +template +void load2( + const char * testfile, + SP & first, + SP & second) +{ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> BOOST_SERIALIZATION_NVP(first); + ia >> BOOST_SERIALIZATION_NVP(second); +} + +// Run tests by serializing two shared_ptrs into an archive, +// clearing them (deleting the objects) and then reloading the +// objects back from an archive. +template +void save_and_load2(SP & first, SP & second) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + save2(testfile, first, second); + + // Clear the pointers, thereby destroying the objects they contain + first.reset(); + second.reset(); + + load2(testfile, first, second); + + BOOST_CHECK(first == second); + std::remove(testfile); +} + +template +void save3( + const char * testfile, + SP & first, + SP & second, + WP & third +){ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << BOOST_SERIALIZATION_NVP(third); + oa << BOOST_SERIALIZATION_NVP(first); + oa << BOOST_SERIALIZATION_NVP(second); +} + +template +void load3( + const char * testfile, + SP & first, + SP & second, + WP & third +){ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + // note that we serialize the weak pointer first + ia >> BOOST_SERIALIZATION_NVP(third); + // inorder to test that a temporarily solitary weak pointer + // correctly restored. + ia >> BOOST_SERIALIZATION_NVP(first); + ia >> BOOST_SERIALIZATION_NVP(second); +} + +template +void save_and_load3( + SP & first, + SP & second, + WP & third +){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + save3(testfile, first, second, third); + + // Clear the pointers, thereby destroying the objects they contain + first.reset(); + second.reset(); + third.reset(); + + load3(testfile, first, second, third); + + BOOST_CHECK(first == second); + BOOST_CHECK(first == third.lock()); + std::remove(testfile); +} + +template +void save4(const char * testfile, const SP & spc) +{ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << BOOST_SERIALIZATION_NVP(spc); +} + +template +void load4(const char * testfile, SP & spc) +{ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> BOOST_SERIALIZATION_NVP(spc); +} + +// trivial test +template +void save_and_load4(SP & spc) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + save4(testfile, spc); + SP spc1; + load4(testfile, spc1); + + BOOST_CHECK( + (spc.get() == NULL && spc1.get() == NULL) + || * spc == * spc1 + ); + std::remove(testfile); +} + +// This does the tests +template class SPT , template class WPT > +bool test(){ + { + SPT spa; + // These are our shared_ptrs + spa = SPT(new A); + SPT spa1 = spa; + spa1 = spa; + } + { + // These are our shared_ptrs + SPT spa; + + // trivial test 1 + save_and_load(spa); + + //trivival test 2 + spa = SPT(new A); + save_and_load(spa); + + // Try to save and load pointers to As + spa = SPT(new A); + SPT spa1 = spa; + save_and_load2(spa, spa1); + + // Try to save and load pointers to Bs + spa = SPT(new B); + spa1 = spa; + save_and_load2(spa, spa1); + + // test a weak pointer + spa = SPT(new A); + spa1 = spa; + WPT wp = spa; + save_and_load3(spa, spa1, wp); + + // obj of type B gets destroyed + // as smart_ptr goes out of scope + } + BOOST_CHECK(A::count == 0); + { + // Try to save and load pointers to Cs + SPT spc; + spc = SPT(new C); + save_and_load4(spc); + } + BOOST_CHECK(C::count == 0); + return true; +} +// This does the tests +int test_main(int /* argc */, char * /* argv */[]) +{ + bool result = true; + result &= test(); + #ifndef BOOST_NO_CXX11_SMART_PTR + result &= test(); + #endif + return result ? EXIT_SUCCESS : EXIT_FAILURE; +} + diff --git a/src/boost/libs/serialization/test/test_shared_ptr_132.cpp b/src/boost/libs/serialization/test/test_shared_ptr_132.cpp new file mode 100644 index 000000000..0d11b0002 --- /dev/null +++ b/src/boost/libs/serialization/test/test_shared_ptr_132.cpp @@ -0,0 +1,230 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_shared_ptr.cpp + +// (C) Copyright 2002 Robert Ramey- http://www.rrsd.com - David Tonge . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org for updates, documentation, and revision history. + +#include // NULL +#include + +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" + +#include +#include +#include +#include + +#include + +#include +#include + +// This is a simple class. It contains a counter of the number +// of objects of this class which have been instantiated. +class A +{ +private: + friend class boost::serialization::access; + int x; + template + void save(Archive & ar, const unsigned int /* file_version */) const { + ar << BOOST_SERIALIZATION_NVP(x); + } + template + void load(Archive & ar, const unsigned int /* file_version */) { + ar >> BOOST_SERIALIZATION_NVP(x); + } + BOOST_SERIALIZATION_SPLIT_MEMBER() +public: + static int count; + bool operator==(const A & rhs) const { + return x == rhs.x; + } + A(){++count;} // default constructor + virtual ~A(){--count;} // default destructor +}; + +BOOST_SERIALIZATION_SHARED_PTR(A) + +// B is a subclass of A +class B : public A +{ +private: + friend class boost::serialization::access; + template + void save(Archive & ar, const unsigned int /* file_version */ )const { + ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(A); + } + template + void load(Archive & ar, const unsigned int /* file_version */){ + ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(A); + } + BOOST_SERIALIZATION_SPLIT_MEMBER() +public: + static int count; + B() : A() {}; + virtual ~B() {}; +}; + +// B needs to be exported because its serialized via a base class pointer +BOOST_SHARED_POINTER_EXPORT(B) +BOOST_SERIALIZATION_SHARED_PTR(B) + +int A::count = 0; + +template +void save(const char * testfile, const T & spa) +{ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << BOOST_SERIALIZATION_NVP(spa); +} + +template +void load(const char * testfile, T & spa) +{ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> BOOST_SERIALIZATION_NVP(spa); +} + +// trivial test +template +void save_and_load(const T & spa) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + save(testfile, spa); + + // note that we're loading to a current version of shared_ptr + // regardless of the orignal saved type - this tests backward + // archive compatibility + boost::shared_ptr spa1; + load(testfile, spa1); + + BOOST_CHECK( + (spa.get() == NULL && spa1.get() == NULL) + || * spa == * spa1 + ); + std::remove(testfile); +} + +template +void save2( + const char * testfile, + const T & first, + const T & second +){ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << BOOST_SERIALIZATION_NVP(first); + oa << BOOST_SERIALIZATION_NVP(second); +} + +template +void load2( + const char * testfile, + T & first, + T & second) +{ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> BOOST_SERIALIZATION_NVP(first); + ia >> BOOST_SERIALIZATION_NVP(second); +} + +// Run tests by serializing two shared_ptrs into an archive, +// clearing them (deleting the objects) and then reloading the +// objects back from an archive. +template +void save_and_load2(T & first, T & second) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + save2(testfile, first, second); + + // Clear the pointers, thereby destroying the objects they contain + first.reset(); + second.reset(); + + boost::shared_ptr first1, second1; + load2(testfile, first1, second1); + + BOOST_CHECK(first1 == second1); + std::remove(testfile); +} + +template +void save3( + const char * testfile, + const T & first, + const T & second, + const T & third +){ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << BOOST_SERIALIZATION_NVP(third); + oa << BOOST_SERIALIZATION_NVP(first); + oa << BOOST_SERIALIZATION_NVP(second); +} + +template +void load3( + const char * testfile, + T & first, + T & second, + T & third +){ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + // note that we serialize the weak pointer first + ia >> BOOST_SERIALIZATION_NVP(third); + // inorder to test that a temporarily solitary weak pointer + // correcttly restored. + ia >> BOOST_SERIALIZATION_NVP(first); + ia >> BOOST_SERIALIZATION_NVP(second); +} + +// This does the tests +int test_main(int /* argc */, char * /* argv */[]) +{ + // These are our shared_ptrs + boost_132::shared_ptr spa; + + // trivial test 1 + save_and_load(spa); + + //trivial test 2 + spa.reset(); + spa = boost_132::shared_ptr(new A); + save_and_load(spa); + + // Try to save and load pointers to As, to a text archive + spa = boost_132::shared_ptr(new A); + boost_132::shared_ptr spa1 = spa; + save_and_load2(spa, spa1); + + // Try to save and load pointers to Bs, to a text archive + spa = boost_132::shared_ptr(new B); + save_and_load(spa); + + spa1 = spa; + save_and_load2(spa, spa1); + + // obj of type B gets destroyed + // as smart_ptr goes out of scope + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_shared_ptr_multi_base.cpp b/src/boost/libs/serialization/test/test_shared_ptr_multi_base.cpp new file mode 100644 index 000000000..2ebab9816 --- /dev/null +++ b/src/boost/libs/serialization/test/test_shared_ptr_multi_base.cpp @@ -0,0 +1,302 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_shared_ptr_multi_base.cpp + +// (C) Copyright 2002 Robert Ramey- http://www.rrsd.com and Takatoshi Kondo. +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org for updates, documentation, and revision history. + +#include // NULL +#include // remove +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include +#include + +#include +#include + +#include "test_tools.hpp" + +struct Base1 { + Base1() {} + Base1(int x) : m_x(1 + x) {} + virtual ~Base1(){ + } + int m_x; + // serialize + friend class boost::serialization::access; + template + void serialize(Archive &ar, const unsigned int /* file_version */) + { + ar & BOOST_SERIALIZATION_NVP(m_x); + } +}; + +struct Base2 { + Base2() {} + Base2(int x) : m_x(2 + x) {} + int m_x; + virtual ~Base2(){ + } + // serialize + friend class boost::serialization::access; + template + void serialize(Archive &ar, const unsigned int /* file_version */) + { + ar & BOOST_SERIALIZATION_NVP(m_x); + } +}; + +struct Base3 { + Base3() {} + Base3(int x) : m_x(3 + x) {} + virtual ~Base3(){ + } + int m_x; + // serialize + friend class boost::serialization::access; + template + void serialize(Archive &ar, const unsigned int /* file_version */) + { + ar & BOOST_SERIALIZATION_NVP(m_x); + } +}; + +// Sub is a subclass of Base1, Base1 and Base3. +struct Sub:public Base1, public Base2, public Base3 { + static int count; + Sub() { + ++count; + } + Sub(int x) : + Base1(x), + Base2(x), + m_x(x) + { + ++count; + } + Sub(const Sub & rhs) : + m_x(rhs.m_x) + { + ++count; + } + virtual ~Sub() { + assert(0 < count); + --count; + } + int m_x; + // serialize + friend class boost::serialization::access; + template + void serialize(Archive &ar, const unsigned int /* file_version */) + { + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base1); + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base2); + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base3); + ar & BOOST_SERIALIZATION_NVP(m_x); + } +}; + +// Sub needs to be exported because its serialized via a base class pointer +BOOST_CLASS_EXPORT(Sub) +BOOST_SERIALIZATION_SHARED_PTR(Sub) + +int Sub::count = 0; + +template +void save2( + const char * testfile, + const FIRST& first, + const SECOND& second +){ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << BOOST_SERIALIZATION_NVP(first); + oa << BOOST_SERIALIZATION_NVP(second); +} + +template +void load2( + const char * testfile, + FIRST& first, + SECOND& second) +{ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> BOOST_SERIALIZATION_NVP(first); + ia >> BOOST_SERIALIZATION_NVP(second); +} + +// Run tests by serializing two shared_ptrs into an archive, +// clearing them (deleting the objects) and then reloading the +// objects back from an archive. + +template +boost::shared_ptr dynamic_pointer_cast(boost::shared_ptr const & u) +BOOST_NOEXCEPT +{ + return boost::dynamic_pointer_cast(u); +} + +#ifndef BOOST_NO_CXX11_SMART_PTR +template +std::shared_ptr dynamic_pointer_cast(std::shared_ptr const & u) +BOOST_NOEXCEPT +{ + return std::dynamic_pointer_cast(u); +} +#endif + +// Serialization sequence +// First, shared_ptr +// Second, weak_ptr +template +void shared_weak( + SP & first, + WP & second +){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + int firstm = first->m_x; + + BOOST_REQUIRE(! second.expired()); + int secondm = second.lock()->m_x; + save2(testfile, first, second); + + // Clear the pointers, thereby destroying the objects they contain + second.reset(); + first.reset(); + + load2(testfile, first, second); + BOOST_CHECK(! second.expired()); + + // Check data member + BOOST_CHECK(firstm == first->m_x); + BOOST_CHECK(secondm == second.lock()->m_x); + // Check pointer to vtable + BOOST_CHECK(::dynamic_pointer_cast(first)); + BOOST_CHECK(::dynamic_pointer_cast(second.lock())); + + std::remove(testfile); +} + +// Serialization sequence +// First, weak_ptr +// Second, shared_ptr +template +void weak_shared( + WP & first, + SP & second +){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + BOOST_CHECK(! first.expired()); + int firstm = first.lock()->m_x; + int secondm = second->m_x; + save2(testfile, first, second); + + // Clear the pointers, thereby destroying the objects they contain + first.reset(); + second.reset(); + + load2(testfile, first, second); + BOOST_CHECK(! first.expired()); + + // Check data member + BOOST_CHECK(firstm == first.lock()->m_x); + BOOST_CHECK(secondm == second->m_x); + // Check pointer to vtable + BOOST_CHECK(::dynamic_pointer_cast(first.lock())); + BOOST_CHECK(::dynamic_pointer_cast(second)); + + std::remove(testfile); +} + +// This does the tests +template class SPT, template class WPT> +bool test(){ + // Both Sub + SPT tc1_sp(new Sub(10)); + WPT tc1_wp(tc1_sp); + shared_weak(tc1_sp, tc1_wp); + weak_shared(tc1_wp, tc1_sp); + tc1_sp.reset(); + BOOST_CHECK(0 == Sub::count); + + // Sub and Base1 + SPT tc2_sp(new Sub(10)); + WPT tc2_wp(tc2_sp); + shared_weak(tc2_sp, tc2_wp); + weak_shared(tc2_wp, tc2_sp); + tc2_sp.reset(); + BOOST_CHECK(0 == Sub::count); + + // Sub and Base2 + SPT tc3_sp(new Sub(10)); + WPT tc3_wp(tc3_sp); + shared_weak(tc3_sp, tc3_wp); + weak_shared(tc3_wp, tc3_sp); + tc3_sp.reset(); + BOOST_CHECK(0 == Sub::count); + + // Sub and Base3 + SPT tc4_sp(new Sub(10)); + WPT tc4_wp(tc4_sp); + shared_weak(tc4_sp, tc4_wp); + weak_shared(tc4_wp, tc4_sp); + tc4_sp.reset(); + BOOST_CHECK(0 == Sub::count); + + // Base1 and Base2 + SPT tc5_sp_tmp(new Sub(10)); + SPT tc5_sp(tc5_sp_tmp); + WPT tc5_wp(tc5_sp_tmp); + tc5_sp_tmp.reset(); + shared_weak(tc5_sp, tc5_wp); + weak_shared(tc5_wp, tc5_sp); + tc5_sp.reset(); + BOOST_CHECK(0 == Sub::count); + + // Base2 and Base3 + SPT tc6_sp_tmp(new Sub(10)); + SPT tc6_sp(tc6_sp_tmp); + WPT tc6_wp(tc6_sp_tmp); + tc6_sp_tmp.reset(); + shared_weak(tc6_sp, tc6_wp); + weak_shared(tc6_wp, tc6_sp); + tc6_sp.reset(); + BOOST_CHECK(0 == Sub::count); + + // Base3 and Base1 + SPT tc7_sp_tmp(new Sub(10)); + SPT tc7_sp(tc7_sp_tmp); + WPT tc7_wp(tc7_sp_tmp); + tc7_sp_tmp.reset(); + shared_weak(tc7_sp, tc7_wp); + weak_shared(tc7_wp, tc7_sp); + tc7_sp.reset(); + BOOST_CHECK(0 == Sub::count); + + return true; +} + +// This does the tests +int test_main(int /* argc */, char * /* argv */[]) +{ + bool result = true; + result &= test(); + #ifndef BOOST_NO_CXX11_SMART_PTR + result &= test(); + #endif + return result ? EXIT_SUCCESS : EXIT_FAILURE; +} diff --git a/src/boost/libs/serialization/test/test_simple_class.cpp b/src/boost/libs/serialization/test/test_simple_class.cpp new file mode 100644 index 000000000..41c8cb21a --- /dev/null +++ b/src/boost/libs/serialization/test/test_simple_class.cpp @@ -0,0 +1,83 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_simple_class.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +// invoke header for a custom archive test. + +#include // NULL +#include // remove +#include +#include +#include + +#include + +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" + +#include "A.hpp" +#include "A.ipp" + +bool A::check_equal(const A &rhs) const +{ + BOOST_CHECK_EQUAL(b, rhs.b); + BOOST_CHECK_EQUAL(l, rhs.l); + #ifndef BOOST_NO_INT64_T + BOOST_CHECK_EQUAL(f, rhs.f); + BOOST_CHECK_EQUAL(g, rhs.g); + #endif + BOOST_CHECK_EQUAL(m, rhs.m); + BOOST_CHECK_EQUAL(n, rhs.n); + BOOST_CHECK_EQUAL(o, rhs.o); + BOOST_CHECK_EQUAL(p, rhs.p); + BOOST_CHECK_EQUAL(q, rhs.q); + #ifndef BOOST_NO_CWCHAR + BOOST_CHECK_EQUAL(r, rhs.r); + #endif + BOOST_CHECK_EQUAL(c, rhs.c); + BOOST_CHECK_EQUAL(s, rhs.s); + BOOST_CHECK_EQUAL(t, rhs.t); + BOOST_CHECK_EQUAL(u, rhs.u); + BOOST_CHECK_EQUAL(v, rhs.v); + BOOST_CHECK_EQUAL(l, rhs.l); + BOOST_CHECK(std::abs( boost::math::float_distance(w, rhs.w)) < 2); + BOOST_CHECK(std::abs( boost::math::float_distance(x, rhs.x)) < 2); + BOOST_CHECK(!(0 != y.compare(rhs.y))); + #ifndef BOOST_NO_STD_WSTRING + BOOST_CHECK(!(0 != z.compare(rhs.z))); + #endif + return true; +} + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + A a, a1; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("a", a); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("a", a1); + } + a.check_equal(a1); + std::remove(testfile); + return 0; +} diff --git a/src/boost/libs/serialization/test/test_simple_class_ptr.cpp b/src/boost/libs/serialization/test/test_simple_class_ptr.cpp new file mode 100644 index 000000000..795e9a6fa --- /dev/null +++ b/src/boost/libs/serialization/test/test_simple_class_ptr.cpp @@ -0,0 +1,53 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_simple_class_ptr.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULL +#include // remove +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" + +#include "A.hpp" +#include "A.ipp" + +int test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + + BOOST_REQUIRE(NULL != testfile); + + const A *ta = new A(); + A *ta1 = NULL; + + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("ta", ta); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("ta", ta1); + } + BOOST_CHECK(ta != ta1); + BOOST_CHECK(*ta == *ta1); + delete ta; + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_singleton.cpp b/src/boost/libs/serialization/test/test_singleton.cpp new file mode 100644 index 000000000..5d3b88df7 --- /dev/null +++ b/src/boost/libs/serialization/test/test_singleton.cpp @@ -0,0 +1,74 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_singleton.cpp + +// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include +#include + +#include "test_tools.hpp" + +static int i = 0; + +struct A { + int m_id; + A() : m_id(++i) {} + ~A(){ + // verify that objects are destroyed in sequence reverse of construction + if(i-- != m_id) std::terminate(); + } +}; + +struct B { + int m_id; + B() : m_id(++i) {} + ~B(){ + // verify that objects are destroyed in sequence reverse of construction + if(i-- != m_id) std::terminate(); + } +}; + +struct C { + int m_id; + C() : m_id(++i) {} + ~C(){ + // verify that objects are destroyed in sequence reverse of construction + if(i-- != m_id) std::terminate(); + } +}; + +struct D { + int m_id; + D(){ + // verify that only one object is indeed created + const C & c = boost::serialization::singleton::get_const_instance(); + const C & c1 = boost::serialization::singleton::get_const_instance(); + BOOST_CHECK_EQUAL(&c, &c1); + + // verify that objects are created in sequence of definition + BOOST_CHECK_EQUAL(c.m_id, 1); + const B & b = boost::serialization::singleton::get_const_instance(); + BOOST_CHECK_EQUAL(b.m_id, 2); + const A & a = boost::serialization::singleton::get_const_instance(); + BOOST_CHECK_EQUAL(a.m_id, 3); + std::cout << a.m_id << b.m_id << c.m_id << '\n'; + + m_id = ++i; + } + ~D(){ + // verify that objects are destroyed in sequence reverse of construction + if(i-- != m_id) std::terminate(); + } +}; + +int test_main(int, char *[]){ + return 0; +} + +// note: not a singleton +D d; diff --git a/src/boost/libs/serialization/test/test_singleton_inherited.cpp b/src/boost/libs/serialization/test/test_singleton_inherited.cpp new file mode 100644 index 000000000..08164bcf3 --- /dev/null +++ b/src/boost/libs/serialization/test/test_singleton_inherited.cpp @@ -0,0 +1,81 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_singleton_inherited.cpp: +// Test the singleton class for a "inherited" singleton (used as Foo:public singleton) +// This can be uses as singleton::get_const_instance() OR Foo::get_const_instance() +// +// - is_destroyed returns false when singleton is active or uninitialized +// - is_destroyed returns true when singleton is destructed +// - the singleton is eventually destructed (no memory leak) + +// (C) Copyright 2018 Alexander Grund +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include "test_tools.hpp" +#include +#include +#include + +// Can't use BOOST_TEST because: +// a) destructors are called after program exit +// b) This is intended to be used by shared libraries too which would then need their own report_errors call +// We halso have to disable the Wterminate warning as we call this from dtors +// C++ will terminate the program in such cases which is OK here +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wterminate" +#define THROW_ON_FALSE(cond) if(!(cond)) throw std::runtime_error(__FILE__ "(" BOOST_PP_STRINGIZE(__LINE__) ") Assertion failed: " #cond) + +// Enum to designate the state of the singletonized instances +enum ConstructionState{CS_UNINIT, CS_INIT, CS_DESTROYED}; + +// We need another singleton to check for the destruction of the singletons at program exit +// We don't need all the magic for shared library anti-optimization and can keep it very simple +struct controller{ + static controller& getInstance(){ + static controller instance; + return instance; + } + ConstructionState state; +private: + controller() { + state = CS_UNINIT; + } + ~controller(); +}; + +// A simple class that sets its construction state in the controller singleton +struct Foo: boost::serialization::singleton{ + Foo(): i(42) { + // access controller singleton. Therefore controller will be constructed before this + THROW_ON_FALSE(controller::getInstance().state == CS_UNINIT); + controller::getInstance().state = CS_INIT; + } + ~Foo() { + // Because controller is constructed before this, it will be destructed AFTER this. Hence controller is still valid + THROW_ON_FALSE(controller::getInstance().state == CS_INIT); + controller::getInstance().state = CS_DESTROYED; + } + // Volatile to prevent compiler optimization from removing this + volatile int i; +}; + +controller::~controller() { + // If this fails, the singletons were not freed and memory is leaked + THROW_ON_FALSE(state == CS_DESTROYED); + // If this fails, then the destroyed flag is not set and one may use a deleted instance if relying on this flag + THROW_ON_FALSE(boost::serialization::singleton::is_destroyed()); + THROW_ON_FALSE(Foo::is_destroyed()); +} + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + // Check if the singleton is alive and use it + BOOST_CHECK(!boost::serialization::singleton::is_destroyed()); + BOOST_CHECK(!Foo::is_destroyed()); + + BOOST_CHECK(boost::serialization::singleton::get_const_instance().i == 42); + BOOST_CHECK(Foo::get_const_instance().i == 42); + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_singleton_plain.cpp b/src/boost/libs/serialization/test/test_singleton_plain.cpp new file mode 100644 index 000000000..7c3061415 --- /dev/null +++ b/src/boost/libs/serialization/test/test_singleton_plain.cpp @@ -0,0 +1,77 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_singleton_plain.cpp: +// Test the singleton class for a "plain" singleton (used as singleton) +// +// - is_destroyed returns false when singleton is active or uninitialized +// - is_destroyed returns true when singleton is destructed +// - the singleton is eventually destructed (no memory leak) + +// (C) Copyright 2018 Alexander Grund +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include "test_tools.hpp" +#include +#include +#include + +// Can't use BOOST_TEST because: +// a) destructors are called after program exit +// b) This is intended to be used by shared libraries too which would then need their own report_errors call +// We halso have to disable the Wterminate warning as we call this from dtors +// C++ will terminate the program in such cases which is OK here +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wterminate" +#define THROW_ON_FALSE(cond) if(!(cond)) throw std::runtime_error(__FILE__ "(" BOOST_PP_STRINGIZE(__LINE__) ") Assertion failed: " #cond) + +// Enum to designate the state of the singletonized instances +enum ConstructionState{CS_UNINIT, CS_INIT, CS_DESTROYED}; + +// We need another singleton to check for the destruction of the singletons at program exit +// We don't need all the magic for shared library anti-optimization and can keep it very simple +struct controller{ + static controller& getInstance(){ + static controller instance; + return instance; + } + ConstructionState state; +private: + controller() { + state = CS_UNINIT; + } + ~controller(); +}; + +// A simple class that sets its construction state in the controller singleton +struct Foo{ + Foo(): i(42) { + // access controller singleton. Therefore controller will be constructed before this + THROW_ON_FALSE(controller::getInstance().state == CS_UNINIT); + controller::getInstance().state = CS_INIT; + } + ~Foo() { + // Because controller is constructed before this, it will be destructed AFTER this. Hence controller is still valid + THROW_ON_FALSE(controller::getInstance().state == CS_INIT); + controller::getInstance().state = CS_DESTROYED; + } + // Volatile to prevent compiler optimization from removing this + volatile int i; +}; + +controller::~controller() { + // If this fails, the singletons were not freed and memory is leaked + THROW_ON_FALSE(state == CS_DESTROYED); + // If this fails, then the destroyed flag is not set and one may use a deleted instance if relying on this flag + THROW_ON_FALSE(boost::serialization::singleton::is_destroyed()); +} + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + // Check if the singleton is alive and use it + BOOST_CHECK(!boost::serialization::singleton::is_destroyed()); + + BOOST_CHECK(boost::serialization::singleton::get_const_instance().i == 42); + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_slist.cpp b/src/boost/libs/serialization/test/test_slist.cpp new file mode 100644 index 000000000..9c387106d --- /dev/null +++ b/src/boost/libs/serialization/test/test_slist.cpp @@ -0,0 +1,55 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_list.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULL +#include + +#include +#include // remove +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include +#include "test_tools.hpp" + +#include "A.hpp" +#include "A.ipp" + +#include +void test_slist(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_STD_EXTENSION_NAMESPACE::slist aslist; + aslist.push_front(A()); + aslist.push_front(A()); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("aslist", aslist); + } + BOOST_STD_EXTENSION_NAMESPACE::slist aslist1;{ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("aslist", aslist1); + } + BOOST_CHECK(aslist == aslist1); + std::remove(testfile); +} + +int test_main( int /* argc */, char* /* argv */[] ) +{ + test_slist(); + return EXIT_SUCCESS; +} + +// EOF + diff --git a/src/boost/libs/serialization/test/test_slist_ptrs.cpp b/src/boost/libs/serialization/test/test_slist_ptrs.cpp new file mode 100644 index 000000000..e4d830be6 --- /dev/null +++ b/src/boost/libs/serialization/test/test_slist_ptrs.cpp @@ -0,0 +1,88 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_list.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include +#include + +#include +#include // remove +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include +#include +#include + +#include +#include "test_tools.hpp" + +#include + +#include "A.hpp" +#include "A.ipp" + +template +struct ptr_equal_to { + BOOST_STATIC_ASSERT(::boost::is_pointer< T >::value); + bool operator()(T const _Left, T const _Right) const + { + if(NULL == _Left && NULL == _Right) + return true; + if(typeid(*_Left) != typeid(*_Right)) + return false; + return *_Left == *_Right; + } +}; + +#include +void test_slist(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + BOOST_STD_EXTENSION_NAMESPACE::slist aslist; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + aslist.push_front(new A); + aslist.push_front(new A); + oa << boost::serialization::make_nvp("aslist", aslist); + } + BOOST_STD_EXTENSION_NAMESPACE::slist aslist1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("aslist", aslist1); + BOOST_CHECK(aslist.size() == aslist1.size() && + std::equal(aslist.begin(),aslist.end(),aslist1.begin(),ptr_equal_to()) + ); + } + std::for_each( + aslist.begin(), + aslist.end(), + boost::checked_deleter() + ); + std::for_each( + aslist1.begin(), + aslist1.end(), + boost::checked_deleter() + ); + std::remove(testfile); +} + +int test_main( int /* argc */, char* /* argv */[] ) +{ + test_slist(); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_smart_cast.cpp b/src/boost/libs/serialization/test/test_smart_cast.cpp new file mode 100644 index 000000000..97272ad64 --- /dev/null +++ b/src/boost/libs/serialization/test/test_smart_cast.cpp @@ -0,0 +1,236 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_smart_cast.cpp: + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include +#include + +#include "test_tools.hpp" +#include + +using namespace boost::serialization; + +class Base1 : public boost::noncopyable +{ + char a; +}; + +class Base2 +{ + int b; +}; + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +class Derived : public Base1, public Base2 +{ + long c; +}; + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +// if compiler doesn't support TPS, the smart_cast syntax doesn't +// work for references. One has to use the smart_cast_reference +// syntax (tested below ) instead. + +void test_static_reference_cast_2(){ + Derived d; + Base1 & b1 = static_cast(d); + Base2 & b2 = static_cast(d); + + Base1 & scb1 = smart_cast(d); + Base2 & scb2 = smart_cast(d); + BOOST_CHECK_EQUAL(& b1, & scb1); + BOOST_CHECK_EQUAL(& b2, & scb2); + + // downcast +// BOOST_CHECK_EQUAL(& d, & (smart_cast(b1))); +// BOOST_CHECK_EQUAL(& d, & (smart_cast(b2))); + + // crosscast pointers fails at compiler time + // BOOST_CHECK_EQUAL(pB2,smart_cast(pB1)); + // though explicit cross cast will always work + BOOST_CHECK_EQUAL(& b2,( + & smart_cast( + smart_cast(b1) + )) + ); +} + +void test_static_reference_cast_1(){ + Derived d; + Base1 & b1 = static_cast(d); + Base2 & b2 = static_cast(d); + + Base1 & scb1 = smart_cast_reference(d); + Base2 & scb2 = smart_cast_reference(d); + BOOST_CHECK_EQUAL(& b1, & scb1); + BOOST_CHECK_EQUAL(& b2, & scb2); + + // downcast + BOOST_CHECK_EQUAL(& d, & (smart_cast_reference(b1))); + BOOST_CHECK_EQUAL(& d, & (smart_cast_reference(b2))); + + // crosscast pointers fails at compiler time + // BOOST_CHECK_EQUAL(pB2,smart_cast(pB1)); + // though explicit cross cast will always work + BOOST_CHECK_EQUAL(& b2,( + & smart_cast_reference( + smart_cast_reference(b1) + )) + ); +} + +void test_static_pointer_cast(){ + // pointers + Derived d; + Derived *pD = & d; + Base1 *pB1 = pD; + Base2 *pB2 = pD; + + // upcast + BOOST_CHECK_EQUAL(pB1, smart_cast(pD)); + BOOST_CHECK_EQUAL(pB2, smart_cast(pD)); + + // downcast + BOOST_CHECK_EQUAL(pD, smart_cast(pB1)); + BOOST_CHECK_EQUAL(pD, smart_cast(pB2)); + + // crosscast pointers fails at compiler time + // BOOST_CHECK_EQUAL(pB2, smart_cast(pB1)); + + // though explicit cross cast will always work + BOOST_CHECK_EQUAL(pB2, + smart_cast( + smart_cast(pB1) + ) + ); +} + +class VBase1 : public boost::noncopyable +{ + char a; +public: + virtual ~VBase1(){}; +}; + +class VBase2 +{ + int b; +public: + virtual ~VBase2(){}; +}; + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +class VDerived : public VBase1, public VBase2 +{ + long c; +public: + virtual ~VDerived(){}; +}; + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +// see above + +void test_dynamic_reference_cast_2(){ + VDerived d; + VBase1 &b1 = dynamic_cast(d); + VBase2 &b2 = static_cast(d); + + VBase1 & vb1 = smart_cast(d); + BOOST_CHECK_EQUAL(& b1, & vb1); + BOOST_CHECK_EQUAL(& b2, (& smart_cast(d))); + + // downcast + BOOST_CHECK_EQUAL(& d, (& smart_cast(b1))); + BOOST_CHECK_EQUAL(& d, (& smart_cast(b2))); + + // crosscast + BOOST_CHECK_EQUAL(& b2, (& smart_cast(b1))); + + // explicit cross cast should always work + BOOST_CHECK_EQUAL(& b2, ( + & smart_cast( + smart_cast(b1) + )) + ); +} + +void test_dynamic_reference_cast_1(){ + VDerived d; + VBase1 &b1 = dynamic_cast(d); + VBase2 &b2 = static_cast(d); + + VBase1 & vb1 = smart_cast_reference(d); + BOOST_CHECK_EQUAL(& b1, & vb1); + BOOST_CHECK_EQUAL(& b2, (& smart_cast_reference(d))); + + // downcast + BOOST_CHECK_EQUAL(& d, (& smart_cast_reference(b1))); + BOOST_CHECK_EQUAL(& d, (& smart_cast_reference(b2))); + + // crosscast + BOOST_CHECK_EQUAL(& b2, (& smart_cast_reference(b1))); + + // explicit cross cast should always work + BOOST_CHECK_EQUAL(& b2, ( + & smart_cast_reference( + smart_cast_reference(b1) + )) + ); +} + +void test_dynamic_pointer_cast(){ + // pointers + VDerived d; + VDerived *pD = & d; + VBase1 *pB1 = pD; + VBase2 *pB2 = pD; + + // upcast + BOOST_CHECK_EQUAL(pB1, smart_cast(pD)); + BOOST_CHECK_EQUAL(pB2, smart_cast(pD)); + + // downcast + BOOST_CHECK_EQUAL(pD, smart_cast(pB1)); + BOOST_CHECK_EQUAL(pD, smart_cast(pB2)); + + // crosscast pointers fails at compiler time + BOOST_CHECK_EQUAL(pB2, smart_cast(pB1)); + // though explicit cross cast will always work + BOOST_CHECK_EQUAL(pB2, + smart_cast( + smart_cast(pB1) + ) + ); +} + +int +test_main(int /* argc */, char * /* argv */[]) +{ + test_static_reference_cast_2(); + test_static_reference_cast_1(); + test_static_pointer_cast(); + test_dynamic_reference_cast_2(); + test_dynamic_reference_cast_1(); + test_dynamic_pointer_cast(); + + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_split.cpp b/src/boost/libs/serialization/test/test_split.cpp new file mode 100644 index 000000000..9350272fe --- /dev/null +++ b/src/boost/libs/serialization/test/test_split.cpp @@ -0,0 +1,165 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_split.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULL +#include // remove +#include + +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" + +#include +#include + +class A +{ + friend class boost::serialization::access; + template + void save( + Archive & /* ar */, + const unsigned int /* file_version */ + ) const { + ++(const_cast(*this).count); + } + template + void load( + Archive & /* ar */, + const unsigned int /* file_version */ + ){ + --count; + } + BOOST_SERIALIZATION_SPLIT_MEMBER() + int count; +public: + A() : count(0) {} + ~A() { + BOOST_CHECK(0 == count); + } +}; + +class B +{ + friend class boost::serialization::access; + template + void save( + Archive & /* ar */, + const unsigned int /* file_version */ + ) const { + ++(const_cast(*this).count); + } + template + void load( + Archive & /* ar */, + const unsigned int /* file_version */ + ){ + --count; + } + int count; +public: + B() : count(0) {} + ~B() { + BOOST_CHECK(0 == count); + } +}; + +// function specializations must be defined in the appropriate +// namespace - boost::serialization +namespace boost { +namespace serialization { + +template +void serialize( + Archive & ar, + B & b, + const unsigned int file_version +){ + boost::serialization::split_member(ar, b, file_version); +} + +} // serialization +} // namespace boost + +class C +{ +public: + int count; + C() : count(0) {} + ~C() { + BOOST_CHECK(0 == count); + } +}; + +namespace boost { +namespace serialization { + +template +void save( + Archive & /* ar */, + const C & c, + const unsigned int /* file_version */ +){ + ++(const_cast(c).count); +} + +template +void load( + Archive & /* ar */, + C & c, + const unsigned int /* file_version */ +){ + --c.count; +} + +} // serialization +} // namespace boost + +BOOST_SERIALIZATION_SPLIT_FREE(C) + +void out(const char *testfile, A & a, B & b, C & c) +{ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << BOOST_SERIALIZATION_NVP(a); + oa << BOOST_SERIALIZATION_NVP(b); + oa << BOOST_SERIALIZATION_NVP(c); +} + +void in(const char *testfile, A & a, B & b, C & c) +{ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> BOOST_SERIALIZATION_NVP(a); + ia >> BOOST_SERIALIZATION_NVP(b); + ia >> BOOST_SERIALIZATION_NVP(c); +} + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + A a; + B b; + C c; + + out(testfile, a, b, c); + in(testfile, a, b, c); + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_stack.cpp b/src/boost/libs/serialization/test/test_stack.cpp new file mode 100644 index 000000000..4d0ee27bf --- /dev/null +++ b/src/boost/libs/serialization/test/test_stack.cpp @@ -0,0 +1,56 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_stack.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include +#include + +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" + +#include +#include +#include + +#include "A.hpp" +#include "A.ipp" + +int test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + // test array of objects + std::stack > astack, astack1; + astack.push(A()); + astack.push(A()); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("astack",astack); + } + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("astack",astack1); + } + BOOST_CHECK(astack == astack1); + + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_static_warning.cpp b/src/boost/libs/serialization/test/test_static_warning.cpp new file mode 100644 index 000000000..642b9cf3a --- /dev/null +++ b/src/boost/libs/serialization/test/test_static_warning.cpp @@ -0,0 +1,63 @@ +// (C) Copyright Jonathan Turkanis 2004. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version including documentation. + +// note: this is a compile only test. + +#include // BOOST_STATIC_CONST +#include +#include + +#include + +typedef char a1[2]; +typedef char a2[3]; + +class polymorphic { + virtual ~polymorphic(); +}; + +class non_polymorphic { +}; + +template +int f(){ + BOOST_STATIC_WARNING(T::value); + return 0; +} + +struct A { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +///////////////////////////////////////////////////////////////////////// +// compilation of this program should show a total of 10 warning messages + +// should show NO warning message +BOOST_STATIC_WARNING(true); + +// the following should show 5 warning message +int x = f(); // Warn +int y = f >(); // Warn. +int z = f >(); + +BOOST_STATIC_WARNING(sizeof(a1) == sizeof(a2)); // Warn. +BOOST_STATIC_WARNING(sizeof(a1) != sizeof(a1)); // Warn. +BOOST_STATIC_WARNING(! boost::is_polymorphic::value); // Warn. +BOOST_STATIC_WARNING(boost::is_polymorphic::value); // Warn. + +int main(int /* argc */, char * /* argv */[]){ + // should show NO warning message + BOOST_STATIC_WARNING(true); + + // the following should show 5 warning message + f(); + BOOST_STATIC_WARNING(sizeof(a1) == sizeof(a2)); // Warn. + BOOST_STATIC_WARNING(sizeof(a1) != sizeof(a1)); // Warn. + BOOST_STATIC_WARNING(! boost::is_polymorphic::value); // Warn. + BOOST_STATIC_WARNING(boost::is_polymorphic::value); // Warn. + return 0; +} diff --git a/src/boost/libs/serialization/test/test_strong_typedef.cpp b/src/boost/libs/serialization/test/test_strong_typedef.cpp new file mode 100644 index 000000000..0dc59c9a4 --- /dev/null +++ b/src/boost/libs/serialization/test/test_strong_typedef.cpp @@ -0,0 +1,71 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_strong_typedef.cpp + +// (C) Copyright 2016 Ashish Sadanandan +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation +#include // EXIT_SUCCESS + +#include +#include +#include + +#include +#include +#include + +/////////////////////////////////////////////////////////////////////// +// Define a strong typedef for int. +// The new type should be nothrow constructible and assignable. + +BOOST_STRONG_TYPEDEF(int, strong_int) + +#ifndef BOOST_HAS_NOTHROW_CONSTRUCTOR +BOOST_STATIC_ASSERT(boost::has_nothrow_default_constructor::value); +BOOST_STATIC_ASSERT(boost::has_nothrow_copy_constructor::value); +BOOST_STATIC_ASSERT(boost::has_nothrow_assign::value); +#endif + +/////////////////////////////////////////////////////////////////////// +// strong_int can now be placed in another type, which can also be +// nothrow constructible and assignable. + +struct type1 +{ + long some_long; + strong_int sint; +}; + +#ifndef BOOST_HAS_NOTHROW_CONSTRUCTOR +BOOST_STATIC_ASSERT(boost::has_nothrow_default_constructor::value); +BOOST_STATIC_ASSERT(boost::has_nothrow_copy_constructor::value); +BOOST_STATIC_ASSERT(boost::has_nothrow_assign::value); +#endif + +/////////////////////////////////////////////////////////////////////// +// Now define a type that throws, and a strong_typedef for it +// The strong_typedef should also not have nothrow construction/assign. + +struct not_noexcept +{ + not_noexcept() {} + not_noexcept(not_noexcept const&) {} + not_noexcept& operator=(not_noexcept const&) {return *this;} + bool operator==(not_noexcept const&) const {return false;} + bool operator<(not_noexcept const&) const {return false;} +}; +BOOST_STRONG_TYPEDEF(not_noexcept, strong_not_noexcept) + +#ifndef BOOST_HAS_NOTHROW_CONSTRUCTOR +BOOST_STATIC_ASSERT(! boost::has_nothrow_default_constructor::value); +BOOST_STATIC_ASSERT(! boost::has_nothrow_copy_constructor::value); +BOOST_STATIC_ASSERT(! boost::has_nothrow_assign::value); +#endif + +int main() +{ + return EXIT_SUCCESS; +} diff --git a/src/boost/libs/serialization/test/test_tools.hpp b/src/boost/libs/serialization/test/test_tools.hpp new file mode 100644 index 000000000..09c0c1c30 --- /dev/null +++ b/src/boost/libs/serialization/test/test_tools.hpp @@ -0,0 +1,264 @@ +#ifndef BOOST_SERIALIZATION_TEST_TOOLS_HPP +#define BOOST_SERIALIZATION_TEST_TOOLS_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +#define BOOST_FILESYSTEM_VERSION 3 +#include // unique_path + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_tools.hpp +// +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#include +#ifndef BOOST_NO_EXCEPTION_STD_NAMESPACE + #include +#endif +#include + +#if defined(UNDER_CE) + +// Windows CE does not supply the tmpnam function in its CRT. +// Substitute a primitive implementation here. +namespace boost { +namespace archive { + const char * tmpnam(char * buffer){ + static char ibuffer [512]; + if(NULL == buffer) + buffer = ibuffer; + + static unsigned short index = 0; + std::sprintf(buffer, "\\tmpfile%05X.tmp", index++); + return buffer; + } +} // archive +} // boost + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +// win32 has a brain-dead tmpnam implementation. +// which leaves temp files in root directory +// regardless of environmental settings + +#include +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; + using ::strcpy; + using ::strcat; + using ::tmpnam; +} +#endif // defined(BOOST_NO_STDC_NAMESPACE) + +#include +#include + +//#if defined(__COMO__) + #define chdir _chdir +//#endif // defined win32 + +#if defined(NDEBUG) && defined(__BORLANDC__) + #define STRCPY strcpy +#else + #define STRCPY std::strcpy +#endif + +namespace boost { +namespace archive { + const char * test_filename(const char * dir = NULL, char *fname = NULL){ + static char ibuffer [512]; + ibuffer[0] = '\0'; + if(NULL == dir){ + dir = boost::archive::tmpdir(); + } + STRCPY(ibuffer, dir); + std::strcat(ibuffer, "/"); + if(NULL == fname){ + char old_dir[256]; + _getcwd(old_dir, sizeof(old_dir) - 1); + chdir(dir); + // (C) Copyright 2010 Dean Michael Berris. + // Instead of using std::tmpnam, we use Boost.Filesystem's unique_path + boost::filesystem::path tmp_path = + boost::filesystem::unique_path("%%%%%"); + std::strcat(ibuffer, tmp_path.string().c_str()); + chdir(old_dir); + } + else{ + std::strcat(ibuffer, fname); + } + return ibuffer; + } + const char * tmpnam(char * buffer){ + const char * name = test_filename(NULL, NULL); + if(NULL != buffer){ + STRCPY(buffer, name); + } + return name; + } +} // archive +} // boost + +#else // defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +#if defined(__hpux) +// (C) Copyright 2006 Boris Gubenko. +// HP-UX has a restriction that for multi-thread applications, (i.e. +// the ones compiled -mt) if argument to tmpnam is a NULL pointer, then, +// citing the tmpnam(3S) manpage, "the operation is not performed and a +// NULL pointer is returned". tempnam does not have this restriction, so, +// let's use tempnam instead. + +#define tmpnam(X) tempnam(NULL,X) + +namespace boost { +namespace archive { + using ::tmpnam; +} // archive +} // boost + +#else // defined(__hpux) + +// (C) Copyright 2010 Dean Michael Berris. +// Instead of using the potentially dangrous tempnam function that's part +// of the C standard library, on Unix/Linux we use the more portable and +// "safe" unique_path function provided in the Boost.Filesystem library. + +#include + +namespace boost { +namespace archive { + char const * tmpnam(char * buffer) { + static char name[512] = {0}; + if (name[0] == 0) { + boost::filesystem::path tempdir(tmpdir()); + boost::filesystem::path tempfilename = + boost::filesystem::unique_path("serialization-%%%%"); + boost::filesystem::path temp = tempdir / tempfilename; + std::strcat(name, temp.string().c_str()); + } + if (buffer != 0) std::strcpy(buffer, name); + return name; + } +} // archive +} // boost + +#endif // defined(__hpux) +#endif // defined(_WIN32) || defined(__WIN32__) || defined(WIN32) + +#include + +#define BOOST_CHECK( P ) \ + BOOST_TEST( (P) ) +#define BOOST_REQUIRE( P ) \ + BOOST_TEST( (P) ) +#define BOOST_CHECK_MESSAGE( P, M ) \ + ((P)? (void)0 : ::boost::detail::error_impl( (M) , __FILE__, __LINE__, BOOST_CURRENT_FUNCTION)) +#define BOOST_REQUIRE_MESSAGE( P, M ) \ + BOOST_CHECK_MESSAGE( (P), (M) ) +#define BOOST_CHECK_EQUAL( A , B ) \ + BOOST_TEST( (A) == (B) ) + +namespace boost { namespace detail { +inline void msg_impl(char const * msg, char const * file, int line, char const * function) +{ + std::cerr << file << "(" << line << "): " << msg << " in function '" << function << "'" << std::endl; +} +} } // boost::detail + +#define BOOST_WARN_MESSAGE( P, M ) \ + ((P)? (void)0 : ::boost::detail::msg_impl( (M) , __FILE__, __LINE__, BOOST_CURRENT_FUNCTION)) +#define BOOST_MESSAGE( M ) \ + BOOST_WARN_MESSAGE( true , (M) ) + +#define BOOST_CHECKPOINT( M ) \ + BOOST_WARN_MESSAGE( true , (M) ) + +//#define BOOST_TEST_DONT_PRINT_LOG_VALUE( T ) + +#define BOOST_FAIL( M ) BOOST_REQUIRE_MESSAGE( false, (M) ) +#define EXIT_SUCCESS 0 + +int test_main(int argc, char * argv[]); + +#include + +int +main(int argc, char * argv[]){ + boost::serialization::get_singleton_module().lock(); + + int retval = 1; + BOOST_TRY{ + retval = test_main(argc, argv); + } + #ifndef BOOST_NO_EXCEPTION_STD_NAMESPACE + BOOST_CATCH(const std::exception & e){ + BOOST_ERROR(e.what()); + } + #endif + BOOST_CATCH(...){ + BOOST_ERROR("failed with uncaught exception:"); + } + BOOST_CATCH_END + + boost::serialization::get_singleton_module().unlock(); + + int error_count = boost::report_errors(); + if(error_count > 0) + retval = error_count; + return retval; +} + +// the following is to ensure that when one of the libraries changes +// BJAM rebuilds and relinks the test. +/* +#include "text_archive.hpp" +#include "text_warchive.hpp" +#include "binary_archive.hpp" +#include "xml_archive.hpp" +#include "xml_warchive.hpp" + +#include "polymorphic_text_archive.hpp" +#include "polymorphic_text_warchive.hpp" +#include "polymorphic_binary_archive.hpp" +#include "polymorphic_xml_archive.hpp" +#include "polymorphic_xml_warchive.hpp" +*/ + +///////////////////////////////////////////// +// invoke header for a custom archive test. + +///////////////////////////////////////////// +// invoke header for a custom archive test. +#if ! defined(BOOST_ARCHIVE_TEST) +#define BOOST_ARCHIVE_TEST text_archive.hpp +#endif + +#include +#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST) + +#ifndef TEST_STREAM_FLAGS + #define TEST_STREAM_FLAGS (std::ios_base::openmode)0 +#endif + +#ifndef TEST_ARCHIVE_FLAGS + #define TEST_ARCHIVE_FLAGS 0 +#endif + +#ifndef TEST_DIRECTORY +#define TEST_DIRECTORY +#else +#define __x__ TEST_DIRECTORY +#undef TEST_DIRECTORY +#define TEST_DIRECTORY BOOST_PP_STRINGIZE(__x__) +#endif + +#endif // BOOST_SERIALIZATION_TEST_TOOLS_HPP diff --git a/src/boost/libs/serialization/test/test_tracking.cpp b/src/boost/libs/serialization/test/test_tracking.cpp new file mode 100644 index 000000000..24e6f0099 --- /dev/null +++ b/src/boost/libs/serialization/test/test_tracking.cpp @@ -0,0 +1,130 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_tracking_save.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULL +#include + +#include +#include // remove +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" +#include +#include + +#define TEST_CLASS(N, TRACKING) \ +class N \ +{ \ + friend class boost::serialization::access; \ + template \ + void serialize(Archive & /* ar */, const unsigned int /* file_version */){ \ + ++count; \ + } \ +public: \ + static unsigned int count; \ +}; \ +unsigned int N::count = 0;\ +BOOST_CLASS_TRACKING(N, TRACKING) + +TEST_CLASS(AN, ::boost::serialization::track_never) +TEST_CLASS(AS, ::boost::serialization::track_selectively) +TEST_CLASS(AA, ::boost::serialization::track_always) + +// test pointers +TEST_CLASS(PAN, ::boost::serialization::track_never) +TEST_CLASS(PAS, ::boost::serialization::track_selectively) +TEST_CLASS(PAA, ::boost::serialization::track_always) + +void out(const char *testfile) +{ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + // write object twice to check tracking + AN an; + AS as; + AA aa; + oa << BOOST_SERIALIZATION_NVP(an) << BOOST_SERIALIZATION_NVP(an); + BOOST_CHECK(an.count == 2); + oa << BOOST_SERIALIZATION_NVP(as) << BOOST_SERIALIZATION_NVP(as); + BOOST_CHECK(as.count == 2); + oa << BOOST_SERIALIZATION_NVP(aa) << BOOST_SERIALIZATION_NVP(aa); + BOOST_CHECK(aa.count == 1); + + PAN *pan = new PAN; + PAS *pas = new PAS; + PAA *paa = new PAA; + oa << BOOST_SERIALIZATION_NVP(pan) << BOOST_SERIALIZATION_NVP(pan); + BOOST_CHECK(pan->count == 2); + oa << BOOST_SERIALIZATION_NVP(pas) << BOOST_SERIALIZATION_NVP(pas); + BOOST_CHECK(pas->count == 1); + oa << BOOST_SERIALIZATION_NVP(paa) << BOOST_SERIALIZATION_NVP(paa); + BOOST_CHECK(paa->count == 1); + delete pan; + delete pas; + delete paa; +} + +void in(const char *testfile) +{ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + // read object twice to check tracking + AN an; + AS as; + AA aa; + + AN::count = 0; + AS::count = 0; + AA::count = 0; + + ia >> BOOST_SERIALIZATION_NVP(an) >> BOOST_SERIALIZATION_NVP(an); + BOOST_CHECK(an.count == 2); + ia >> BOOST_SERIALIZATION_NVP(as) >> BOOST_SERIALIZATION_NVP(as); + BOOST_CHECK(as.count == 2); + ia >> BOOST_SERIALIZATION_NVP(aa) >> BOOST_SERIALIZATION_NVP(aa); + BOOST_CHECK(aa.count == 1); + + PAN::count = 0; + PAS::count = 0; + PAA::count = 0; + + PAN *pan = NULL; + PAS *pas = NULL; + PAA *paa = NULL; + ia >> BOOST_SERIALIZATION_NVP(pan); + ia >> BOOST_SERIALIZATION_NVP(pan); + BOOST_CHECK(pan->count == 2); + ia >> BOOST_SERIALIZATION_NVP(pas); + ia >> BOOST_SERIALIZATION_NVP(pas); + BOOST_CHECK(pas->count == 1); + ia >> BOOST_SERIALIZATION_NVP(paa); + ia >> BOOST_SERIALIZATION_NVP(paa); + BOOST_CHECK(paa->count == 1); + delete pan; + delete pas; + delete paa; +} + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + out(testfile); + in(testfile); + std::remove(testfile); + return EXIT_SUCCESS; +} + diff --git a/src/boost/libs/serialization/test/test_traits_fail.cpp b/src/boost/libs/serialization/test/test_traits_fail.cpp new file mode 100644 index 000000000..6816528bb --- /dev/null +++ b/src/boost/libs/serialization/test/test_traits_fail.cpp @@ -0,0 +1,40 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_traits_fail.cpp: test implementation level trait + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// compile test for traits +#include "test_tools.hpp" +#include +#include + +class A +{ +}; + +BOOST_CLASS_IMPLEMENTATION(A, boost::serialization::not_serializable) +// It can make no sense to assign a version number to a class that +// is not serialized with class information +BOOST_CLASS_VERSION(A, 2) // should fail during compile +// It can make no sense to assign tracking behavior to a class that +// is not serializable. Should fail during compile. +BOOST_CLASS_TRACKING(A, boost::serialization::track_never) + +class B +{ +}; + +BOOST_CLASS_IMPLEMENTATION(B, boost::serialization::object_class_info) +BOOST_CLASS_VERSION(B, 2) +BOOST_CLASS_TRACKING(B, boost::serialization::track_always) + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_traits_pass.cpp b/src/boost/libs/serialization/test/test_traits_pass.cpp new file mode 100644 index 000000000..d4a16e9e1 --- /dev/null +++ b/src/boost/libs/serialization/test/test_traits_pass.cpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_traits_pass.cpp: test implementation level trait + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// compile test for traits +#include "test_tools.hpp" + +#include +#include +#include + +class B +{ +}; + +BOOST_CLASS_IMPLEMENTATION(B, boost::serialization::object_class_info) +BOOST_CLASS_VERSION(B, 2) +BOOST_CLASS_TRACKING(B, boost::serialization::track_always) + +int +test_main( int argc, char* argv[] ) +{ + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_unique_ptr.cpp b/src/boost/libs/serialization/test/test_unique_ptr.cpp new file mode 100644 index 000000000..c465ea3c2 --- /dev/null +++ b/src/boost/libs/serialization/test/test_unique_ptr.cpp @@ -0,0 +1,70 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_unique_ptr.cpp + +// (C) Copyright 2002-14 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#include // remove, std::auto_ptr interface wrong in dinkumware +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif +#include + +#include "test_tools.hpp" + +///////////////////////////////////////////////////////////// +// test std::unique_ptr serialization +class A +{ +private: + friend class boost::serialization::access; + int x; + template + void serialize(Archive &ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_NVP(x); + } +public: + A(){} // default constructor + ~A(){} // default destructor +}; + +#ifndef BOOST_NO_CXX11_SMART_PTR +#include + +int test_main(int /* argc */, char * /* argv */[]){ + const char * filename = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != filename); + + // create a new auto pointer to ta new object of type A + std::unique_ptr spa(new A); + { + test_ostream os(filename, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << BOOST_SERIALIZATION_NVP(spa); + } + { + // reset the unique_ptr to NULL + // thereby destroying the object of type A + // note that the reset automagically maintains the reference count + spa.reset(); + test_istream is(filename, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> BOOST_SERIALIZATION_NVP(spa); + std::remove(filename); + } + return EXIT_SUCCESS; +} + +#else + +int test_main(int /* argc */, char * /* argv */[]){ + return EXIT_SUCCESS; +} + +#endif // BOOST_NO_CXX11_SMART_PTR diff --git a/src/boost/libs/serialization/test/test_unregistered.cpp b/src/boost/libs/serialization/test/test_unregistered.cpp new file mode 100644 index 000000000..c7de75eeb --- /dev/null +++ b/src/boost/libs/serialization/test/test_unregistered.cpp @@ -0,0 +1,313 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_unregistered.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include + +#include // NULL +#include // remove +#include // strcmp +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" + +#include +#include +#include +#include + +class polymorphic_base +{ + friend class boost::serialization::access; + template + void serialize(Archive & /* ar */, const unsigned int /* file_version */){ + } +public: + virtual ~polymorphic_base(){}; +}; + +class polymorphic_derived1 : public polymorphic_base +{ + friend class boost::serialization::access; + template + void serialize(Archive &ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(polymorphic_base); + } +}; + +class polymorphic_derived2 : public polymorphic_base +{ + friend class boost::serialization::access; + template + void serialize(Archive &ar, const unsigned int /* file_version */){ + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(polymorphic_base); + } +}; + +struct type1 { + template + void serialize(Archive&, unsigned int ver) { + BOOST_CHECK(ver == 1); + } +}; +struct type2 { + template + void serialize(Archive&, unsigned int ver) { + BOOST_CHECK(ver == 2); + } +}; + +BOOST_CLASS_VERSION(type1, 1); +BOOST_CLASS_VERSION(type2, 2); + +// save unregistered polymorphic classes +void save_unregistered1(const char *testfile) +{ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + + polymorphic_base *rb1 = new polymorphic_derived1; + + // registration IS necessary when serializing a polymorphic class + // through pointer to the base class + bool except = false; + BOOST_TRY { + oa << BOOST_SERIALIZATION_NVP(rb1); + } + BOOST_CATCH(boost::archive::archive_exception const& aex){ + except = true; + } + BOOST_CATCH_END + BOOST_CHECK_MESSAGE(except, "lack of registration not detected !"); + + delete rb1; +} + +// note: the corresponding save function above will not result in +// valid archive - hence, the following code which attempts to load +// and archive will fail. Leave this as a reminder not to do this +#if 0 +// load unregistered polymorphic classes +void load_unregistered1(const char *testfile) +{ + std::ifstream is(testfile); + boost::archive::iarchive ia(is); + + polymorphic_base *rb1(NULL); + + // registration IS necessary when serializing a polymorphic class + // through pointer to the base class + bool except = false; + BOOST_TRY { + ia >> BOOST_SERIALIZATION_NVP(rb1); + } + BOOST_CATCH(boost::archive::archive_exception const& aex){ + except = true; + BOOST_CHECK_MESSAGE( + NULL == rb1, + "failed load resulted in a non-null pointer" + ); + } + BOOST_CATCH_END + BOOST_CHECK_MESSAGE(except, "lack of registration not detected !"); + + delete rb1; +} +#endif + +// save unregistered polymorphic classes +void save_unregistered2(const char *testfile) +{ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + + polymorphic_derived1 *rd1 = new polymorphic_derived1; + + // registration is NOT necessary when serializing a polymorphic class + // through pointer to a derived class + bool except = false; + BOOST_TRY { + oa << BOOST_SERIALIZATION_NVP(rd1); + } + BOOST_CATCH(boost::archive::archive_exception const& aex){ + except = true; + } + BOOST_CATCH_END + BOOST_CHECK_MESSAGE(! except, "registration not detected !"); + + delete rd1; +} + +// note: the corresponding save function above will not result in +// valid archive - hence, the following code which attempts to load +// and archive will fail. Leave this as a reminder not to do this +// load unregistered polymorphic classes +void load_unregistered2(const char *testfile) +{ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + + polymorphic_derived1 *rd1 = NULL; + + // registration is NOT necessary when serializing a polymorphic class + // or through pointer to a derived class + bool except = false; + BOOST_TRY { + ia >> BOOST_SERIALIZATION_NVP(rd1); + } + BOOST_CATCH(boost::archive::archive_exception const& aex){ + except = true; + BOOST_CHECK_MESSAGE( + NULL == rd1, + "failed load resulted in a non-null pointer" + ); + } + BOOST_CATCH_END + BOOST_CHECK_MESSAGE(! except, "registration not detected !"); + + delete rd1; +} + +// save registered polymorphic class +void save_registered(const char *testfile) +{ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + + polymorphic_base *rb1 = new polymorphic_derived1; + polymorphic_base *rb2 = new polymorphic_derived2; + + // registration (forward declaration) will permit correct serialization + // through a pointer to a base class + oa.register_type(static_cast(NULL)); + oa.register_type(static_cast(NULL)); + oa << BOOST_SERIALIZATION_NVP(rb1); + oa << BOOST_SERIALIZATION_NVP(rb2); + + delete rb1; + delete rb2; +} + +// load registered polymorphic class +void load_registered(const char *testfile) +{ + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + + polymorphic_base *rb1 = NULL; + polymorphic_base *rb2 = NULL; + + // registration (forward declaration) will permit correct serialization + // through a pointer to a base class + ia.register_type(static_cast(NULL)); + ia.register_type(static_cast(NULL)); + + ia >> BOOST_SERIALIZATION_NVP(rb1); + + BOOST_CHECK_MESSAGE(NULL != rb1, "Load resulted in NULL pointer"); + BOOST_CHECK_MESSAGE( + boost::serialization::type_info_implementation< + polymorphic_derived1 + >::type::get_const_instance() + == + * boost::serialization::type_info_implementation< + polymorphic_base + >::type::get_const_instance().get_derived_extended_type_info(*rb1), + "restored pointer b1 not of correct type" + ); + + ia >> BOOST_SERIALIZATION_NVP(rb2); + BOOST_CHECK_MESSAGE(NULL != rb2, "Load resulted in NULL pointer"); + BOOST_CHECK_MESSAGE( + boost::serialization::type_info_implementation< + polymorphic_derived2 + >::type::get_const_instance() + == + * boost::serialization::type_info_implementation< + polymorphic_base + >::type::get_const_instance().get_derived_extended_type_info(*rb2), + "restored pointer b2 not of correct type" + ); + + delete rb1; + delete rb2; +} + +// store a pointer from slot0 +void save_unregistered_pointer(const char *testfile) +{ + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + + oa.register_type(static_cast(NULL)); + + type1 instance1; + type2 *pointer2 = new type2; + + BOOST_TRY { + oa & BOOST_SERIALIZATION_NVP(instance1) & BOOST_SERIALIZATION_NVP(pointer2); + } + BOOST_CATCH(...) { + BOOST_CHECK_MESSAGE(false, "unexpected exception"); + } + BOOST_CATCH_END + + delete pointer2; +} + +// load a pointer from slot0 which has no pointer serializer +void load_unregistered_pointer(const char *testfile) +{ + test_istream is(testfile); + test_iarchive ia(is); + + type1 instance1; + type2 *pointer2(NULL); + + bool except = false; + BOOST_TRY { + ia & BOOST_SERIALIZATION_NVP(instance1) & BOOST_SERIALIZATION_NVP(pointer2); + } + BOOST_CATCH(boost::archive::archive_exception const& aex){ + except = true; + BOOST_CHECK_MESSAGE( + std::strcmp(aex.what(), "unregistered class") == 0, + "incorrect exception" + ); + } + BOOST_CATCH_END + BOOST_CHECK_MESSAGE(except, "lack of registration not detected !"); + BOOST_CHECK_MESSAGE(NULL == pointer2, "expected failed load"); + + delete pointer2; +} + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + save_unregistered1(testfile); +// load_unregistered1(testfile); + save_unregistered2(testfile); + load_unregistered2(testfile); + save_registered(testfile); + load_registered(testfile); + save_unregistered_pointer(testfile); + load_unregistered_pointer(testfile); + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_valarray.cpp b/src/boost/libs/serialization/test/test_valarray.cpp new file mode 100644 index 000000000..84d5c30dd --- /dev/null +++ b/src/boost/libs/serialization/test/test_valarray.cpp @@ -0,0 +1,56 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_valarrray.cpp + +// (C) Copyright 2005 Matthias Troyer . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULL +#include + +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include "test_tools.hpp" + +#include + +int test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + // test array of objects + std::valarray avalarray(2); + avalarray[0] = 42; + avalarray[1] = -42; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("avalarray", avalarray); + } + std::valarray avalarray1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("avalarray", avalarray1); + } + bool equal = ( avalarray.size() == avalarray1.size() + && avalarray[0] == avalarray1[0] + && avalarray[1] == avalarray1[1] + ); + + BOOST_CHECK(equal); + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_variant.cpp b/src/boost/libs/serialization/test/test_variant.cpp new file mode 100644 index 000000000..dcf91d13c --- /dev/null +++ b/src/boost/libs/serialization/test/test_variant.cpp @@ -0,0 +1,299 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_variant.cpp +// test of non-intrusive serialization of variant types +// +// copyright (c) 2005 +// troy d. straszheim +// http://www.resophonic.com +// +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org for updates, documentation, and revision history. +// +// thanks to Robert Ramey and Peter Dimov. +// + +#include // NULL +#include // remove +#include +#include +#include // float_distance +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include +#include +#include +#include + +#if defined(_MSC_VER) && (_MSC_VER <= 1020) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#include "test_tools.hpp" + +#include + +#include +#include + +#include "A.hpp" +#include "A.ipp" + +class are_equal + : public boost::static_visitor +{ +public: + // note extra rigamorole for compilers which don't support + // partial function template ordering - specfically msvc 6.x + struct same { + template + static bool invoke(const T & t, const U & u){ + return t == u; + } + }; + + struct not_same { + template + static bool invoke(const T &, const U &){ + return false; + } + }; + + template + bool operator()( const T & t, const U & u) const + { + typedef typename boost::mpl::eval_if, + boost::mpl::identity, + boost::mpl::identity + >::type type; + return type::invoke(t, u); + } + + bool operator()( const float & lhs, const float & rhs ) const + { + return std::abs( boost::math::float_distance(lhs, rhs)) < 2; + } + bool operator()( const double & lhs, const double & rhs ) const + { + return std::abs( boost::math::float_distance(lhs, rhs)) < 2; + } +}; + +template +void test_type(const T& gets_written){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(testfile != NULL); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("written", gets_written); + } + + T got_read; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("written", got_read); + } + BOOST_CHECK(boost::apply_visitor(are_equal(), gets_written, got_read)); + + std::remove(testfile); +} + +// this verifies that if you try to read in a variant from a file +// whose "which" is illegal for the one in memory (that is, you're +// reading in to a different variant than you wrote out to) the load() +// operation will throw. One could concievably add checking for +// sequence length as well, but this would add size to the archive for +// dubious benefit. +// +void do_bad_read() +{ + // Compiling this test invokes and ICE on msvc 6 + // So, we'll just to skip it for this compiler + #if defined(_MSC_VER) && (_MSC_VER <= 1020) + boost::variant big_variant; + big_variant = std::string("adrenochrome"); + + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(testfile != NULL); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << BOOST_SERIALIZATION_NVP(big_variant); + } + boost::variant little_variant; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + bool exception_invoked = false; + BOOST_TRY { + ia >> BOOST_SERIALIZATION_NVP(little_variant); + } BOOST_CATCH (boost::archive::archive_exception const& e) { + BOOST_CHECK(boost::archive::archive_exception::unsupported_version == e.code); + exception_invoked = true; + } + BOOST_CATCH_END + BOOST_CHECK(exception_invoked); + } + #endif +} + +struct H { + int i; +}; + +namespace boost { +namespace serialization { + +template +void serialize(Archive &ar, H & h, const unsigned int /*file_version*/){ + ar & boost::serialization::make_nvp("h", h.i); +} + +} // namespace serialization +} // namespace boost + +inline bool operator==(H const & lhs, H const & rhs) { + return lhs.i == rhs.i; +} + +inline bool operator!=(H const & lhs, H const & rhs) { + return !(lhs == rhs); +} + +inline bool operator<(H const & lhs, H const & rhs) { + return lhs.i < rhs.i; +} + +inline std::size_t hash_value(H const & val) { + return val.i; +} + +void test_pointer(){ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(testfile != NULL); + typedef boost::variant variant_t; + H const h = {5}; + variant_t v(h); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("written", v); + const H * h_ptr = & boost::strict_get(v); + oa << boost::serialization::make_nvp("written", h_ptr); + } + variant_t v2; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("written", v2); + H * h2_ptr; + ia >> boost::serialization::make_nvp("written", h2_ptr); + BOOST_CHECK_EQUAL(h, boost::strict_get(v2)); + BOOST_CHECK_EQUAL(h2_ptr, & boost::strict_get(v2)); + } + BOOST_CHECK_EQUAL(v, v2); +} + +#include +#include + +// test a pointer to an object contained into a variant that is an +// element of a set +void test_variant_set() +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(testfile != NULL); + typedef boost::variant variant_t; + typedef std::set uset_t; + uset_t set; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + H const h = {5}; + variant_t v(h); + set.insert(v); + oa << boost::serialization::make_nvp("written", set); + H const * const h_ptr = boost::strict_get(&(*set.begin())); + oa << boost::serialization::make_nvp("written", h_ptr); + } + uset_t set2; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("written", set2); + H * h_ptr; + ia >> boost::serialization::make_nvp("written", h_ptr); + const H * h_ptr2 = & boost::strict_get(*set2.begin()); + BOOST_CHECK_EQUAL(h_ptr, h_ptr2); + } + BOOST_CHECK_EQUAL(set, set2); +} + +// test a pointer to an object contained into a variant that is an +// element of a map +void test_variant_map() +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(testfile != NULL); + typedef boost::variant variant_t; + typedef std::map map_t; + map_t map; + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + H const h = {5}; + variant_t v(h); + map[0] = v; + BOOST_ASSERT(1 == map.size()); + oa << boost::serialization::make_nvp("written", map); + H const * const h_ptr = boost::strict_get(&map[0]); + BOOST_CHECK_EQUAL(h_ptr, boost::strict_get(&map[0])); + oa << boost::serialization::make_nvp("written", h_ptr); + } + map_t map2; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("written", map2); + BOOST_ASSERT(1 == map2.size()); + H * h_ptr; + ia >> boost::serialization::make_nvp("written", h_ptr); + H const * const h_ptr2 = boost::strict_get(&map2[0]); + BOOST_CHECK_EQUAL(h_ptr, h_ptr2); + } + BOOST_CHECK_EQUAL(map, map2); +} + +int test_main( int /* argc */, char* /* argv */[] ) +{ + { + boost::variant v; + v = false; + test_type(v); + v = 1; + test_type(v); + v = (float) 2.3; + test_type(v); + v = (double) 6.4; + test_type(v); + v = std::string("we can't stop here, this is Bat Country"); + test_type(v); + v = A(); + test_type(v); + } + test_pointer(); + test_variant_set(); + test_variant_map(); + do_bad_read(); + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_vector.cpp b/src/boost/libs/serialization/test/test_vector.cpp new file mode 100644 index 000000000..1064c92e4 --- /dev/null +++ b/src/boost/libs/serialization/test/test_vector.cpp @@ -0,0 +1,128 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_vector.cpp + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULL +#include + +#include // remove +#include +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif +#include +#include "test_tools.hpp" + +#include + +// normal class with default constructor +#include "A.hpp" +#include "A.ipp" + +template +int test_vector_detail(const std::vector & avector) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + // test array of objects + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + oa << boost::serialization::make_nvp("avector", avector); + } + std::vector< T > avector1; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("avector", avector1); + } + BOOST_CHECK(avector == avector1); + std::remove(testfile); + return EXIT_SUCCESS; +} + +template +int test_default_constructible() +{ + // test array of objects + std::vector avector; + avector.push_back(T()); + avector.push_back(T()); + return test_vector_detail(avector); +} + +// class without default constructor +struct X { + //BOOST_DELETED_FUNCTION(X()); +public: + int m_i; + X(const X & x) : + m_i(x.m_i) + {} + X(const int & i) : + m_i(i) + {} + bool operator==(const X & rhs) const { + return m_i == rhs.m_i; + } + template + void serialize(Archive & ar, const unsigned int /*version*/){ + ar & BOOST_SERIALIZATION_NVP(m_i); + } +}; + +template +inline void save_construct_data( + Archive & ar, + const X * x, + const unsigned int /* file_version */ +){ + // variable used for construction + ar << boost::serialization::make_nvp("i", x->m_i); +} + +template +inline void load_construct_data( + Archive & ar, + X * x, + const unsigned int /* file_version */ +){ + int i; + ar >> boost::serialization::make_nvp("i", i); + ::new(x)X(i); +} + +int test_non_default_constructible() +{ + // test array of objects + std::vector avector; + avector.push_back(X(123)); + avector.push_back(X(456)); + return test_vector_detail(avector); +} + +int test_main( int /* argc */, char* /* argv */[] ) +{ + int res; + res = test_default_constructible(); + // test an int vector for which optimized versions should be available + if (res == EXIT_SUCCESS) + res = test_default_constructible(); + // test a bool vector + if (res == EXIT_SUCCESS) + res = test_default_constructible(); + if (res == EXIT_SUCCESS) + res = test_non_default_constructible(); + return res; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_void_cast.cpp b/src/boost/libs/serialization/test/test_void_cast.cpp new file mode 100644 index 000000000..1538ab2b0 --- /dev/null +++ b/src/boost/libs/serialization/test/test_void_cast.cpp @@ -0,0 +1,165 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_void_cast.cpp: test implementation of run-time casting of void pointers + +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +#include // NULL +#include "test_tools.hpp" +#include +#include +#include + +class Base1 +{ + char a; +}; + +class Base2 +{ + int b; +}; + +class Derived : public Base1, public Base2 +{ + long c; +}; + +class MostDerived : public Derived +{ + char d[32]; +}; + +template +const boost::serialization::extended_type_info & eti(){ + return boost::serialization::singleton< + boost::serialization::extended_type_info_typeid< T > + >::get_const_instance(); +} + +int +test_main( int /* argc */, char* /* argv */[] ) +{ + MostDerived md; + MostDerived* pmd =& md; + Derived* pd = static_cast(pmd); + + Base2* pb2 = static_cast(pmd); + Base1* pb1 = static_cast(pd); + + void* vpmd = static_cast(pmd); + void* vpb1 = static_cast(pb1); + void* vpb2 = static_cast(pb2); + void* vpd = static_cast(pd); + + // simple casts only requiring table lookup + BOOST_CHECK(vpd == boost::serialization::void_downcast( + eti(), + eti(), + vpb1 + )); + BOOST_CHECK(vpb1 == boost::serialization::void_upcast( + eti(), + eti(), + vpd + )); + BOOST_CHECK(vpd == boost::serialization::void_downcast( + eti(), + eti(), + vpb2 + )); + BOOST_CHECK(vpb2 == boost::serialization::void_upcast( + eti(), + eti(), + vpd + )); + BOOST_CHECK(vpmd == boost::serialization::void_downcast( + eti(), + eti(), + vpd + )); + BOOST_CHECK(vpd == boost::serialization::void_upcast( + eti(), + eti(), + vpmd + )); + // note relationship between MostDerived and Base1 is automatically derived + BOOST_CHECK(vpmd == boost::serialization::void_downcast( + eti(), + eti(), + vpb1 + )); + BOOST_CHECK(vpb1 == boost::serialization::void_upcast( + eti(), + eti(), + vpmd + )); + + // note relationship between MostDerived and Base2 is automatically derived + BOOST_CHECK(vpmd == boost::serialization::void_downcast( + eti(), + eti(), + vpb2 + )); + BOOST_CHECK(vpb2 == boost::serialization::void_upcast( + eti(), + eti(), + vpmd + )); + + // note: currently derivations are not optimised. See void_cast.cpp + // for and explanation. These should still work though. + + // need to double check to validate speed up optimization of derivations + BOOST_CHECK(vpmd == boost::serialization::void_downcast( + eti(), + eti(), + vpb1 + )); + BOOST_CHECK(vpb1 == boost::serialization::void_upcast( + eti(), + eti(), + vpmd + )); + BOOST_CHECK(vpmd == boost::serialization::void_downcast( + eti(), + eti(), + vpb2 + )); + BOOST_CHECK(vpb2 == boost::serialization::void_upcast( + eti(), + eti(), + vpmd + )); + + // check things that should fail + BOOST_CHECK(NULL == boost::serialization::void_downcast( + eti(), + eti(), + vpb1 + )); + + // note that a fundamental feature is that derived/base pairs are created + // at compiler time so that all are registered before the main program starts + // so leave the registration here at the end to verify this. Note bogus arguments + // to workaround msvc 6 bug + boost::serialization::void_cast_register( + static_cast(NULL), + static_cast(NULL) + ); + boost::serialization::void_cast_register( + static_cast(NULL), + static_cast(NULL) + ); + boost::serialization::void_cast_register( + static_cast(NULL), + static_cast(NULL) + ); + + return EXIT_SUCCESS; +} + +// EOF diff --git a/src/boost/libs/serialization/test/test_z.cpp b/src/boost/libs/serialization/test/test_z.cpp new file mode 100644 index 000000000..6023aab24 --- /dev/null +++ b/src/boost/libs/serialization/test/test_z.cpp @@ -0,0 +1,779 @@ +#if 0 +#include +#include +#include + +#include +#include +#include +#include + +struct Foo +{ + Foo(int aBar) : + mBar(aBar) + { + if (mBar > 10) + { + throw std::logic_error("too big bar"); + } + } + int bar() const + { + return mBar; + } + bool operator==(const Foo & rhs) const { + return mBar == rhs.mBar; + } +private: + int mBar; +}; + +namespace boost { +namespace serialization { + +template +inline void serialize(Archive & ar, Foo& foo, const unsigned int /*version*/) +{ + std::cout << __FUNCTION__ << " called" << std::endl; +} + +template +inline void save_construct_data(Archive & ar, const Foo* foo, const unsigned int /*version*/) +{ + std::cout << __FUNCTION__ << " called" << std::endl; + ar & foo->bar(); +} + +template +inline void load_construct_data(Archive & ar, Foo* foo, const unsigned int /*version*/) +{ + std::cout << __FUNCTION__ << " called" << std::endl; + int bar; + ar & bar; + ::new(foo) Foo(bar); +} + +} // serialization +} // boost + + +int main() +{ + boost::optional oldFoo = Foo(10); + std::ostringstream outStream; + boost::archive::text_oarchive outArchive(outStream); + outArchive & oldFoo; + + boost::optional newFoo; + std::istringstream inStream(outStream.str()); + boost::archive::text_iarchive inArchive(inStream); + inArchive & newFoo; + + return !(newFoo == oldFoo); +} + +#elif 0 +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// test_optional.cpp + +// (C) Copyright 2004 Pavel Vozenilek +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// should pass compilation and execution + +#include // NULL +#include // remove +#include + +#include + +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::remove; +} +#endif + +#include + +#define BOOST_ARCHIVE_TEST xml_archive.hpp + +#include "test_tools.hpp" + +#include + +#include "A.hpp" +#include "A.ipp" + +int test_main( int /* argc */, char* /* argv */[] ) +{ + const char * testfile = boost::archive::tmpnam(NULL); + BOOST_REQUIRE(NULL != testfile); + + const boost::optional aoptional1; + const boost::optional aoptional2(123); + { + test_ostream os(testfile, TEST_STREAM_FLAGS); + test_oarchive oa(os, TEST_ARCHIVE_FLAGS); + //oa << boost::serialization::make_nvp("aoptional1",aoptional1); + //oa << boost::serialization::make_nvp("aoptional2",aoptional2); + } + /* + boost::optional aoptional1a(999); + boost::optional aoptional2a; + { + test_istream is(testfile, TEST_STREAM_FLAGS); + test_iarchive ia(is, TEST_ARCHIVE_FLAGS); + ia >> boost::serialization::make_nvp("aoptional1",aoptional1a); + ia >> boost::serialization::make_nvp("aoptional2",aoptional2a); + } + BOOST_CHECK(aoptional1 == aoptional1a); + BOOST_CHECK(aoptional2 == aoptional2a); + */ + std::remove(testfile); + return EXIT_SUCCESS; +} + +// EOF + +#elif 0 + +#include + +#include +#include +#include + +#include "test_tools.hpp" + +int test_main(int, char *argv[]) +{ + const char * testfile = boost::archive::tmpnam(NULL); + std::string s1 = "kkkabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"; + std::wstring w1 = L"kkk"; + std::wstring w2 = L"апр"; // some non-latin (for example russians) letters + { + std::wofstream ofs(testfile); + { + boost::archive::xml_woarchive oa(ofs); + oa << boost::serialization::make_nvp("key1", s1); + //oa << boost::serialization::make_nvp("key2", w1); + //oa << boost::serialization::make_nvp("key3", w2); // here exception is thrown + } + } + std::string new_s1; + //std::wstring new_w1; + //std::wstring new_w2; + { + std::wifstream ifs(testfile); + { + boost::archive::xml_wiarchive ia(ifs); + ia >> boost::serialization::make_nvp("key1", new_s1); + //ia >> boost::serialization::make_nvp("key2", new_w1); + //ia >> boost::serialization::make_nvp("key3", new_w2); // here exception is thrown + } + } + BOOST_CHECK(s1 == new_s1); + //BOOST_CHECK(w1 == new_w1); + //BOOST_CHECK(w2 == new_w2); + return 0; +} + +#elif 0 + +#include +#include + +#include + +int main() { + boost::archive::xml_oarchive oa( std::cerr ); + int bob = 3; + oa << boost::serialization::make_nvp( "bob", bob ); +} + +#elif 0 + +#include +#include +#include + +//#include +#include +#include +#include +#include + +struct boxed_int +{ + boxed_int() : i(0) {} + boxed_int(int i) : i(i) {} + int i; + template + void serialize(Archive &ar, unsigned version) + { + ar & BOOST_SERIALIZATION_NVP(i); + } +}; +typedef boost::shared_ptr pi; + +void go(std::istream &is) { + std::vector vv; + try + { + boost::archive::binary_iarchive ia(is); + ia & vv; + } + catch(std::exception &e) {} +} + +int main(int argc, char **argv) { + if(argc > 1) { + std::ifstream is(argv[1]); + go(is); + } else { + go(std::cin); + } + + return 0; +} + +#elif 0 + +#include +#include + +#include +#include + +namespace bai = boost::archive::iterators; +int main() +{ + std::string input = + "A large rose-tree stood near the entrance of the garden: the roses growing on it were white, but there were " + "three gardeners at it, busily painting them red. Alice thought this a very curious thing, and she went nearer " + "to watch them, and just as she came up to them she heard one of them say, 'Look out now, Five! Don't go " + "splashing paint over me like that!''I couldn't help it,' said Five, in a sulky tone; 'Seven jogged my " + "elbow.'On which Seven looked up and said, 'That's right, Five! Always lay the blame on others!''You'd better " + "not talk!' said Five. 'I heard the Queen say only yesterday you deserved to be beheaded!''What for?' said the " + "one who had spoken first.'That's none of your business, Two!' said Seven.'Yes, it is his business!' said " + "Five, 'and I'll tell him—it was for bringing the cook tulip-roots instead of onions.'Seven flung down his " + "brush, and had just begun 'Well, of all the unjust things—' when his eye chanced to fall upon Alice, as she " + "stood watching them, and he checked himself suddenly: the others looked round also, and all of them bowed " + "low.'Would you tell me,' said Alice, a little timidly, 'why you are painting those roses?'Five and Seven said " + "nothing, but looked at Two. Two began in a low voice, 'Why the fact is, you see, Miss, this here ought to " + "have been a red rose-tree, and we put a white one in by mistake; and if the Queen was to find it out, we " + "should all have our heads cut off, you know. So you see, Miss, we're doing our best, afore she comes, to—' At " + "this moment Five, who had been anxiously looking across the garden, called out 'The Queen! The Queen!' and " + "the three gardeners instantly threw themselves flat upon their faces. There was a sound of many footsteps, " + "and Alice looked round, eager to see the Queen.First came ten soldiers carrying clubs; these were all shaped " + "like the three gardeners, oblong and flat, with their hands and feet at the corners: next the ten courtiers; " + "these were ornamented all over with diamonds, and walked two and two, as the soldiers did. After these came " + "the royal children; there were ten of them, and the little dears came jumping merrily along hand in hand, in " + "couples: they were all ornamented with hearts. Next came the guests, mostly Kings and Queens, and among them " + "Alice recognised the White Rabbit: it was talking in a hurried nervous manner, smiling at everything that was " + "said, and went by without noticing her. Then followed the Knave of Hearts, carrying the King's crown on a " + "crimson velvet cushion; and, last of all this grand procession, came THE KING AND QUEEN OF HEARTS.Alice was " + "rather doubtful whether she ought not to lie down on her face like the three gardeners, but she could not " + "remember ever having heard of such a rule at processions; 'and besides, what would be the use of a " + "procession,' thought she, 'if people had all to lie down upon their faces, so that they couldn't see it?' So " + "she stood still where she was, and waited.When the procession came opposite to Alice, they all stopped and " + "looked at her, and the Queen said severely 'Who is this?' She said it to the Knave of Hearts, who only bowed " + "and smiled in reply.'Idiot!' said the Queen, tossing her head impatiently; and, turning to Alice, she went " + "on, 'What's your name, child?''My name is Alice, so please your Majesty,' said Alice very politely; but she " + "added, to herself, 'Why, they're only a pack of cards, after all. I needn't be afraid of them!''And who are " + "these?' said the Queen, pointing to the three gardeners who were lying round the rosetree; for, you see, as " + "they were lying on their faces, and the pattern on their backs was the same as the rest of the pack, she " + "could not tell whether they were gardeners, or soldiers, or courtiers, or three of her own children.'How " + "should I know?' said Alice, surprised at her own courage. 'It's no business of mine.'The Queen turned crimson " + "with fury, and, after glaring at her for a moment like a wild beast, screamed 'Off with her head! " + "Off—''Nonsense!' said Alice, very loudly and decidedly, and the Queen was silent.The King laid his hand upon " + "her arm, and timidly said 'Consider, my dear: she is only a child!'The Queen turned angrily away from him, " + "and said to the Knave 'Turn them over!'The Knave did so, very carefully, with one foot.'Get up!' said the " + "Queen, in a shrill, loud voice, and the three gardeners instantly jumped up, and began bowing to the King, " + "the Queen, the royal children, and everybody else.'Leave off that!' screamed the Queen. 'You make me giddy.' " + "And then, turning to the rose-tree, she went on, 'What have you been doing here?''May it please your " + "Majesty,' said Two, in a very humble tone, going down on one knee as he spoke, 'we were trying—''I see!' said " + "the Queen, who had meanwhile been examining the roses. 'Off with their heads!' and the procession moved on, " + "three of the soldiers remaining behind to execute the unfortunate gardeners, who ran to Alice for " + "protection.'You shan't be beheaded!' said Alice, and she put them into a large flower-pot that stood near. " + "The three soldiers wandered about for a minute or two, looking for them, and then quietly marched off after " + "the others.'Are their heads off?' shouted the Queen.'Their heads are gone, if it please your Majesty!' the " + "soldiers shouted in reply.'That's right!' shouted the Queen. 'Can you play croquet?'The soldiers were silent, " + "and looked at Alice, as the question was evidently meant for her.'Yes!' shouted Alice.'Come on, then!' roared " + "the Queen, and Alice joined the procession, wondering very much what would happen next.'It's—it's a very fine " + "day!' said a timid voice at her side. She was walking by the White Rabbit, who was peeping anxiously into her " + "face.'Very,' said Alice: '—where's the Duchess?''Hush! Hush!' said the Rabbit in a low, hurried tone. He " + "looked anxiously over his shoulder as he spoke, and then raised himself upon tiptoe, put his mouth close to " + "her ear, and whispered 'She's under sentence of execution.''What for?' said Alice.'Did you say \"What a " + "pity!\"?' the Rabbit asked.'No, I didn't,' said Alice: 'I don't think it's at all a pity. I said \"What " + "for?\"''She boxed the Queen's ears—' the Rabbit began. Alice gave a little scream of laughter. 'Oh, hush!' " + "the Rabbit whispered in a frightened tone. 'The Queen will hear you! You see, she came rather late, and the " + "Queen said—''Get to your places!' shouted the Queen in a voice of thunder, and people began running about in " + "all directions, tumbling up against each other; however, they got settled down in a minute or two, and the " + "game began. Alice thought she had never seen such a curious croquet-ground in her life; it was all ridges and " + "furrows; the balls were live hedgehogs, the mallets live flamingoes, and the soldiers had to double " + "themselves up and to stand on their hands and feet, to make the arches.The chief difficulty Alice found at " + "first was in managing her flamingo: she succeeded in getting its body tucked away, comfortably enough, under " + "her arm, with its legs hanging down, but generally, just as she had got its neck nicely straightened out, and " + "was going to give the hedgehog a blow with its head, it would twist itself round and look up in her face, " + "with such a puzzled expression that she could not help bursting out laughing: and when she had got its head " + "down, and was going to begin again, it was very provoking to find that the hedgehog had unrolled itself, and " + "was in the act of crawling away: besides all this, there was generally a ridge or furrow in the way wherever " + "she wanted to send the hedgehog to, and, as the doubled-up soldiers were always getting up and walking off to " + "other parts of the ground, Alice soon came to the conclusion that it was a very difficult game indeed.The " + "players all played at once without waiting for turns, quarrelling all the while, and fighting for the " + "hedgehogs; and in a very short time the Queen was in a furious passion, and went stamping about, and shouting " + "'Off with his head!' or 'Off with her head!' about once in a minute.Alice began to feel very uneasy: to be " + "sure, she had not as yet had any dispute with the Queen, but she knew that it might happen any minute, 'and " + "then,' thought she, 'what would become of me? They're dreadfully fond of beheading people here; the great " + "wonder is, that there's any one left alive!'She was looking about for some way of escape, and wondering " + "whether she could get away without being seen, when she noticed a curious appearance in the air: it puzzled " + "her very much at first, but, after watching it a minute or two, she made it out to be a grin, and she said to " + "herself 'It's the Cheshire Cat: now I shall have somebody to talk to.''How are you getting on?' said the Cat, " + "as soon as there was mouth enough for it to speak with.Alice waited till the eyes appeared, and then nodded. " + "'It's no use speaking to it,' she thought, 'till its ears have come, or at least one of them.' In another " + "minute the whole head appeared, and then Alice put down her flamingo, and began an account of the game, " + "feeling very glad she had someone to listen to her. The Cat seemed to think that there was enough of it now " + "in sight, and no more of it appeared.'I don't think they play at all fairly,' Alice began, in rather a " + "complaining tone, 'and they all quarrel so dreadfully one can't hear oneself speak—and they don't seem to " + "have any rules in particular; at least, if there are, nobody attends to them—and you've no idea how confusing " + "it is all the things being alive; for instance, there's the arch I've got to go through next walking about at " + "the other end of the ground—and I should have croqueted the Queen's hedgehog just now, only it ran away when " + "it saw mine coming!''How do you like the Queen?' said the Cat in a low voice.'Not at all,' said Alice: 'she's " + "so extremely—' Just then she noticed that the Queen was close behind her, listening: so she went on, '—likely " + "to win, that it's hardly worth while finishing the game.'The Queen smiled and passed on.'Who are you talking " + "to?' said the King, going up to Alice, and looking at the Cat's head with great curiosity.'It's a friend of " + "mine—a Cheshire Cat,' said Alice: 'allow me to introduce it.''I don't like the look of it at all,' said the " + "King: 'however, it may kiss my hand if it likes.''I'd rather not,' the Cat remarked.'Don't be impertinent,' " + "said the King, 'and don't look at me like that!' He got behind Alice as he spoke.'A cat may look at a king,' " + "said Alice. 'I've read that in some book, but I don't remember where.''Well, it must be removed,' said the " + "King very decidedly, and he called the Queen, who was passing at the moment, 'My dear! I wish you would have " + "this cat removed!'The Queen had only one way of settling all difficulties, great or small. 'Off with his " + "head!' she said, without even looking round.'I'll fetch the executioner myself,' said the King eagerly, and " + "he hurried off.Alice thought she might as well go back, and see how the game was going on, as she heard the " + "Queen's voice in the distance, screaming with passion. She had already heard her sentence three of the " + "players to be executed for having missed their turns, and she did not like the look of things at all, as the " + "game was in such confusion that she never knew whether it was her turn or not. So she went in search of her " + "hedgehog.The hedgehog was engaged in a fight with another hedgehog, which seemed to Alice an excellent " + "opportunity for croqueting one of them with the other: the only difficulty was, that her flamingo was gone " + "across to the other side of the garden, where Alice could see it trying in a helpless sort of way to fly up " + "into a tree.By the time she had caught the flamingo and brought it back, the fight was over, and both the " + "hedgehogs were out of sight: 'but it doesn't matter much,' thought Alice, 'as all the arches are gone from " + "this side of the ground.' So she tucked it away under her arm, that it might not escape again, and went back " + "for a little more conversation with her friend.When she got back to the Cheshire Cat, she was surprised to " + "find quite a large crowd collected round it: there was a dispute going on between the executioner, the King, " + "and the Queen, who were all talking at once, while all the rest were quite silent, and looked very " + "uncomfortable.The moment Alice appeared, she was appealed to by all three to settle the question, and they " + "repeated their arguments to her, though, as they all spoke at once, she found it very hard indeed to make out " + "exactly what they said.The executioner's argument was, that you couldn't cut off a head unless there was a " + "body to cut it off from: that he had never had to do such a thing before, and he wasn't going to begin at his " + "time of life.The King's argument was, that anything that had a head could be beheaded, and that you weren't " + "to talk nonsense.The Queen's argument was, that if something wasn't done about it in less than no time she'd " + "have everybody executed, all round. (It was this last remark that had made the whole party look so grave and " + "anxious.)Alice could think of nothing else to say but 'It belongs to the Duchess: you'd better ask her about " + "it.''She's in prison,' the Queen said to the executioner: 'fetch her here.' And the executioner went off like " + "an arrow.The Cat's head began fading away the moment he was gone, and, by the time he had come back with the " + "Duchess, it had entirely disappeared; so the King and the executioner ran wildly up and down looking for it, " + "while the rest of the party went back to the game."; + std::string output = + "QSBsYXJnZSByb3NlLXRyZWUgc3Rvb2QgbmVhciB0aGUgZW50cmFuY2Ugb2YgdGhlIGdhcmRlbjogdGhlIHJvc2VzIGdyb3dpbmcgb24gaXQgd2" + "VyZSB3aGl0ZSwgYnV0IHRoZXJlIHdlcmUgdGhyZWUgZ2FyZGVuZXJzIGF0IGl0LCBidXNpbHkgcGFpbnRpbmcgdGhlbSByZWQuIEFsaWNlIHRo" + "b3VnaHQgdGhpcyBhIHZlcnkgY3VyaW91cyB0aGluZywgYW5kIHNoZSB3ZW50IG5lYXJlciB0byB3YXRjaCB0aGVtLCBhbmQganVzdCBhcyBzaG" + "UgY2FtZSB1cCB0byB0aGVtIHNoZSBoZWFyZCBvbmUgb2YgdGhlbSBzYXksICdMb29rIG91dCBub3csIEZpdmUhIERvbid0IGdvIHNwbGFzaGlu" + "ZyBwYWludCBvdmVyIG1lIGxpa2UgdGhhdCEnJ0kgY291bGRuJ3QgaGVscCBpdCwnIHNhaWQgRml2ZSwgaW4gYSBzdWxreSB0b25lOyAnU2V2ZW" + "4gam9nZ2VkIG15IGVsYm93LidPbiB3aGljaCBTZXZlbiBsb29rZWQgdXAgYW5kIHNhaWQsICdUaGF0J3MgcmlnaHQsIEZpdmUhIEFsd2F5cyBs" + "YXkgdGhlIGJsYW1lIG9uIG90aGVycyEnJ1lvdSdkIGJldHRlciBub3QgdGFsayEnIHNhaWQgRml2ZS4gJ0kgaGVhcmQgdGhlIFF1ZWVuIHNheS" + "Bvbmx5IHllc3RlcmRheSB5b3UgZGVzZXJ2ZWQgdG8gYmUgYmVoZWFkZWQhJydXaGF0IGZvcj8nIHNhaWQgdGhlIG9uZSB3aG8gaGFkIHNwb2tl" + "biBmaXJzdC4nVGhhdCdzIG5vbmUgb2YgeW91ciBidXNpbmVzcywgVHdvIScgc2FpZCBTZXZlbi4nWWVzLCBpdCBpcyBoaXMgYnVzaW5lc3MhJy" + "BzYWlkIEZpdmUsICdhbmQgSSdsbCB0ZWxsIGhpbeKAlGl0IHdhcyBmb3IgYnJpbmdpbmcgdGhlIGNvb2sgdHVsaXAtcm9vdHMgaW5zdGVhZCBv" + "ZiBvbmlvbnMuJ1NldmVuIGZsdW5nIGRvd24gaGlzIGJydXNoLCBhbmQgaGFkIGp1c3QgYmVndW4gJ1dlbGwsIG9mIGFsbCB0aGUgdW5qdXN0IH" + "RoaW5nc+" + "KAlCcgd2hlbiBoaXMgZXllIGNoYW5jZWQgdG8gZmFsbCB1cG9uIEFsaWNlLCBhcyBzaGUgc3Rvb2Qgd2F0Y2hpbmcgdGhlbSwgYW5kIGhlIGNo" + "ZWNrZWQgaGltc2VsZiBzdWRkZW5seTogdGhlIG90aGVycyBsb29rZWQgcm91bmQgYWxzbywgYW5kIGFsbCBvZiB0aGVtIGJvd2VkIGxvdy4nV2" + "91bGQgeW91IHRlbGwgbWUsJyBzYWlkIEFsaWNlLCBhIGxpdHRsZSB0aW1pZGx5LCAnd2h5IHlvdSBhcmUgcGFpbnRpbmcgdGhvc2Ugcm9zZXM/" + "J0ZpdmUgYW5kIFNldmVuIHNhaWQgbm90aGluZywgYnV0IGxvb2tlZCBhdCBUd28uIFR3byBiZWdhbiBpbiBhIGxvdyB2b2ljZSwgJ1doeSB0aG" + "UgZmFjdCBpcywgeW91IHNlZSwgTWlzcywgdGhpcyBoZXJlIG91Z2h0IHRvIGhhdmUgYmVlbiBhIHJlZCByb3NlLXRyZWUsIGFuZCB3ZSBwdXQg" + "YSB3aGl0ZSBvbmUgaW4gYnkgbWlzdGFrZTsgYW5kIGlmIHRoZSBRdWVlbiB3YXMgdG8gZmluZCBpdCBvdXQsIHdlIHNob3VsZCBhbGwgaGF2ZS" + "BvdXIgaGVhZHMgY3V0IG9mZiwgeW91IGtub3cuIFNvIHlvdSBzZWUsIE1pc3MsIHdlJ3JlIGRvaW5nIG91ciBiZXN0LCBhZm9yZSBzaGUgY29t" + "ZXMsIHRv4oCUJyBBdCB0aGlzIG1vbWVudCBGaXZlLCB3aG8gaGFkIGJlZW4gYW54aW91c2x5IGxvb2tpbmcgYWNyb3NzIHRoZSBnYXJkZW4sIG" + "NhbGxlZCBvdXQgJ1RoZSBRdWVlbiEgVGhlIFF1ZWVuIScgYW5kIHRoZSB0aHJlZSBnYXJkZW5lcnMgaW5zdGFudGx5IHRocmV3IHRoZW1zZWx2" + "ZXMgZmxhdCB1cG9uIHRoZWlyIGZhY2VzLiBUaGVyZSB3YXMgYSBzb3VuZCBvZiBtYW55IGZvb3RzdGVwcywgYW5kIEFsaWNlIGxvb2tlZCByb3" + "VuZCwgZWFnZXIgdG8gc2VlIHRoZSBRdWVlbi5GaXJzdCBjYW1lIHRlbiBzb2xkaWVycyBjYXJyeWluZyBjbHViczsgdGhlc2Ugd2VyZSBhbGwg" + "c2hhcGVkIGxpa2UgdGhlIHRocmVlIGdhcmRlbmVycywgb2Jsb25nIGFuZCBmbGF0LCB3aXRoIHRoZWlyIGhhbmRzIGFuZCBmZWV0IGF0IHRoZS" + "Bjb3JuZXJzOiBuZXh0IHRoZSB0ZW4gY291cnRpZXJzOyB0aGVzZSB3ZXJlIG9ybmFtZW50ZWQgYWxsIG92ZXIgd2l0aCBkaWFtb25kcywgYW5k" + "IHdhbGtlZCB0d28gYW5kIHR3bywgYXMgdGhlIHNvbGRpZXJzIGRpZC4gQWZ0ZXIgdGhlc2UgY2FtZSB0aGUgcm95YWwgY2hpbGRyZW47IHRoZX" + "JlIHdlcmUgdGVuIG9mIHRoZW0sIGFuZCB0aGUgbGl0dGxlIGRlYXJzIGNhbWUganVtcGluZyBtZXJyaWx5IGFsb25nIGhhbmQgaW4gaGFuZCwg" + "aW4gY291cGxlczogdGhleSB3ZXJlIGFsbCBvcm5hbWVudGVkIHdpdGggaGVhcnRzLiBOZXh0IGNhbWUgdGhlIGd1ZXN0cywgbW9zdGx5IEtpbm" + "dzIGFuZCBRdWVlbnMsIGFuZCBhbW9uZyB0aGVtIEFsaWNlIHJlY29nbmlzZWQgdGhlIFdoaXRlIFJhYmJpdDogaXQgd2FzIHRhbGtpbmcgaW4g" + "YSBodXJyaWVkIG5lcnZvdXMgbWFubmVyLCBzbWlsaW5nIGF0IGV2ZXJ5dGhpbmcgdGhhdCB3YXMgc2FpZCwgYW5kIHdlbnQgYnkgd2l0aG91dC" + "Bub3RpY2luZyBoZXIuIFRoZW4gZm9sbG93ZWQgdGhlIEtuYXZlIG9mIEhlYXJ0cywgY2FycnlpbmcgdGhlIEtpbmcncyBjcm93biBvbiBhIGNy" + "aW1zb24gdmVsdmV0IGN1c2hpb247IGFuZCwgbGFzdCBvZiBhbGwgdGhpcyBncmFuZCBwcm9jZXNzaW9uLCBjYW1lIFRIRSBLSU5HIEFORCBRVU" + "VFTiBPRiBIRUFSVFMuQWxpY2Ugd2FzIHJhdGhlciBkb3VidGZ1bCB3aGV0aGVyIHNoZSBvdWdodCBub3QgdG8gbGllIGRvd24gb24gaGVyIGZh" + "Y2UgbGlrZSB0aGUgdGhyZWUgZ2FyZGVuZXJzLCBidXQgc2hlIGNvdWxkIG5vdCByZW1lbWJlciBldmVyIGhhdmluZyBoZWFyZCBvZiBzdWNoIG" + "EgcnVsZSBhdCBwcm9jZXNzaW9uczsgJ2FuZCBiZXNpZGVzLCB3aGF0IHdvdWxkIGJlIHRoZSB1c2Ugb2YgYSBwcm9jZXNzaW9uLCcgdGhvdWdo" + "dCBzaGUsICdpZiBwZW9wbGUgaGFkIGFsbCB0byBsaWUgZG93biB1cG9uIHRoZWlyIGZhY2VzLCBzbyB0aGF0IHRoZXkgY291bGRuJ3Qgc2VlIG" + "l0PycgU28gc2hlIHN0b29kIHN0aWxsIHdoZXJlIHNoZSB3YXMsIGFuZCB3YWl0ZWQuV2hlbiB0aGUgcHJvY2Vzc2lvbiBjYW1lIG9wcG9zaXRl" + "IHRvIEFsaWNlLCB0aGV5IGFsbCBzdG9wcGVkIGFuZCBsb29rZWQgYXQgaGVyLCBhbmQgdGhlIFF1ZWVuIHNhaWQgc2V2ZXJlbHkgJ1dobyBpcy" + "B0aGlzPycgU2hlIHNhaWQgaXQgdG8gdGhlIEtuYXZlIG9mIEhlYXJ0cywgd2hvIG9ubHkgYm93ZWQgYW5kIHNtaWxlZCBpbiByZXBseS4nSWRp" + "b3QhJyBzYWlkIHRoZSBRdWVlbiwgdG9zc2luZyBoZXIgaGVhZCBpbXBhdGllbnRseTsgYW5kLCB0dXJuaW5nIHRvIEFsaWNlLCBzaGUgd2VudC" + "BvbiwgJ1doYXQncyB5b3VyIG5hbWUsIGNoaWxkPycnTXkgbmFtZSBpcyBBbGljZSwgc28gcGxlYXNlIHlvdXIgTWFqZXN0eSwnIHNhaWQgQWxp" + "Y2UgdmVyeSBwb2xpdGVseTsgYnV0IHNoZSBhZGRlZCwgdG8gaGVyc2VsZiwgJ1doeSwgdGhleSdyZSBvbmx5IGEgcGFjayBvZiBjYXJkcywgYW" + "Z0ZXIgYWxsLiBJIG5lZWRuJ3QgYmUgYWZyYWlkIG9mIHRoZW0hJydBbmQgd2hvIGFyZSB0aGVzZT8nIHNhaWQgdGhlIFF1ZWVuLCBwb2ludGlu" + "ZyB0byB0aGUgdGhyZWUgZ2FyZGVuZXJzIHdobyB3ZXJlIGx5aW5nIHJvdW5kIHRoZSByb3NldHJlZTsgZm9yLCB5b3Ugc2VlLCBhcyB0aGV5IH" + "dlcmUgbHlpbmcgb24gdGhlaXIgZmFjZXMsIGFuZCB0aGUgcGF0dGVybiBvbiB0aGVpciBiYWNrcyB3YXMgdGhlIHNhbWUgYXMgdGhlIHJlc3Qg" + "b2YgdGhlIHBhY2ssIHNoZSBjb3VsZCBub3QgdGVsbCB3aGV0aGVyIHRoZXkgd2VyZSBnYXJkZW5lcnMsIG9yIHNvbGRpZXJzLCBvciBjb3VydG" + "llcnMsIG9yIHRocmVlIG9mIGhlciBvd24gY2hpbGRyZW4uJ0hvdyBzaG91bGQgSSBrbm93Pycgc2FpZCBBbGljZSwgc3VycHJpc2VkIGF0IGhl" + "ciBvd24gY291cmFnZS4gJ0l0J3Mgbm8gYnVzaW5lc3Mgb2YgbWluZS4nVGhlIFF1ZWVuIHR1cm5lZCBjcmltc29uIHdpdGggZnVyeSwgYW5kLC" + "BhZnRlciBnbGFyaW5nIGF0IGhlciBmb3IgYSBtb21lbnQgbGlrZSBhIHdpbGQgYmVhc3QsIHNjcmVhbWVkICdPZmYgd2l0aCBoZXIgaGVhZCEg" + "T2Zm4oCUJydOb25zZW5zZSEnIHNhaWQgQWxpY2UsIHZlcnkgbG91ZGx5IGFuZCBkZWNpZGVkbHksIGFuZCB0aGUgUXVlZW4gd2FzIHNpbGVudC" + "5UaGUgS2luZyBsYWlkIGhpcyBoYW5kIHVwb24gaGVyIGFybSwgYW5kIHRpbWlkbHkgc2FpZCAnQ29uc2lkZXIsIG15IGRlYXI6IHNoZSBpcyBv" + "bmx5IGEgY2hpbGQhJ1RoZSBRdWVlbiB0dXJuZWQgYW5ncmlseSBhd2F5IGZyb20gaGltLCBhbmQgc2FpZCB0byB0aGUgS25hdmUgJ1R1cm4gdG" + "hlbSBvdmVyISdUaGUgS25hdmUgZGlkIHNvLCB2ZXJ5IGNhcmVmdWxseSwgd2l0aCBvbmUgZm9vdC4nR2V0IHVwIScgc2FpZCB0aGUgUXVlZW4s" + "IGluIGEgc2hyaWxsLCBsb3VkIHZvaWNlLCBhbmQgdGhlIHRocmVlIGdhcmRlbmVycyBpbnN0YW50bHkganVtcGVkIHVwLCBhbmQgYmVnYW4gYm" + "93aW5nIHRvIHRoZSBLaW5nLCB0aGUgUXVlZW4sIHRoZSByb3lhbCBjaGlsZHJlbiwgYW5kIGV2ZXJ5Ym9keSBlbHNlLidMZWF2ZSBvZmYgdGhh" + "dCEnIHNjcmVhbWVkIHRoZSBRdWVlbi4gJ1lvdSBtYWtlIG1lIGdpZGR5LicgQW5kIHRoZW4sIHR1cm5pbmcgdG8gdGhlIHJvc2UtdHJlZSwgc2" + "hlIHdlbnQgb24sICdXaGF0IGhhdmUgeW91IGJlZW4gZG9pbmcgaGVyZT8nJ01heSBpdCBwbGVhc2UgeW91ciBNYWplc3R5LCcgc2FpZCBUd28s" + "IGluIGEgdmVyeSBodW1ibGUgdG9uZSwgZ29pbmcgZG93biBvbiBvbmUga25lZSBhcyBoZSBzcG9rZSwgJ3dlIHdlcmUgdHJ5aW5n4oCUJydJIH" + "NlZSEnIHNhaWQgdGhlIFF1ZWVuLCB3aG8gaGFkIG1lYW53aGlsZSBiZWVuIGV4YW1pbmluZyB0aGUgcm9zZXMuICdPZmYgd2l0aCB0aGVpciBo" + "ZWFkcyEnIGFuZCB0aGUgcHJvY2Vzc2lvbiBtb3ZlZCBvbiwgdGhyZWUgb2YgdGhlIHNvbGRpZXJzIHJlbWFpbmluZyBiZWhpbmQgdG8gZXhlY3" + "V0ZSB0aGUgdW5mb3J0dW5hdGUgZ2FyZGVuZXJzLCB3aG8gcmFuIHRvIEFsaWNlIGZvciBwcm90ZWN0aW9uLidZb3Ugc2hhbid0IGJlIGJlaGVh" + "ZGVkIScgc2FpZCBBbGljZSwgYW5kIHNoZSBwdXQgdGhlbSBpbnRvIGEgbGFyZ2UgZmxvd2VyLXBvdCB0aGF0IHN0b29kIG5lYXIuIFRoZSB0aH" + "JlZSBzb2xkaWVycyB3YW5kZXJlZCBhYm91dCBmb3IgYSBtaW51dGUgb3IgdHdvLCBsb29raW5nIGZvciB0aGVtLCBhbmQgdGhlbiBxdWlldGx5" + "IG1hcmNoZWQgb2ZmIGFmdGVyIHRoZSBvdGhlcnMuJ0FyZSB0aGVpciBoZWFkcyBvZmY/" + "JyBzaG91dGVkIHRoZSBRdWVlbi4nVGhlaXIgaGVhZHMgYXJlIGdvbmUsIGlmIGl0IHBsZWFzZSB5b3VyIE1hamVzdHkhJyB0aGUgc29sZGllcn" + "Mgc2hvdXRlZCBpbiByZXBseS4nVGhhdCdzIHJpZ2h0IScgc2hvdXRlZCB0aGUgUXVlZW4uICdDYW4geW91IHBsYXkgY3JvcXVldD8nVGhlIHNv" + "bGRpZXJzIHdlcmUgc2lsZW50LCBhbmQgbG9va2VkIGF0IEFsaWNlLCBhcyB0aGUgcXVlc3Rpb24gd2FzIGV2aWRlbnRseSBtZWFudCBmb3IgaG" + "VyLidZZXMhJyBzaG91dGVkIEFsaWNlLidDb21lIG9uLCB0aGVuIScgcm9hcmVkIHRoZSBRdWVlbiwgYW5kIEFsaWNlIGpvaW5lZCB0aGUgcHJv" + "Y2Vzc2lvbiwgd29uZGVyaW5nIHZlcnkgbXVjaCB3aGF0IHdvdWxkIGhhcHBlbiBuZXh0LidJdCdz4oCUaXQncyBhIHZlcnkgZmluZSBkYXkhJy" + "BzYWlkIGEgdGltaWQgdm9pY2UgYXQgaGVyIHNpZGUuIFNoZSB3YXMgd2Fsa2luZyBieSB0aGUgV2hpdGUgUmFiYml0LCB3aG8gd2FzIHBlZXBp" + "bmcgYW54aW91c2x5IGludG8gaGVyIGZhY2UuJ1ZlcnksJyBzYWlkIEFsaWNlOiAn4oCUd2hlcmUncyB0aGUgRHVjaGVzcz8nJ0h1c2ghIEh1c2" + "ghJyBzYWlkIHRoZSBSYWJiaXQgaW4gYSBsb3csIGh1cnJpZWQgdG9uZS4gSGUgbG9va2VkIGFueGlvdXNseSBvdmVyIGhpcyBzaG91bGRlciBh" + "cyBoZSBzcG9rZSwgYW5kIHRoZW4gcmFpc2VkIGhpbXNlbGYgdXBvbiB0aXB0b2UsIHB1dCBoaXMgbW91dGggY2xvc2UgdG8gaGVyIGVhciwgYW" + "5kIHdoaXNwZXJlZCAnU2hlJ3MgdW5kZXIgc2VudGVuY2Ugb2YgZXhlY3V0aW9uLicnV2hhdCBmb3I/" + "JyBzYWlkIEFsaWNlLidEaWQgeW91IHNheSAiV2hhdCBhIHBpdHkhIj8nIHRoZSBSYWJiaXQgYXNrZWQuJ05vLCBJIGRpZG4ndCwnIHNhaWQgQW" + "xpY2U6ICdJIGRvbid0IHRoaW5rIGl0J3MgYXQgYWxsIGEgcGl0eS4gSSBzYWlkICJXaGF0IGZvcj8iJydTaGUgYm94ZWQgdGhlIFF1ZWVuJ3Mg" + "ZWFyc+" + "KAlCcgdGhlIFJhYmJpdCBiZWdhbi4gQWxpY2UgZ2F2ZSBhIGxpdHRsZSBzY3JlYW0gb2YgbGF1Z2h0ZXIuICdPaCwgaHVzaCEnIHRoZSBSYWJi" + "aXQgd2hpc3BlcmVkIGluIGEgZnJpZ2h0ZW5lZCB0b25lLiAnVGhlIFF1ZWVuIHdpbGwgaGVhciB5b3UhIFlvdSBzZWUsIHNoZSBjYW1lIHJhdG" + "hlciBsYXRlLCBhbmQgdGhlIFF1ZWVuIHNhaWTigJQnJ0dldCB0byB5b3VyIHBsYWNlcyEnIHNob3V0ZWQgdGhlIFF1ZWVuIGluIGEgdm9pY2Ug" + "b2YgdGh1bmRlciwgYW5kIHBlb3BsZSBiZWdhbiBydW5uaW5nIGFib3V0IGluIGFsbCBkaXJlY3Rpb25zLCB0dW1ibGluZyB1cCBhZ2FpbnN0IG" + "VhY2ggb3RoZXI7IGhvd2V2ZXIsIHRoZXkgZ290IHNldHRsZWQgZG93biBpbiBhIG1pbnV0ZSBvciB0d28sIGFuZCB0aGUgZ2FtZSBiZWdhbi4g" + "QWxpY2UgdGhvdWdodCBzaGUgaGFkIG5ldmVyIHNlZW4gc3VjaCBhIGN1cmlvdXMgY3JvcXVldC1ncm91bmQgaW4gaGVyIGxpZmU7IGl0IHdhcy" + "BhbGwgcmlkZ2VzIGFuZCBmdXJyb3dzOyB0aGUgYmFsbHMgd2VyZSBsaXZlIGhlZGdlaG9ncywgdGhlIG1hbGxldHMgbGl2ZSBmbGFtaW5nb2Vz" + "LCBhbmQgdGhlIHNvbGRpZXJzIGhhZCB0byBkb3VibGUgdGhlbXNlbHZlcyB1cCBhbmQgdG8gc3RhbmQgb24gdGhlaXIgaGFuZHMgYW5kIGZlZX" + "QsIHRvIG1ha2UgdGhlIGFyY2hlcy5UaGUgY2hpZWYgZGlmZmljdWx0eSBBbGljZSBmb3VuZCBhdCBmaXJzdCB3YXMgaW4gbWFuYWdpbmcgaGVy" + "IGZsYW1pbmdvOiBzaGUgc3VjY2VlZGVkIGluIGdldHRpbmcgaXRzIGJvZHkgdHVja2VkIGF3YXksIGNvbWZvcnRhYmx5IGVub3VnaCwgdW5kZX" + "IgaGVyIGFybSwgd2l0aCBpdHMgbGVncyBoYW5naW5nIGRvd24sIGJ1dCBnZW5lcmFsbHksIGp1c3QgYXMgc2hlIGhhZCBnb3QgaXRzIG5lY2sg" + "bmljZWx5IHN0cmFpZ2h0ZW5lZCBvdXQsIGFuZCB3YXMgZ29pbmcgdG8gZ2l2ZSB0aGUgaGVkZ2Vob2cgYSBibG93IHdpdGggaXRzIGhlYWQsIG" + "l0IHdvdWxkIHR3aXN0IGl0c2VsZiByb3VuZCBhbmQgbG9vayB1cCBpbiBoZXIgZmFjZSwgd2l0aCBzdWNoIGEgcHV6emxlZCBleHByZXNzaW9u" + "IHRoYXQgc2hlIGNvdWxkIG5vdCBoZWxwIGJ1cnN0aW5nIG91dCBsYXVnaGluZzogYW5kIHdoZW4gc2hlIGhhZCBnb3QgaXRzIGhlYWQgZG93bi" + "wgYW5kIHdhcyBnb2luZyB0byBiZWdpbiBhZ2FpbiwgaXQgd2FzIHZlcnkgcHJvdm9raW5nIHRvIGZpbmQgdGhhdCB0aGUgaGVkZ2Vob2cgaGFk" + "IHVucm9sbGVkIGl0c2VsZiwgYW5kIHdhcyBpbiB0aGUgYWN0IG9mIGNyYXdsaW5nIGF3YXk6IGJlc2lkZXMgYWxsIHRoaXMsIHRoZXJlIHdhcy" + "BnZW5lcmFsbHkgYSByaWRnZSBvciBmdXJyb3cgaW4gdGhlIHdheSB3aGVyZXZlciBzaGUgd2FudGVkIHRvIHNlbmQgdGhlIGhlZGdlaG9nIHRv" + "LCBhbmQsIGFzIHRoZSBkb3VibGVkLXVwIHNvbGRpZXJzIHdlcmUgYWx3YXlzIGdldHRpbmcgdXAgYW5kIHdhbGtpbmcgb2ZmIHRvIG90aGVyIH" + "BhcnRzIG9mIHRoZSBncm91bmQsIEFsaWNlIHNvb24gY2FtZSB0byB0aGUgY29uY2x1c2lvbiB0aGF0IGl0IHdhcyBhIHZlcnkgZGlmZmljdWx0" + "IGdhbWUgaW5kZWVkLlRoZSBwbGF5ZXJzIGFsbCBwbGF5ZWQgYXQgb25jZSB3aXRob3V0IHdhaXRpbmcgZm9yIHR1cm5zLCBxdWFycmVsbGluZy" + "BhbGwgdGhlIHdoaWxlLCBhbmQgZmlnaHRpbmcgZm9yIHRoZSBoZWRnZWhvZ3M7IGFuZCBpbiBhIHZlcnkgc2hvcnQgdGltZSB0aGUgUXVlZW4g" + "d2FzIGluIGEgZnVyaW91cyBwYXNzaW9uLCBhbmQgd2VudCBzdGFtcGluZyBhYm91dCwgYW5kIHNob3V0aW5nICdPZmYgd2l0aCBoaXMgaGVhZC" + "EnIG9yICdPZmYgd2l0aCBoZXIgaGVhZCEnIGFib3V0IG9uY2UgaW4gYSBtaW51dGUuQWxpY2UgYmVnYW4gdG8gZmVlbCB2ZXJ5IHVuZWFzeTog" + "dG8gYmUgc3VyZSwgc2hlIGhhZCBub3QgYXMgeWV0IGhhZCBhbnkgZGlzcHV0ZSB3aXRoIHRoZSBRdWVlbiwgYnV0IHNoZSBrbmV3IHRoYXQgaX" + "QgbWlnaHQgaGFwcGVuIGFueSBtaW51dGUsICdhbmQgdGhlbiwnIHRob3VnaHQgc2hlLCAnd2hhdCB3b3VsZCBiZWNvbWUgb2YgbWU/" + "IFRoZXkncmUgZHJlYWRmdWxseSBmb25kIG9mIGJlaGVhZGluZyBwZW9wbGUgaGVyZTsgdGhlIGdyZWF0IHdvbmRlciBpcywgdGhhdCB0aGVyZS" + "dzIGFueSBvbmUgbGVmdCBhbGl2ZSEnU2hlIHdhcyBsb29raW5nIGFib3V0IGZvciBzb21lIHdheSBvZiBlc2NhcGUsIGFuZCB3b25kZXJpbmcg" + "d2hldGhlciBzaGUgY291bGQgZ2V0IGF3YXkgd2l0aG91dCBiZWluZyBzZWVuLCB3aGVuIHNoZSBub3RpY2VkIGEgY3VyaW91cyBhcHBlYXJhbm" + "NlIGluIHRoZSBhaXI6IGl0IHB1enpsZWQgaGVyIHZlcnkgbXVjaCBhdCBmaXJzdCwgYnV0LCBhZnRlciB3YXRjaGluZyBpdCBhIG1pbnV0ZSBv" + "ciB0d28sIHNoZSBtYWRlIGl0IG91dCB0byBiZSBhIGdyaW4sIGFuZCBzaGUgc2FpZCB0byBoZXJzZWxmICdJdCdzIHRoZSBDaGVzaGlyZSBDYX" + "Q6IG5vdyBJIHNoYWxsIGhhdmUgc29tZWJvZHkgdG8gdGFsayB0by4nJ0hvdyBhcmUgeW91IGdldHRpbmcgb24/" + "JyBzYWlkIHRoZSBDYXQsIGFzIHNvb24gYXMgdGhlcmUgd2FzIG1vdXRoIGVub3VnaCBmb3IgaXQgdG8gc3BlYWsgd2l0aC5BbGljZSB3YWl0ZW" + "QgdGlsbCB0aGUgZXllcyBhcHBlYXJlZCwgYW5kIHRoZW4gbm9kZGVkLiAnSXQncyBubyB1c2Ugc3BlYWtpbmcgdG8gaXQsJyBzaGUgdGhvdWdo" + "dCwgJ3RpbGwgaXRzIGVhcnMgaGF2ZSBjb21lLCBvciBhdCBsZWFzdCBvbmUgb2YgdGhlbS4nIEluIGFub3RoZXIgbWludXRlIHRoZSB3aG9sZS" + "BoZWFkIGFwcGVhcmVkLCBhbmQgdGhlbiBBbGljZSBwdXQgZG93biBoZXIgZmxhbWluZ28sIGFuZCBiZWdhbiBhbiBhY2NvdW50IG9mIHRoZSBn" + "YW1lLCBmZWVsaW5nIHZlcnkgZ2xhZCBzaGUgaGFkIHNvbWVvbmUgdG8gbGlzdGVuIHRvIGhlci4gVGhlIENhdCBzZWVtZWQgdG8gdGhpbmsgdG" + "hhdCB0aGVyZSB3YXMgZW5vdWdoIG9mIGl0IG5vdyBpbiBzaWdodCwgYW5kIG5vIG1vcmUgb2YgaXQgYXBwZWFyZWQuJ0kgZG9uJ3QgdGhpbmsg" + "dGhleSBwbGF5IGF0IGFsbCBmYWlybHksJyBBbGljZSBiZWdhbiwgaW4gcmF0aGVyIGEgY29tcGxhaW5pbmcgdG9uZSwgJ2FuZCB0aGV5IGFsbC" + "BxdWFycmVsIHNvIGRyZWFkZnVsbHkgb25lIGNhbid0IGhlYXIgb25lc2VsZiBzcGVha+" + "KAlGFuZCB0aGV5IGRvbid0IHNlZW0gdG8gaGF2ZSBhbnkgcnVsZXMgaW4gcGFydGljdWxhcjsgYXQgbGVhc3QsIGlmIHRoZXJlIGFyZSwgbm9i" + "b2R5IGF0dGVuZHMgdG8gdGhlbeKAlGFuZCB5b3UndmUgbm8gaWRlYSBob3cgY29uZnVzaW5nIGl0IGlzIGFsbCB0aGUgdGhpbmdzIGJlaW5nIG" + "FsaXZlOyBmb3IgaW5zdGFuY2UsIHRoZXJlJ3MgdGhlIGFyY2ggSSd2ZSBnb3QgdG8gZ28gdGhyb3VnaCBuZXh0IHdhbGtpbmcgYWJvdXQgYXQg" + "dGhlIG90aGVyIGVuZCBvZiB0aGUgZ3JvdW5k4oCUYW5kIEkgc2hvdWxkIGhhdmUgY3JvcXVldGVkIHRoZSBRdWVlbidzIGhlZGdlaG9nIGp1c3" + "Qgbm93LCBvbmx5IGl0IHJhbiBhd2F5IHdoZW4gaXQgc2F3IG1pbmUgY29taW5nIScnSG93IGRvIHlvdSBsaWtlIHRoZSBRdWVlbj8nIHNhaWQg" + "dGhlIENhdCBpbiBhIGxvdyB2b2ljZS4nTm90IGF0IGFsbCwnIHNhaWQgQWxpY2U6ICdzaGUncyBzbyBleHRyZW1lbHnigJQnIEp1c3QgdGhlbi" + "BzaGUgbm90aWNlZCB0aGF0IHRoZSBRdWVlbiB3YXMgY2xvc2UgYmVoaW5kIGhlciwgbGlzdGVuaW5nOiBzbyBzaGUgd2VudCBvbiwgJ+" + "KAlGxpa2VseSB0byB3aW4sIHRoYXQgaXQncyBoYXJkbHkgd29ydGggd2hpbGUgZmluaXNoaW5nIHRoZSBnYW1lLidUaGUgUXVlZW4gc21pbGVk" + "IGFuZCBwYXNzZWQgb24uJ1dobyBhcmUgeW91IHRhbGtpbmcgdG8/" + "JyBzYWlkIHRoZSBLaW5nLCBnb2luZyB1cCB0byBBbGljZSwgYW5kIGxvb2tpbmcgYXQgdGhlIENhdCdzIGhlYWQgd2l0aCBncmVhdCBjdXJpb3" + "NpdHkuJ0l0J3MgYSBmcmllbmQgb2YgbWluZeKAlGEgQ2hlc2hpcmUgQ2F0LCcgc2FpZCBBbGljZTogJ2FsbG93IG1lIHRvIGludHJvZHVjZSBp" + "dC4nJ0kgZG9uJ3QgbGlrZSB0aGUgbG9vayBvZiBpdCBhdCBhbGwsJyBzYWlkIHRoZSBLaW5nOiAnaG93ZXZlciwgaXQgbWF5IGtpc3MgbXkgaG" + "FuZCBpZiBpdCBsaWtlcy4nJ0knZCByYXRoZXIgbm90LCcgdGhlIENhdCByZW1hcmtlZC4nRG9uJ3QgYmUgaW1wZXJ0aW5lbnQsJyBzYWlkIHRo" + "ZSBLaW5nLCAnYW5kIGRvbid0IGxvb2sgYXQgbWUgbGlrZSB0aGF0IScgSGUgZ290IGJlaGluZCBBbGljZSBhcyBoZSBzcG9rZS4nQSBjYXQgbW" + "F5IGxvb2sgYXQgYSBraW5nLCcgc2FpZCBBbGljZS4gJ0kndmUgcmVhZCB0aGF0IGluIHNvbWUgYm9vaywgYnV0IEkgZG9uJ3QgcmVtZW1iZXIg" + "d2hlcmUuJydXZWxsLCBpdCBtdXN0IGJlIHJlbW92ZWQsJyBzYWlkIHRoZSBLaW5nIHZlcnkgZGVjaWRlZGx5LCBhbmQgaGUgY2FsbGVkIHRoZS" + "BRdWVlbiwgd2hvIHdhcyBwYXNzaW5nIGF0IHRoZSBtb21lbnQsICdNeSBkZWFyISBJIHdpc2ggeW91IHdvdWxkIGhhdmUgdGhpcyBjYXQgcmVt" + "b3ZlZCEnVGhlIFF1ZWVuIGhhZCBvbmx5IG9uZSB3YXkgb2Ygc2V0dGxpbmcgYWxsIGRpZmZpY3VsdGllcywgZ3JlYXQgb3Igc21hbGwuICdPZm" + "Ygd2l0aCBoaXMgaGVhZCEnIHNoZSBzYWlkLCB3aXRob3V0IGV2ZW4gbG9va2luZyByb3VuZC4nSSdsbCBmZXRjaCB0aGUgZXhlY3V0aW9uZXIg" + "bXlzZWxmLCcgc2FpZCB0aGUgS2luZyBlYWdlcmx5LCBhbmQgaGUgaHVycmllZCBvZmYuQWxpY2UgdGhvdWdodCBzaGUgbWlnaHQgYXMgd2VsbC" + "BnbyBiYWNrLCBhbmQgc2VlIGhvdyB0aGUgZ2FtZSB3YXMgZ29pbmcgb24sIGFzIHNoZSBoZWFyZCB0aGUgUXVlZW4ncyB2b2ljZSBpbiB0aGUg" + "ZGlzdGFuY2UsIHNjcmVhbWluZyB3aXRoIHBhc3Npb24uIFNoZSBoYWQgYWxyZWFkeSBoZWFyZCBoZXIgc2VudGVuY2UgdGhyZWUgb2YgdGhlIH" + "BsYXllcnMgdG8gYmUgZXhlY3V0ZWQgZm9yIGhhdmluZyBtaXNzZWQgdGhlaXIgdHVybnMsIGFuZCBzaGUgZGlkIG5vdCBsaWtlIHRoZSBsb29r" + "IG9mIHRoaW5ncyBhdCBhbGwsIGFzIHRoZSBnYW1lIHdhcyBpbiBzdWNoIGNvbmZ1c2lvbiB0aGF0IHNoZSBuZXZlciBrbmV3IHdoZXRoZXIgaX" + "Qgd2FzIGhlciB0dXJuIG9yIG5vdC4gU28gc2hlIHdlbnQgaW4gc2VhcmNoIG9mIGhlciBoZWRnZWhvZy5UaGUgaGVkZ2Vob2cgd2FzIGVuZ2Fn" + "ZWQgaW4gYSBmaWdodCB3aXRoIGFub3RoZXIgaGVkZ2Vob2csIHdoaWNoIHNlZW1lZCB0byBBbGljZSBhbiBleGNlbGxlbnQgb3Bwb3J0dW5pdH" + "kgZm9yIGNyb3F1ZXRpbmcgb25lIG9mIHRoZW0gd2l0aCB0aGUgb3RoZXI6IHRoZSBvbmx5IGRpZmZpY3VsdHkgd2FzLCB0aGF0IGhlciBmbGFt" + "aW5nbyB3YXMgZ29uZSBhY3Jvc3MgdG8gdGhlIG90aGVyIHNpZGUgb2YgdGhlIGdhcmRlbiwgd2hlcmUgQWxpY2UgY291bGQgc2VlIGl0IHRyeW" + "luZyBpbiBhIGhlbHBsZXNzIHNvcnQgb2Ygd2F5IHRvIGZseSB1cCBpbnRvIGEgdHJlZS5CeSB0aGUgdGltZSBzaGUgaGFkIGNhdWdodCB0aGUg" + "ZmxhbWluZ28gYW5kIGJyb3VnaHQgaXQgYmFjaywgdGhlIGZpZ2h0IHdhcyBvdmVyLCBhbmQgYm90aCB0aGUgaGVkZ2Vob2dzIHdlcmUgb3V0IG" + "9mIHNpZ2h0OiAnYnV0IGl0IGRvZXNuJ3QgbWF0dGVyIG11Y2gsJyB0aG91Z2h0IEFsaWNlLCAnYXMgYWxsIHRoZSBhcmNoZXMgYXJlIGdvbmUg" + "ZnJvbSB0aGlzIHNpZGUgb2YgdGhlIGdyb3VuZC4nIFNvIHNoZSB0dWNrZWQgaXQgYXdheSB1bmRlciBoZXIgYXJtLCB0aGF0IGl0IG1pZ2h0IG" + "5vdCBlc2NhcGUgYWdhaW4sIGFuZCB3ZW50IGJhY2sgZm9yIGEgbGl0dGxlIG1vcmUgY29udmVyc2F0aW9uIHdpdGggaGVyIGZyaWVuZC5XaGVu" + "IHNoZSBnb3QgYmFjayB0byB0aGUgQ2hlc2hpcmUgQ2F0LCBzaGUgd2FzIHN1cnByaXNlZCB0byBmaW5kIHF1aXRlIGEgbGFyZ2UgY3Jvd2QgY2" + "9sbGVjdGVkIHJvdW5kIGl0OiB0aGVyZSB3YXMgYSBkaXNwdXRlIGdvaW5nIG9uIGJldHdlZW4gdGhlIGV4ZWN1dGlvbmVyLCB0aGUgS2luZywg" + "YW5kIHRoZSBRdWVlbiwgd2hvIHdlcmUgYWxsIHRhbGtpbmcgYXQgb25jZSwgd2hpbGUgYWxsIHRoZSByZXN0IHdlcmUgcXVpdGUgc2lsZW50LC" + "BhbmQgbG9va2VkIHZlcnkgdW5jb21mb3J0YWJsZS5UaGUgbW9tZW50IEFsaWNlIGFwcGVhcmVkLCBzaGUgd2FzIGFwcGVhbGVkIHRvIGJ5IGFs" + "bCB0aHJlZSB0byBzZXR0bGUgdGhlIHF1ZXN0aW9uLCBhbmQgdGhleSByZXBlYXRlZCB0aGVpciBhcmd1bWVudHMgdG8gaGVyLCB0aG91Z2gsIG" + "FzIHRoZXkgYWxsIHNwb2tlIGF0IG9uY2UsIHNoZSBmb3VuZCBpdCB2ZXJ5IGhhcmQgaW5kZWVkIHRvIG1ha2Ugb3V0IGV4YWN0bHkgd2hhdCB0" + "aGV5IHNhaWQuVGhlIGV4ZWN1dGlvbmVyJ3MgYXJndW1lbnQgd2FzLCB0aGF0IHlvdSBjb3VsZG4ndCBjdXQgb2ZmIGEgaGVhZCB1bmxlc3MgdG" + "hlcmUgd2FzIGEgYm9keSB0byBjdXQgaXQgb2ZmIGZyb206IHRoYXQgaGUgaGFkIG5ldmVyIGhhZCB0byBkbyBzdWNoIGEgdGhpbmcgYmVmb3Jl" + "LCBhbmQgaGUgd2Fzbid0IGdvaW5nIHRvIGJlZ2luIGF0IGhpcyB0aW1lIG9mIGxpZmUuVGhlIEtpbmcncyBhcmd1bWVudCB3YXMsIHRoYXQgYW" + "55dGhpbmcgdGhhdCBoYWQgYSBoZWFkIGNvdWxkIGJlIGJlaGVhZGVkLCBhbmQgdGhhdCB5b3Ugd2VyZW4ndCB0byB0YWxrIG5vbnNlbnNlLlRo" + "ZSBRdWVlbidzIGFyZ3VtZW50IHdhcywgdGhhdCBpZiBzb21ldGhpbmcgd2Fzbid0IGRvbmUgYWJvdXQgaXQgaW4gbGVzcyB0aGFuIG5vIHRpbW" + "Ugc2hlJ2QgaGF2ZSBldmVyeWJvZHkgZXhlY3V0ZWQsIGFsbCByb3VuZC4gKEl0IHdhcyB0aGlzIGxhc3QgcmVtYXJrIHRoYXQgaGFkIG1hZGUg" + "dGhlIHdob2xlIHBhcnR5IGxvb2sgc28gZ3JhdmUgYW5kIGFueGlvdXMuKUFsaWNlIGNvdWxkIHRoaW5rIG9mIG5vdGhpbmcgZWxzZSB0byBzYX" + "kgYnV0ICdJdCBiZWxvbmdzIHRvIHRoZSBEdWNoZXNzOiB5b3UnZCBiZXR0ZXIgYXNrIGhlciBhYm91dCBpdC4nJ1NoZSdzIGluIHByaXNvbiwn" + "IHRoZSBRdWVlbiBzYWlkIHRvIHRoZSBleGVjdXRpb25lcjogJ2ZldGNoIGhlciBoZXJlLicgQW5kIHRoZSBleGVjdXRpb25lciB3ZW50IG9mZi" + "BsaWtlIGFuIGFycm93LlRoZSBDYXQncyBoZWFkIGJlZ2FuIGZhZGluZyBhd2F5IHRoZSBtb21lbnQgaGUgd2FzIGdvbmUsIGFuZCwgYnkgdGhl" + "IHRpbWUgaGUgaGFkIGNvbWUgYmFjayB3aXRoIHRoZSBEdWNoZXNzLCBpdCBoYWQgZW50aXJlbHkgZGlzYXBwZWFyZWQ7IHNvIHRoZSBLaW5nIG" + "FuZCB0aGUgZXhlY3V0aW9uZXIgcmFuIHdpbGRseSB1cCBhbmQgZG93biBsb29raW5nIGZvciBpdCwgd2hpbGUgdGhlIHJlc3Qgb2YgdGhlIHBh" + "cnR5IHdlbnQgYmFjayB0byB0aGUgZ2FtZS4="; + using it_base64_t = bai::base64_from_binary>; + + auto writePaddChars = (3 - input.length() % 3) % 3; + std::string base64(it_base64_t(input.begin()), it_base64_t(input.end())); + base64.append(writePaddChars, '='); + assert(base64 == output); + return 0; +} +#elif 0 + +#include +#include + +#include +#include +#include + +struct S +{ + int i; + char c; + + template + void serialize(Archive & ar, const unsigned int version) + { + ar & i; + ar & c; + } +}; + +int main() +{ + const auto s0 = std::make_shared(); + s0->i = 42; + s0->c = 'c'; + + std::stringstream ss; + + { + boost::archive::text_oarchive oa(ss); + oa << s0; + } + + std::shared_ptr s1; + { + boost::archive::text_iarchive ia(ss); + ia >> s1; + } + + return 0; +} + +#elif 0 +#include +#include +#include +#include + +void f() +{ + std::stringstream iss; + boost::archive::binary_iarchive ar(iss); + std::vector out; + ar >> out; +} + +int main(int argc, char* argv[]) +{ + return 0; +} + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class xml_iarchive_nan : +public boost::archive::xml_iarchive_impl +{ +protected: + friend class boost::archive::detail::interface_iarchive; + friend class boost::archive::detail::common_iarchive; + friend class boost::archive::basic_xml_iarchive; + friend class boost::archive::load_access; + + using boost::archive::xml_iarchive_impl::load; + void load(double & t) + { + char c='0'; + if(!is.fail()) + { + c=is.peek(); + if(c!='n') + { + boost::archive::xml_iarchive_impl::load(t); + } + else + { + char c1='0',c2='0'; + is.get(c).get(c1).get(c2); + if(is.fail()||(!((c=='n')&&(c1=='a')&&(c2=='n')))) + boost::serialization::throw_exception( + boost::archive::archive_exception( + boost::archive::archive_exception::input_stream_error)); + else + t=std::numeric_limits::quiet_NaN(); + } + } + else + boost::serialization::throw_exception( + boost::archive::archive_exception(boost::archive::archive_exception::input_stream_error)); + } + +public: + xml_iarchive_nan(std::istream & is, unsigned int flags = 0) : + boost::archive::xml_iarchive_impl(is, flags) + {} + ~xml_iarchive_nan(){}; +}; + +BOOST_SERIALIZATION_REGISTER_ARCHIVE(xml_iarchive_nan) + +namespace boost +{ + namespace archive + { + template class detail::archive_serializer_map; + template class detail::interface_iarchive; + template class detail::common_iarchive; + template class basic_xml_iarchive; + template class xml_iarchive_impl; + + } +} + +int main(int argc, char** argv) +{ + double value=0.0; + std::ifstream ifile("./somefile.xml"); + xml_iarchive_nan ia(ifile); + ia>>BOOST_SERIALIZATION_NVP(value); +} + +#elif 1 +// submitted as https://github.com/boostorg/serialization/issues/154 +#include + +#include +#include + +#include +#include + +#include +#include +#include + +struct Tracked { + std::string x; + Tracked(std::string s) : x(s) {} + Tracked() : x("tracked"){} + template void serialize(A& ar, unsigned int ) { + ar & x; + } +}; + +struct Main { + Tracked t_before; + Tracked* t_pointer; + Tracked t_after; + Main() : t_before("before"), t_pointer(0), t_after("after") {} + template void serialize(A& ar, unsigned int ) { + ar + & t_before + & t_pointer + & t_after + ; + } +}; + +#define CHECK_EQUAL(X,Y) assert(X==Y) +#define REQUIRE_EQUAL(X,Y) CHECK_EQUAL(X,Y) +int main(int argc, char *argv[]) +{ + typedef std::vector
Mains; + + std::stringstream ss; + + { + Mains ms; + ms.push_back( Main()); + ms.push_back( Main()); + ms.back().t_pointer = ms.front().t_pointer = new Tracked; + + REQUIRE_EQUAL( ms.size(), 2); + CHECK_EQUAL( ms[0].t_pointer, ms[1].t_pointer ); + CHECK_EQUAL( ms[0].t_pointer->x, "tracked" ); + + boost::archive::text_oarchive oa(ss); + oa << ms; + + delete ms.back().t_pointer; + } + + std::cout << ss.str() << std::endl; + + { + Mains ms; + boost::archive::text_iarchive ia(ss); + ia >> ms; + + REQUIRE_EQUAL( ms.size(), 2); + CHECK_EQUAL( ms[0].t_pointer, ms[1].t_pointer ); + CHECK_EQUAL( ms[0].t_pointer->x, "tracked" ); + } + + return 0; +} + +#else +int main(int argc, char* argv[]) +{ + return 0; +} +#endif diff --git a/src/boost/libs/serialization/test/testfile2 b/src/boost/libs/serialization/test/testfile2 new file mode 100644 index 000000000..c3fab9500 Binary files /dev/null and b/src/boost/libs/serialization/test/testfile2 differ diff --git a/src/boost/libs/serialization/test/text_archive.hpp b/src/boost/libs/serialization/test/text_archive.hpp new file mode 100644 index 000000000..8e98926cc --- /dev/null +++ b/src/boost/libs/serialization/test/text_archive.hpp @@ -0,0 +1,13 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +// text_archive +#include +typedef boost::archive::text_oarchive test_oarchive; +typedef std::ofstream test_ostream; +#include +typedef boost::archive::text_iarchive test_iarchive; +typedef std::ifstream test_istream; diff --git a/src/boost/libs/serialization/test/text_warchive.hpp b/src/boost/libs/serialization/test/text_warchive.hpp new file mode 100644 index 000000000..e556ef3ff --- /dev/null +++ b/src/boost/libs/serialization/test/text_warchive.hpp @@ -0,0 +1,13 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +// text_warchive +#include +typedef boost::archive::text_woarchive test_oarchive; +typedef std::wofstream test_ostream; +#include +typedef boost::archive::text_wiarchive test_iarchive; +typedef std::wifstream test_istream; diff --git a/src/boost/libs/serialization/test/xml_archive.hpp b/src/boost/libs/serialization/test/xml_archive.hpp new file mode 100644 index 000000000..a84bc18e4 --- /dev/null +++ b/src/boost/libs/serialization/test/xml_archive.hpp @@ -0,0 +1,13 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +// xml_archive +#include +typedef boost::archive::xml_oarchive test_oarchive; +typedef std::ofstream test_ostream; +#include +typedef boost::archive::xml_iarchive test_iarchive; +typedef std::ifstream test_istream; diff --git a/src/boost/libs/serialization/test/xml_warchive.hpp b/src/boost/libs/serialization/test/xml_warchive.hpp new file mode 100644 index 000000000..ffdc45831 --- /dev/null +++ b/src/boost/libs/serialization/test/xml_warchive.hpp @@ -0,0 +1,13 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +// xml_warchive +#include +typedef boost::archive::xml_woarchive test_oarchive; +typedef std::wofstream test_ostream; +#include +typedef boost::archive::xml_wiarchive test_iarchive; +typedef std::wifstream test_istream; diff --git a/src/boost/libs/serialization/util/test.jam b/src/boost/libs/serialization/util/test.jam new file mode 100644 index 000000000..4a04c3337 --- /dev/null +++ b/src/boost/libs/serialization/util/test.jam @@ -0,0 +1,208 @@ +# Boost serialization Library utility test Jamfile + +# (C) Copyright Robert Ramey 2002-2004. +# Use, modification, and distribution are subject to the +# Boost Software License, Version 1.0. (See accompanying file +# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +# + +# the file contains Jam rules which are used in both the normal +# boost test, as well as the performance test and comprehensive +# tests. + +# import rules for testing conditional on config file variables +import ../../config/checks/config : requires ; + +BOOST_ARCHIVE_LIST = [ modules.peek : BOOST_ARCHIVE_LIST ] ; + +# these are used to shorten testing while in development. It permits +# testing to be applied to just a particular type of archive +if ! $(BOOST_ARCHIVE_LIST) { + BOOST_ARCHIVE_LIST = + "text_archive.hpp" + "text_warchive.hpp" + "binary_archive.hpp" + "xml_archive.hpp" + "xml_warchive.hpp" + ; + # enable the tests which don't depend on a particular archive + BOOST_SERIALIZATION_TEST = true ; +} + +rule run-template ( test-name : sources * : files * : requirements * ) { + return [ + run + $(sources) + : # command + : #input files + $(files) + : # requirements + # toolset warnings + borland:"-w-8080 -w-8071 -w-8057 -w-8062 -w-8008 -w-0018 -w-8066" + #gcc:all # ? + gcc:"-Wno-unused-variable -Wno-long-long" + # gcc:debug>_STLP_DEBUG + # gcc:debug>_GLIBCXX_DEBUG + darwin:"-Wno-unused-variable -Wno-long-long" + msvc:all # == /W4 + msvc:_SCL_SECURE_NO_WARNINGS + msvc:_SCL_SECURE_NO_DEPRECATE + msvc:_CRT_SECURE_NO_WARNINGS + msvc:_CRT_SECURE_NO_DEPRECATE + msvc:"-wd4996" + clang:debug:"-fsanitize=memory" + # toolset optimizations + gcc:"-ftemplate-depth-255" + clang:"-ftemplate-depth-255" + darwin:"-ftemplate-depth-255" + msvc:"-Gy" + # linking + shared:BOOST_SERIALIZATION_DYN_LINK=1 + shared:BOOST_WSERIALIZATION_DYN_LINK=1 + $(requirements) + : # test name + $(test-name) + ] ; +} + +# Given a name of test, return the 'save' test that must be run +# before the named test, or empty string if there's no such test. +rule dependency-save-test ( test ) +{ + local m = [ MATCH (.*)load(.*) : $(test) ] ; + if $(m) + { + return $(m[1])save$(m[2]) ; + } +} + +# each of the following tests is run with each type of archive +rule run-invoke ( test-name : sources * : files * : requirements * ) +{ + local save-test = [ dependency-save-test $(test-name) ] ; + + local tests ; + tests += [ + run-template $(test-name) + : # sources + $(sources) + ../build//boost_serialization + : # input files + : # requirements + $(requirements) + BOOST_LIB_DIAGNOSTIC=1 + $(save-test) + ] ; + return $(tests) ; +} + +# each of the following tests is run with each type of archive +rule run-winvoke ( test-name : sources * : files * : requirements * ) +{ + local save-test = [ dependency-save-test $(test-name) ] ; + + local tests ; + tests += [ + run-template $(test-name) + : # sources + $(sources) + ../build//boost_serialization + ../build//boost_wserialization + : # input files + : # requirements + $(requirements) + BOOST_LIB_DIAGNOSTIC=1 + # both stlport and msvc6 define iswspace + msvc,stlport:"-force:multiple" + $(save-test) + [ requires std_wstreambuf ] + ] ; + return $(tests) ; +} + +# for tests which don't use library code - usually just headers +rule test-bsl-run-no-lib ( test-name : sources * : requirements * ) +{ + local tests ; + tests += [ + run-template $(test-name) + : # sources + $(test-name).cpp $(sources).cpp + : # input files + : # requirements + $(requirements) + ] ; + return $(tests) ; +} + +# for tests which are run just once rather than for every archive +rule test-bsl-run ( test-name : sources * : libs * : requirements * ) +{ + local tests ; + tests += [ + run-invoke $(test-name) + : # sources + $(test-name).cpp $(sources).cpp $(libs) + : # input files + : # requirements + $(requirements) + ] ; + return $(tests) ; +} + +rule test-bsl-run_archive ( test-name : archive-name : sources * : libs * : requirements * ) { + local tests ; + switch $(archive-name) { + case "*_warchive" : + tests += [ + run-winvoke $(test-name)_$(archive-name) + : # sources + $(sources).cpp $(libs) + : # input files + : # requirements + BOOST_ARCHIVE_TEST=$(archive-name).hpp + $(requirements) + ] ; + case "*" : + tests += [ + run-invoke $(test-name)_$(archive-name) + : # sources + $(sources).cpp $(libs) + : # input files + : # requirements + BOOST_ARCHIVE_TEST=$(archive-name).hpp + $(requirements) + ] ; + } + return $(tests) ; +} + +rule test-bsl-run_files ( test-name : sources * : libs * : requirements * ) { + local tests ; + for local defn in $(BOOST_ARCHIVE_LIST) { + tests += [ + test-bsl-run_archive $(test-name) + : $(defn:LB) + : $(test-name) $(sources) + : $(libs) + : $(requirements) + ] ; + } + return $(tests) ; +} + +rule test-bsl-run_polymorphic_files ( test-name : sources * : libs * : requirements * ) { + local tests ; + for local defn in $(BOOST_ARCHIVE_LIST) { + ECHO polymorphic_$(defn:LB) ; + tests += [ + test-bsl-run_archive $(test-name) + : polymorphic_$(defn:LB) + : $(test-name) $(sources) + : $(libs) + : $(requirements) + ] ; + } + return $(tests) ; +} + -- cgit v1.2.3