SDSL  3.0.0
Succinct Data Structure Library
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/memory.hpp>
23 #include <cereal/types/vector.hpp>
24 #endif
25 #endif
26 
27 #ifndef SDSL_HAS_CEREAL
28 #define SDSL_HAS_CEREAL 0
29 
30 #define CEREAL_NVP(X) X
31 
32 #define CEREAL_SERIALIZE_FUNCTION_NAME serialize
33 #define CEREAL_LOAD_FUNCTION_NAME load
34 #define CEREAL_SAVE_FUNCTION_NAME save
35 #define CEREAL_LOAD_MINIMAL_FUNCTION_NAME load_minimal
36 #define CEREAL_SAVE_MINIMAL_FUNCTION_NAME save_minimal
37 
38 namespace cereal
39 {
40 namespace traits
41 {
42 template <typename t1, typename t2>
44 {
45  using value = std::false_type;
46 };
47 
48 template <typename t1, typename t2>
50 {
51  using value = std::false_type;
52 };
53 } // namespace traits
54 
55 template <typename t>
56 struct BinaryData
57 {};
58 
59 template <typename t1, typename t2>
60 void make_nvp(t1 const &, t2 const &)
61 {}
62 
63 template <typename t>
64 void make_size_tag(t const &)
65 {}
66 
67 template <typename t1, typename t2>
68 t1 binary_data(t1 const &, t2 const &)
69 {}
70 
71 } // namespace cereal
72 #endif
73 #endif
void make_nvp(t1 const &, t2 const &)
Definition: cereal.hpp:60
void make_size_tag(t const &)
Definition: cereal.hpp:64
t1 binary_data(t1 const &, t2 const &)
Definition: cereal.hpp:68