13 #ifndef MLPACK_CORE_UTIL_HAS_SERIALIZE_HPP
14 #define MLPACK_CORE_UTIL_HAS_SERIALIZE_HPP
17 #include <boost/serialization/serialization.hpp>
18 #include <boost/archive/xml_oarchive.hpp>
19 #include <type_traits>
40 static const bool value = HasSerializeCheck<T, NonStaticSerialize>::value ||
41 HasSerializeCheck<T, StaticSerialize>::value;
50 template<
typename U,
typename V,
typename W>
struct check;
51 template<
typename U>
static yes&
chk(
55 template<
typename >
static no&
chk(...);
57 static const bool value = (
sizeof(chk<T>(0)) ==
sizeof(
yes));
typename enable_if< B, T >::type enable_if_t
static yes & chk(check< U, typename std::enable_if_t< std::is_class< U >::value > *, typename std::enable_if_t< HasSerializeFunction< U >::value > * > *)
HAS_EXACT_METHOD_FORM(serialize, HasSerializeCheck)
void(C::*)(boost::archive::xml_oarchive &, const unsigned int) NonStaticSerialize
void(*)(boost::archive::xml_oarchive &, const unsigned int) StaticSerialize