template<typename T, typename S = checkpoint:: SerializerRef<BaseSerializer>>
SerializableTraits struct
Public types
-
template<typename U, typename V>using serialize_t = decltype(std::declval<U>().serialize(std::declval<V&>()))
-
using has_serialize = detection::
is_detected<serialize_ t, T, S> -
template<typename U, typename V>using nonintrustive_serialize_t = decltype(serialize(std::declval<V&>(), std::declval<U&>()))
-
using has_nonintrustive_serialize = detection::
is_detected<nonintrustive_ serialize_ t, T, S> -
template<typename U, typename V>using serializeParent_t = decltype(std::declval<U>().serializeParent(std::declval<V&>()))
-
using has_serializeParent = detection::
is_detected<serializeParent_ t, T, S> -
template<typename U, typename V>using serializeThis_t = decltype(std::declval<U>().serializeThis(std::declval<V&>()))
-
using has_serializeThis = detection::
is_detected<serializeThis_ t, T, S> - using has_byteCopyTraitTrue = isByteCopyable<T>
-
template<typename U>using has_isArith = std::is_arithmetic<U>
-
template<typename U>using constructor_t = decltype(U())
-
using has_default_constructor = detection::
is_detected<constructor_ t, T> -
template<typename U>using tagged_constructor_t = decltype(U(std::declval<SERIALIZE_
CONSTRUCT_ TAG>())) -
using has_tagged_constructor = detection::
is_detected<tagged_ constructor_ t, T> -
template<typename U>using reconstruct_t = decltype(U::reconstruct(std::declval<void*>()))
-
using has_reconstruct = detection::
is_detected_exact<T&, reconstruct_ t, T> -
template<typename U>using nonintrustive_reconstruct_t = decltype(reconstruct(std::declval<U*&>(), std::declval<void*>()))
-
using has_nonintrusive_reconstruct = detection::
is_detected<nonintrustive_ reconstruct_ t, T> -
template<typename U>using specialized_reconstruct_t = decltype(checkpoint::
CheckpointReconstructor<U>::reconstruct(std::declval<U*&>(), std::declval<void*>())) -
using has_specialized_reconstruct = detection::
is_detected<specialized_ reconstruct_ t, T>
Public static variables
- static const auto has_serialize_instrusive constexpr
- static const auto has_serialize_noninstrusive constexpr
- static const auto has_serialize_function constexpr
- static const auto has_parent_serialize constexpr
- static const auto has_this_serialize constexpr
- static const auto has_split_serialize constexpr
- static const auto is_bytecopyable constexpr
- static const auto is_default_constructible constexpr
- static const auto is_tagged_constructible constexpr
- static const auto is_intrusive_reconstructible constexpr
- static const auto is_nonintrusive_reconstructible constexpr
- static const auto is_specialized_reconstructible constexpr
- static const auto is_reconstructible constexpr
- static const auto is_constructible constexpr
- static const auto is_serializable constexpr
- static const auto is_traversable constexpr
Typedef documentation
template<typename T, typename S>
template<typename U, typename V>
using checkpoint:: SerializableTraits<T, S>:: serialize_t = decltype(std::declval<U>().serialize(std::declval<V&>()))
Start with detection of "serialize" overloads, intrusive and non-intrusive.
NOTE: Detection of serializeParent
and serializeThis
are no longer used on "develop" in VT (eliminated with message serialization refactoring), but remain on the release branch for 1.0.0. Thus, they must stay for now.
template<typename T, typename S>
using checkpoint:: SerializableTraits<T, S>:: has_byteCopyTraitTrue = isByteCopyable<T>
Detect byte-copyability trait and std::is_arithmetic, used for types that do not have a serialize method.
template<typename T, typename S>
template<typename U>
using checkpoint:: SerializableTraits<T, S>:: constructor_t = decltype(U())
Detect different types of re-constructibility: default constructors, explicitly tagged constructors for serializers, and reconstruct methods.
Variable documentation
template<typename T, typename S>
static const auto checkpoint:: SerializableTraits<T, S>:: is_serializable constexpr
Finally, combine all these into a single definition of is_serializable