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

Use SFINAE to define Serializeable<T> trait which is true if type T has a Serialize(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 >().Serialize(std::declval< std::nullptr_t & >())) *)
 
template<typename >
static std::false_type test (...)
 

Detailed Description

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

Use SFINAE to define Serializeable<T> trait which is true if type T has a Serialize(stream) method, false otherwise.

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

Member Function Documentation

◆ test() [1/2]

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

◆ test() [2/2]

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

Member Data Documentation

◆ value

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

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


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