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 --- .../libs/serialization/example/demo_pimpl.cpp | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/boost/libs/serialization/example/demo_pimpl.cpp (limited to 'src/boost/libs/serialization/example/demo_pimpl.cpp') 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; +} + -- cgit v1.2.3