Page MenuHomePhorge

immer-box.hpp
No OneTemporary

Size
930 B
Referenced Files
None
Subscribers
None

immer-box.hpp

/*
* This file is part of libkazv.
* SPDX-FileCopyrightText: 2021 Tusooa Zhu <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#pragma once
#include <libkazv-config.hpp>
#include <boost/serialization/nvp.hpp>
#include <boost/serialization/split_free.hpp>
#include <immer/box.hpp>
namespace boost::serialization
{
template <class Archive, class T, class MP>
void save(Archive &ar, const immer::box<T, MP> &box, const unsigned int /* version */)
{
ar << box.get();
}
template <class Archive, class T, class MP>
void load(Archive &ar, immer::box<T, MP> &box, const unsigned int /* version */)
{
T val;
ar >> val;
box = val;
}
template<class Archive, class T, class MP>
inline void serialize(Archive &ar, immer::box<T, MP> &box, const unsigned int version)
{
boost::serialization::split_free(ar, box, version);
}
}

File Metadata

Mime Type
text/x-c++
Expires
Sun, Dec 1, 6:44 PM (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41804
Default Alt Text
immer-box.hpp (930 B)

Event Timeline