#ifndef NALL_TRAITS_HPP #define NALL_TRAITS_HPP namespace nall { //== //is //== template struct is_integral { enum { value = false }; }; template<> struct is_integral { enum { value = true }; }; template<> struct is_integral { enum { value = true }; }; template<> struct is_integral { enum { value = true }; }; template<> struct is_integral { enum { value = true }; }; template<> struct is_integral { enum { value = true }; }; template<> struct is_integral { enum { value = true }; }; template<> struct is_integral { enum { value = true }; }; template<> struct is_integral { enum { value = true }; }; template<> struct is_integral { enum { value = true }; }; template<> struct is_integral { enum { value = true }; }; template<> struct is_integral { enum { value = true }; }; template<> struct is_integral { enum { value = true }; }; template<> struct is_integral { enum { value = true }; }; template struct is_floating_point { enum { value = false }; }; template<> struct is_floating_point { enum { value = true }; }; template<> struct is_floating_point { enum { value = true }; }; template<> struct is_floating_point { enum { value = true }; }; template struct is_void { enum { value = false }; }; template<> struct is_void { enum { value = true }; }; template struct is_arithmetic { enum { value = is_integral::value || is_floating_point::value }; }; template struct is_fundamental { enum { value = is_integral::value || is_floating_point::value || is_void::value }; }; template struct is_compound { enum { value = !is_fundamental::value }; }; template struct is_array { enum { value = false }; }; template struct is_array { enum { value = true }; }; template struct is_array { enum { value = true }; }; template struct is_const { enum { value = false }; }; template struct is_const { enum { value = true }; }; template struct is_const { enum { value = true }; }; template struct is_pointer { enum { value = false }; }; template struct is_pointer { enum { value = true }; }; template struct is_reference { enum { value = false }; }; template struct is_reference { enum { value = true }; }; template struct is_same { enum { value = false }; }; template struct is_same { enum { value = true }; }; //=== //add //=== template struct add_const { typedef const T type; }; template struct add_const { typedef const T type; }; template struct add_const { typedef const T& type; }; template struct add_pointer { typedef T* type; }; template struct add_pointer { typedef T** type; }; template struct add_reference { typedef T& type; }; template struct add_reference { typedef T& type; }; //====== //remove //====== template struct remove_const { typedef T type; }; template struct remove_const { typedef T type; }; template struct remove_const { typedef T type; }; template struct remove_extent { typedef T type; }; template struct remove_extent { typedef T type; }; template struct remove_extent { typedef T type; }; template struct remove_pointer { typedef T type; }; template struct remove_pointer { typedef T type; }; template struct remove_reference { typedef T type; }; template struct remove_reference { typedef T type; }; } #endif