traits.h
Go to the documentation of this file.
34 using has_member_serialize_with_version_t = decltype(std::declval<T&>().serialize(std::declval<Archive&>(), 0u));
46 using has_member_load_with_version_t = decltype(std::declval<T&>().load(std::declval<Archive&>(), 0u));
58 using has_member_save_with_version_t = decltype(std::declval<T&>().save(std::declval<Archive&>(), 0u));
63 using has_freestanding_serialize_t = decltype(serialize(std::declval<Archive&>(), std::declval<T&>()));
75 decltype(serialize(std::declval<Archive&>(), std::declval<T&>(), boost::serialization::version_as_adl_tag));
83 inline constexpr bool has_member_serialize_v = ttg::meta::is_detected_v<has_member_serialize_t, T, Archive>;
156 struct is_printable<T, std::void_t<decltype(std::declval<std::ostream&>() << std::declval<T>())>> : std::true_type {};
159 struct printer_helper {
160 static void print(const void* object) { std::cout << "[unprintable object]" << std::endl; }
164 struct printer_helper<T, std::enable_if_t<is_printable<T>::value>> {
165 static void print(const void* object) { std::cout << *(static_cast<const T*>(object)) << std::endl; }
175 struct is_user_buffer_serializable : std::false_type {};
178 // struct is_user_buffer_serializable<T, std::enable_if_t<is_madness_user_buffer_serializable_v<T> ||
181 struct is_user_buffer_serializable<
182 T, std::enable_if_t<is_madness_user_buffer_serializable_v<T> || is_boost_user_buffer_serializable_v<T>>> : std::true_type {};
185 inline constexpr bool is_user_buffer_serializable_v = is_user_buffer_serializable<T>::value;
194 inline constexpr bool is_memcpyable_override_v = std::is_trivially_copyable_v<T>;
198 inline constexpr bool is_memcpyable_override_v<std::pair<T1,T2>> = std::is_trivially_copyable_v<T1> && std::is_trivially_copyable_v<T2>;
204 struct is_memcpyable : std::bool_constant<std::is_trivially_copyable_v<T> || is_memcpyable_override_v<T>> {};
207 inline constexpr bool is_memcpyable_v = is_memcpyable<T>::value;
const unsigned_int version_as_adl_tag
Definition: traits.h:18
Definition: add_member_const.hpp:14
Definition: keymap.h:9
decltype(serialize(std::declval< Archive & >(), std::declval< T & >(), boost::serialization::version_as_adl_tag)) has_freestanding_boost_serialize_with_version_t
Definition: traits.h:75
decltype(serialize(std::declval< Archive & >(), std::declval< T & >())) has_freestanding_serialize_t
Definition: traits.h:63
decltype(std::declval< T & >().save(std::declval< Archive & >())) has_member_save_t
Definition: traits.h:52
constexpr bool has_member_serialize_with_version_v
Definition: traits.h:91
decltype(std::declval< T & >().serialize(std::declval< Archive & >())) has_member_serialize_t
Definition: traits.h:28
decltype(std::declval< T & >().load(std::declval< Archive & >())) has_member_load_t
Definition: traits.h:40
decltype(std::declval< T & >().save(std::declval< Archive & >(), 0u)) has_member_save_with_version_t
Definition: traits.h:58
constexpr bool has_member_load_with_version_v
Definition: traits.h:100
constexpr bool has_freestanding_serialize_with_version_v
Definition: traits.h:127
decltype(std::declval< T & >().serialize(std::declval< Archive & >(), 0u)) has_member_serialize_with_version_t
Definition: traits.h:34
constexpr bool has_freestanding_boost_serialize_with_version_v
Definition: traits.h:136
constexpr bool has_member_save_with_version_v
Definition: traits.h:109
decltype(serialize(std::declval< Archive & >(), std::declval< T & >(), 0u)) has_freestanding_serialize_with_version_t
Definition: traits.h:69
decltype(std::declval< T & >().load(std::declval< Archive & >(), 0u)) has_member_load_with_version_t
Definition: traits.h:46
constexpr bool has_freestanding_serialize_v
Definition: traits.h:118
Definition: traits.h:13
Definition: traits.h:153