/* Copyright (C) 2015 Povilas Kanapickas This file is part of cppreference-doc This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. */ #ifndef CPPREFERENCE_TYPE_TRAITS_H #define CPPREFERENCE_TYPE_TRAITS_H #if CPPREFERENCE_STDVER>= 2011 namespace std { template struct integral_constant { typedef T value_type; typedef integral_constant type; static constexpr T value; constexpr operator value_type() const; constexpr operator()() const; }; typedef integral_constant false_type; typedef integral_constant true_type; // SIMPLIFIED: the actual base type depends on T // primary type categories template struct is_void : integral_constant {}; #if CPPREFERENCE_STDVER>= 2014 template struct is_null_pointer : integral_constant {}; #endif template struct is_integral : integral_constant {}; template struct is_floating_point : integral_constant {}; template struct is_array : integral_constant {}; template struct is_enum : integral_constant {}; template struct is_union : integral_constant {}; template struct is_class : integral_constant {}; template struct is_function : integral_constant {}; template struct is_pointer : integral_constant {}; template struct is_lvalue_reference : integral_constant {}; template struct is_rvalue_reference : integral_constant {}; template struct is_member_object_pointer : integral_constant {}; template struct is_member_function_pointer : integral_constant {}; // composite type categories template struct is_fundamental : integral_constant {}; template struct is_arithmetic : integral_constant {}; template struct is_scalar : integral_constant {}; template struct is_object : integral_constant {}; template struct is_compound : integral_constant {}; template struct is_reference : integral_constant {}; template struct is_member_pointer : integral_constant {}; // type properties template struct is_const : integral_constant {}; template struct is_volatile : integral_constant {}; template struct is_trivial : integral_constant {}; template struct is_trivially_copyable : integral_constant {}; template struct is_standard_layout : integral_constant {}; template struct is_pod : integral_constant {}; template struct is_literal_type : integral_constant {}; template struct is_empty : integral_constant {}; template struct is_polymorphic : integral_constant {}; #if CPPREFERENCE_STDVER>= 2014` template struct is_final : integral_constant {}; #endif template struct is_abstract : integral_constant {}; template struct is_signed : integral_constant {}; template struct is_unsigned : integral_constant {}; // supported operations template struct is_constructible : integral_constant {}; template struct is_trivially_constructible : integral_constant {}; template struct is_nothrow_constructible : integral_constant {}; template struct is_default_constructible : integral_constant {}; template struct is_trivially_default_constructible : integral_constant {}; template struct is_nothrow_default_constructible : integral_constant {}; template struct is_copy_constructible : integral_constant {}; template struct is_trivially_copy_constructible : integral_constant {}; template struct is_nothrow_copy_constructible : integral_constant {}; template struct is_move_constructible : integral_constant {}; template struct is_trivially_move_constructible : integral_constant {}; template struct is_nothrow_move_constructible : integral_constant {}; template struct is_assignable : integral_constant {}; template struct is_trivially_assignable : integral_constant {}; template struct is_nothrow_assignable : integral_constant {}; template struct is_copy_assignable : integral_constant {}; template struct is_trivially_copy_assignable : integral_constant {}; template struct is_nothrow_copy_assignable : integral_constant {}; template struct is_move_assignable : integral_constant {}; template struct is_trivially_move_assignable : integral_constant {}; template struct is_nothrow_move_assignable : integral_constant {}; template struct is_destructible : integral_constant {}; template struct is_trivially_destructible : integral_constant {}; template struct is_nothrow_destructible : integral_constant {}; template struct has_virtual_destructor : integral_constant {}; // property queries template struct alignment_of : integral_constant {}; template struct rank : integral_constant {}; template struct extent : integral_constant {}; // type relationships template struct is_same : integral_constant {}; template struct is_base_of : integral_constant {}; template struct is_convertible : integral_constant {}; // const-volatility specifiers template struct remove_cv { typedef T type; }; template struct remove_const { typedef T type; }; template struct remove_volatile { typedef T type; }; template struct add_cv { typedef T type; }; template struct add_const { typedef T type; }; template struct add_volatile { typedef T type; }; // references template struct remove_reference { typedef T type; }; template struct add_lvalue_reference { typedef T type; }; template struct add_rvalue_reference { typedef T type; }; // pointers template struct remove_pointer { typedef T type; }; template struct add_pointer { typedef T type; }; // sign modifiers template struct make_signed { typedef T type; }; template struct make_unsigned { typedef T type; }; // arrays template struct remove_extent { typedef T type; }; template struct remove_all_extents { typedef T type; }; // miscellaneous transformations template struct aligned_storage { typedef int type; }; template struct aligned_union { typedef int type; }; template struct decay { typedef int type; }; template struct enable_if { typedef int type; }; template struct conditional { typedef int type; }; template struct common_type { typedef int type; }; template struct underlying_type { typedef int type; }; template class result_of { typedef int type; }; // SIMPLIFIED: removed specializatio } // namespace std #endif // CPPREFERENCE_STDVER>= 2011 #endif // CPPREFERENCE_TYPE_TRAITS_H