MDBX Containers
Loading...
Searching...
No Matches
mdbxc::has_to_bytes< T > Struct Template Reference

Trait to check if a type provides a to_bytes() member. More...

#include <utils.hpp>

Static Public Attributes

static const bool value = decltype(check<T>(0))::value
 

Static Private Member Functions

template<typename U>
static auto check (U *) -> decltype(std::declval< const U >().to_bytes(), std::true_type())
 
template<typename>
static std::false_type check (...)
 

Detailed Description

template<typename T>
struct mdbxc::has_to_bytes< T >

Trait to check if a type provides a to_bytes() member.

Template Parameters
TType under inspection.

Definition at line 29 of file utils.hpp.

Member Function Documentation

◆ check() [1/2]

template<typename T>
template<typename>
static std::false_type mdbxc::has_to_bytes< T >::check ( ...)
staticprivate

◆ check() [2/2]

template<typename T>
template<typename U>
static auto mdbxc::has_to_bytes< T >::check ( U * ) -> decltype(std::declval< const U >().to_bytes(), std::true_type())
staticprivate

Member Data Documentation

◆ value

template<typename T>
const bool mdbxc::has_to_bytes< T >::value = decltype(check<T>(0))::value
static

Definition at line 36 of file utils.hpp.


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