by::tifHasDefaultCtor< T > Struct Template Reference

Type trait to check if type has default constructor. More...

#include <rtti.hpp>

Inheritance diagram for by::tifHasDefaultCtor< T >:
by::metaIf

Static Public Member Functions

template<typename X , typename = decltype(X())>
static yes test (X *)
 
template<typename X >
static no test (...)
 

Static Public Attributes

static constexpr nbool is = sizeof(decltype(test<T>(nullptr))) == sizeof(yes)
 

Additional Inherited Members

- Public Types inherited from by::metaIf
typedef short yes
 
typedef char no
 

Detailed Description

template<typename T>
struct by::tifHasDefaultCtor< T >

Type trait to check if type has default constructor.

Uses SFINAE to determine at compile-time whether type T can be default-constructed.


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