diff --git a/include/boost/archive/detail/iserializer.hpp b/include/boost/archive/detail/iserializer.hpp index 6a286a66..1bc84488 100644 --- a/include/boost/archive/detail/iserializer.hpp +++ b/include/boost/archive/detail/iserializer.hpp @@ -233,7 +233,7 @@ struct heap_allocation { // that the class might have class specific new with NO // class specific delete at all. Patches (compatible with // C++03) welcome! - delete t; + (operator delete)(t); } }; struct doesnt_have_new_operator { @@ -242,7 +242,7 @@ struct heap_allocation { } static void invoke_delete(T * t) { // Note: I'm reliance upon automatic conversion from T * to void * here - delete t; + (operator delete)(t); } }; static T * invoke_new() { diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 3aab6169..08ff979c 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -134,6 +134,7 @@ test-suite "serialization" : if ! $(BOOST_ARCHIVE_LIST) { test-suite "serialization2" : [ test-bsl-run-no-lib test_inclusion ] + [ test-bsl-run-no-lib test_inclusion2 ] [ test-bsl-run test_dll_exported : : dll_polymorphic_derived2_lib ] [ test-bsl-run test_dll_simple : : dll_a_lib ] [ compile test_dll_plugin.cpp ] @@ -149,7 +150,7 @@ if ! $(BOOST_ARCHIVE_LIST) { [ test-bsl-run test_smart_cast ] [ test-bsl-run test_codecvt_null ] - #[ test-bsl-run test_z ] + # [ test-bsl-run test_z ] # should fail compilation [ compile-fail test_not_serializable.cpp ] diff --git a/test/test_z.cpp b/test/test_z.cpp index 3d43fd4c..b46846a6 100644 --- a/test/test_z.cpp +++ b/test/test_z.cpp @@ -555,7 +555,8 @@ int main() assert(base64 == output); return 0; } -#else +#elif 0 + #include #include @@ -597,4 +598,23 @@ int main() return 0; } + +#else +#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; +} #endif