Type trait to check if type has default constructor 더 자세히 ...
#include <rtti.hpp>
정적 Public 멤버 함수 | |
| template<typename X , typename = decltype(X())> | |
| static yes | test (X *) |
| template<typename X > | |
| static no | test (...) |
정적 Public 속성 | |
| static constexpr nbool | is = sizeof(decltype(test<T>(nullptr))) == sizeof(yes) |
추가로 상속된 멤버들 | |
by::metaIf(으)로부터 상속된 Public 타입 | |
| typedef short | yes |
| typedef char | no |
Type trait to check if type has default constructor
Uses SFINAE to determine at compile-time whether type T can be default-constructed.