Bitcoin Core  27.99.0
P2P Digital Currency
Static Public Attributes | Static Private Member Functions | List of all members
ipc::capnp::Unserializable< T > Struct Template Reference

Use SFINAE to define Unserializeable<T> trait which is true if type T has an Unserialize(stream) method, false otherwise. More...

#include <common-types.h>

Static Public Attributes

static constexpr bool value = decltype(test<T>(nullptr))::value
 

Static Private Member Functions

template<typename C >
static std::true_type test (decltype(std::declval< C >().Unserialize(std::declval< std::nullptr_t & >())) *)
 
template<typename >
static std::false_type test (...)
 

Detailed Description

template<typename T>
struct ipc::capnp::Unserializable< T >

Use SFINAE to define Unserializeable<T> trait which is true if type T has an Unserialize(stream) method, false otherwise.

Definition at line 36 of file common-types.h.

Member Function Documentation

◆ test() [1/2]

template<typename T >
template<typename >
static std::false_type ipc::capnp::Unserializable< T >::test (   ...)
staticprivate

◆ test() [2/2]

template<typename T >
template<typename C >
static std::true_type ipc::capnp::Unserializable< T >::test ( decltype(std::declval< C >().Unserialize(std::declval< std::nullptr_t & >())) *  )
staticprivate

Member Data Documentation

◆ value

template<typename T >
constexpr bool ipc::capnp::Unserializable< T >::value = decltype(test<T>(nullptr))::value
staticconstexpr

Definition at line 44 of file common-types.h.


The documentation for this struct was generated from the following file: