#ifndef NALL_TRAITS_HPP #define NALL_TRAITS_HPP #include namespace nall { template class has_default_constructor { template class receive_size{}; template static signed sfinae(receive_size*); template static char sfinae(...); public: enum : bool { value = sizeof(sfinae(0)) == sizeof(signed) }; }; template struct enable_if { typedef T type; }; template struct enable_if {}; template struct type_if { typedef T type; }; template struct type_if { typedef F type; }; template struct static_and { enum { value = false }; }; template<> struct static_and { enum { value = true }; }; template struct static_or { enum { value = false }; }; template<> struct static_or { enum { value = true }; }; template<> struct static_or { enum { value = true }; }; template<> struct static_or { enum { value = true }; }; } #endif