mirror of
https://github.com/boostorg/unordered.git
synced 2025-11-06 02:31:53 +01:00
added first tests of serialization support
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
|
||||
// Copyright 2006-2009 Daniel James.
|
||||
// Copyright 2022 Christian Mazakas
|
||||
// Copyright 2023 Joaqui M Lopez Munoz
|
||||
// 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)
|
||||
|
||||
@@ -11,6 +12,7 @@
|
||||
#include "../helpers/fwd.hpp"
|
||||
#include "../helpers/memory.hpp"
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/core/serialization.hpp>
|
||||
#include <boost/limits.hpp>
|
||||
#include <cstddef>
|
||||
|
||||
@@ -74,6 +76,14 @@ namespace test {
|
||||
{
|
||||
return out << "(" << o.tag1_ << "," << o.tag2_ << ")";
|
||||
}
|
||||
|
||||
|
||||
template<typename Archive>
|
||||
void serialize(Archive& ar,unsigned int)
|
||||
{
|
||||
ar & boost::core::make_nvp("tag1", tag1_);
|
||||
ar & boost::core::make_nvp("tag2", tag2_);
|
||||
}
|
||||
};
|
||||
|
||||
class movable : private counted_object
|
||||
|
||||
Reference in New Issue
Block a user