MCPcopy Create free account
hub / github.com/boostorg/histogram / serialization_impl

Function serialization_impl

test/adaptive_storage_test.cpp:58–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56#ifndef BOOST_HISTOGRAM_NO_SERIALIZATION
57template <typename T>
58void serialization_impl() {
59 const auto a = prepare(1, T(1));
60 std::ostringstream os;
61 std::string buf;
62 {
63 std::ostringstream os;
64 boost::archive::text_oarchive oa(os);
65 oa << a;
66 buf = os.str();
67 }
68 adaptive_storage_type b;
69 BOOST_TEST(!(a == b));
70 {
71 std::istringstream is(buf);
72 boost::archive::text_iarchive ia(is);
73 ia >> b;
74 }
75 BOOST_TEST(a == b);
76}
77
78template <>
79void serialization_impl<void>() {

Callers

nothing calls this directly

Calls 1

prepareFunction · 0.85

Tested by

no test coverage detected