14 #include <type_traits> 18 namespace serialization {
33 operator const unsigned int &(void)
const 38 operator unsigned int &(void)
51 template <
typename T,
typename Archive>
55 static auto test(U* p) -> decltype(p->serialize(std::declval<Archive&>(), std::declval<const unsigned int>()));
58 static auto test(...) -> std::false_type;
60 using type =
typename std::is_same<decltype(test<T>(
nullptr)),
void>
::type;
61 static const auto value = type::value;
67 template <
typename Archive,
typename T>
68 typename std::enable_if<Archive::isSave::value>::type
78 template <
typename Archive,
typename T>
79 typename std::enable_if<!Archive::isSave::value>::type
89 template <
typename Archive,
typename T>
90 typename std::enable_if<!hasSerialize<T, Archive>::value>::type
100 template <
typename Archive,
typename T>
101 typename std::enable_if<hasSerialize<T, Archive>::value>::type
104 value.serialize(ar, ver);
typename std::is_same< decltype(test< T >(nullptr)), void >::type type
Definition: Invoke.hpp:60
VersionType(const unsigned int ver)
Definition: Invoke.hpp:27
Definition: ArchiveEntry.hpp:20
std::enable_if< Archive::isSave::value >::type invokeSplit(Archive &ar, T &value, const unsigned int ver)
Definition: Invoke.hpp:69
std::enable_if<!hasSerialize< T, Archive >::value >::type invokeSerialize(Archive &ar, T &value, const unsigned int ver)
Definition: Invoke.hpp:91
void save(Archive &ar, const std::complex< T > &t, const unsigned int)
Definition: Complex.hpp:20
void serialize(Archive &ar, std::complex< T > &t, const unsigned int ver)
Definition: Complex.hpp:37
Definition: Invoke.hpp:52
Definition: Invoke.hpp:24
void load(Archive &ar, std::complex< T > &t, const unsigned int)
Definition: Complex.hpp:27