CAF 0.17.6
|
Checks whether T
provides either a free function or a member function for serialization.
More...
#include <type_traits.hpp>
Public Types | |
using | serialize_type = decltype(test_serialize<T>(nullptr, nullptr)) |
using | deserialize_type = decltype(test_deserialize<T>(nullptr, nullptr)) |
using | type |
Static Public Member Functions | |
template<class U > | |
static auto | test_serialize (caf::serializer *sink, U *x, unsigned int y=0) -> decltype(serialize(*sink, *x, y)) |
template<class U > | |
static auto | test_serialize (caf::serializer *sink, U *x) -> decltype(serialize(*sink, *x)) |
template<class > | |
static auto | test_serialize (...) -> std::false_type |
template<class U > | |
static auto | test_deserialize (caf::deserializer *source, U *x, unsigned int y=0) -> decltype(serialize(*source, *x, y)) |
template<class U > | |
static auto | test_deserialize (caf::deserializer *source, U *x) -> decltype(serialize(*source, *x)) |
template<class > | |
static auto | test_deserialize (...) -> std::false_type |
Static Public Attributes | |
static constexpr bool | value = type::value |
Checks whether T
provides either a free function or a member function for serialization.
The checks test whether both serialization and deserialization can succeed. The meta function tests the following functions with Processor
being both serializer
and deserializer
and returns an integral constant if and only if the test succeeds for both.
serialize(Processor&, T&, const unsigned int)
serialize(Processor&, T&)
T::serialize(Processor&, const unsigned int)
.T::serialize(Processor&)
. using caf::detail::has_serialize< T, Ignore >::type |