13 #ifndef MLPACK_CORE_UTIL_HAS_SERIALIZE_HPP 14 #define MLPACK_CORE_UTIL_HAS_SERIALIZE_HPP 17 #include <cereal/archives/xml.hpp> 18 #include <cereal/cereal.hpp> 20 #include <type_traits> 35 using NonStaticSerialize = void(
C::*)(cereal::XMLOutputArchive&,
36 const uint32_t version);
39 using StaticSerialize = void(*)(cereal::XMLOutputArchive&,
40 const uint32_t version);
42 static const bool value = HasSerializeCheck<T, NonStaticSerialize>::value ||
43 HasSerializeCheck<T, StaticSerialize>::value;
52 template<
typename U,
typename V,
typename W>
struct check;
53 template<
typename U>
static yes& chk(
55 typename std::enable_if_t<std::is_class<U>::value>*,
57 template<
typename >
static no& chk(...);
59 static const bool value = (
sizeof(chk<T>(0)) ==
sizeof(yes));
Definition: has_serialize.hpp:47
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
Definition: sfinae_test.cpp:40
#define HAS_EXACT_METHOD_FORM(METHOD, NAME)
HAS_EXACT_METHOD_FORM generates a template that allows a compile time check whether a given class has...
Definition: sfinae_utility.hpp:285
Definition: has_serialize.hpp:32
Definition: has_serialize.hpp:52