SDSL 3.0.2
Succinct Data Structure Library
Loading...
Searching...
No Matches
cereal.hpp
Go to the documentation of this file.
1// Copyright (c) 2018, the SDSL Project Authors. All rights reserved.
2// Please see the AUTHORS file for details. Use of this source code is governed
3// by a BSD license that can be found in the LICENSE file.
8#ifndef INCLUDED_SDSL_CEREAL
9#define INCLUDED_SDSL_CEREAL
10
11#include <type_traits>
12
13#if defined(__has_include)
14# if __has_include(<cereal/cereal.hpp>)
15# define SDSL_HAS_CEREAL 1
16# include <cereal/archives/binary.hpp>
17# include <cereal/archives/json.hpp>
18# include <cereal/archives/portable_binary.hpp>
19# include <cereal/archives/xml.hpp>
20# include <cereal/cereal.hpp>
21# include <cereal/details/traits.hpp>
22# include <cereal/types/array.hpp>
23# include <cereal/types/memory.hpp>
24# include <cereal/types/vector.hpp>
25# endif
26#endif
27
28#ifndef SDSL_HAS_CEREAL
29# define SDSL_HAS_CEREAL 0
30
31# define CEREAL_NVP(X) X
32
33# define CEREAL_SERIALIZE_FUNCTION_NAME serialize
34# define CEREAL_LOAD_FUNCTION_NAME load
35# define CEREAL_SAVE_FUNCTION_NAME save
36# define CEREAL_LOAD_MINIMAL_FUNCTION_NAME load_minimal
37# define CEREAL_SAVE_MINIMAL_FUNCTION_NAME save_minimal
38
39namespace cereal
40{
41namespace traits
42{
43template <typename t1, typename t2>
45{
46 using value = std::false_type;
47};
48
49template <typename t1, typename t2>
51{
52 using value = std::false_type;
53};
54} // namespace traits
55
56template <typename t>
58{};
59
60template <typename t1, typename t2>
61void make_nvp(t1 const &, t2 const &)
62{}
63
64template <typename t>
65void make_size_tag(t const &)
66{}
67
68template <typename t1, typename t2>
69t1 binary_data(t1 const &, t2 const &)
70{}
71
72} // namespace cereal
73#endif
74#endif
void make_nvp(t1 const &, t2 const &)
Definition cereal.hpp:61
void make_size_tag(t const &)
Definition cereal.hpp:65
t1 binary_data(t1 const &, t2 const &)
Definition cereal.hpp:69