// -*- C++ -*- //===-------------------------- type_traits -------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef _LIBCPP_EXPERIMENTAL_TYPE_TRAITS #define _LIBCPP_EXPERIMENTAL_TYPE_TRAITS /** experimental/type_traits synopsis // C++1y #include namespace std { namespace experimental { inline namespace fundamentals_v1 { // See C++14 20.10.4.1, primary type categories template constexpr bool is_void_v = is_void::value; template constexpr bool is_null_pointer_v = is_null_pointer::value; template constexpr bool is_integral_v = is_integral::value; template constexpr bool is_floating_point_v = is_floating_point::value; template constexpr bool is_array_v = is_array::value; template constexpr bool is_pointer_v = is_pointer::value; template constexpr bool is_lvalue_reference_v = is_lvalue_reference::value; template constexpr bool is_rvalue_reference_v = is_rvalue_reference::value; template constexpr bool is_member_object_pointer_v = is_member_object_pointer::value; template constexpr bool is_member_function_pointer_v = is_member_function_pointer::value; template constexpr bool is_enum_v = is_enum::value; template constexpr bool is_union_v = is_union::value; template constexpr bool is_class_v = is_class::value; template constexpr bool is_function_v = is_function::value; // See C++14 20.10.4.2, composite type categories template constexpr bool is_reference_v = is_reference::value; template constexpr bool is_arithmetic_v = is_arithmetic::value; template constexpr bool is_fundamental_v = is_fundamental::value; template constexpr bool is_object_v = is_object::value; template constexpr bool is_scalar_v = is_scalar::value; template constexpr bool is_compound_v = is_compound::value; template constexpr bool is_member_pointer_v = is_member_pointer::value; // See C++14 20.10.4.3, type properties template constexpr bool is_const_v = is_const::value; template constexpr bool is_volatile_v = is_volatile::value; template constexpr bool is_trivial_v = is_trivial::value; template constexpr bool is_trivially_copyable_v = is_trivially_copyable::value; template constexpr bool is_standard_layout_v = is_standard_layout::value; template constexpr bool is_pod_v = is_pod::value; template constexpr bool is_literal_type_v = is_literal_type::value; template constexpr bool is_empty_v = is_empty::value; template constexpr bool is_polymorphic_v = is_polymorphic::value; template constexpr bool is_abstract_v = is_abstract::value; template constexpr bool is_final_v = is_final::value; template constexpr bool is_signed_v = is_signed::value; template constexpr bool is_unsigned_v = is_unsigned::value; template constexpr bool is_constructible_v = is_constructible::value; template constexpr bool is_default_constructible_v = is_default_constructible::value; template constexpr bool is_copy_constructible_v = is_copy_constructible::value; template constexpr bool is_move_constructible_v = is_move_constructible::value; template constexpr bool is_assignable_v = is_assignable::value; template constexpr bool is_copy_assignable_v = is_copy_assignable::value; template constexpr bool is_move_assignable_v = is_move_assignable::value; template constexpr bool is_destructible_v = is_destructible::value; template constexpr bool is_trivially_constructible_v = is_trivially_constructible::value; template constexpr bool is_trivially_default_constructible_v = is_trivially_default_constructible::value; template constexpr bool is_trivially_copy_constructible_v = is_trivially_copy_constructible::value; template constexpr bool is_trivially_move_constructible_v = is_trivially_move_constructible::value; template constexpr bool is_trivially_assignable_v = is_trivially_assignable::value; template constexpr bool is_trivially_copy_assignable_v = is_trivially_copy_assignable::value; template constexpr bool is_trivially_move_assignable_v = is_trivially_move_assignable::value; template constexpr bool is_trivially_destructible_v = is_trivially_destructible::value; template constexpr bool is_nothrow_constructible_v = is_nothrow_constructible::value; template constexpr bool is_nothrow_default_constructible_v = is_nothrow_default_constructible::value; template constexpr bool is_nothrow_copy_constructible_v = is_nothrow_copy_constructible::value; template constexpr bool is_nothrow_move_constructible_v = is_nothrow_move_constructible::value; template constexpr bool is_nothrow_assignable_v = is_nothrow_assignable::value; template constexpr bool is_nothrow_copy_assignable_v = is_nothrow_copy_assignable::value; template constexpr bool is_nothrow_move_assignable_v = is_nothrow_move_assignable::value; template constexpr bool is_nothrow_destructible_v = is_nothrow_destructible::value; template constexpr bool has_virtual_destructor_v = has_virtual_destructor::value; // See C++14 20.10.5, type property queries template constexpr size_t alignment_of_v = alignment_of::value; template constexpr size_t rank_v = rank::value; template constexpr size_t extent_v = extent::value; // See C++14 20.10.6, type relations template constexpr bool is_same_v = is_same::value; template constexpr bool is_base_of_v = is_base_of::value; template constexpr bool is_convertible_v = is_convertible::value; // 3.3.2, Other type transformations template class invocation_type; // not defined template class invocation_type; template class raw_invocation_type; // not defined template class raw_invocation_type; template using invocation_type_t = typename invocation_type::type; template using raw_invocation_type_t = typename raw_invocation_type::type; } // namespace fundamentals_v1 } // namespace experimental } // namespace std */ #include #if _LIBCPP_STD_VER > 11 #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif _LIBCPP_BEGIN_NAMESPACE_LFTS #ifndef _LIBCPP_HAS_NO_VARIABLE_TEMPLATES // C++14 20.10.4.1, primary type categories template _LIBCPP_CONSTEXPR bool is_void_v = is_void<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_null_pointer_v = is_null_pointer<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_integral_v = is_integral<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_floating_point_v = is_floating_point<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_array_v = is_array<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_pointer_v = is_pointer<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_lvalue_reference_v = is_lvalue_reference<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_rvalue_reference_v = is_rvalue_reference<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_member_object_pointer_v = is_member_object_pointer<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_member_function_pointer_v = is_member_function_pointer<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_enum_v = is_enum<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_union_v = is_union<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_class_v = is_class<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_function_v = is_function<_Tp>::value; // C++14 20.10.4.2, composite type categories template _LIBCPP_CONSTEXPR bool is_reference_v = is_reference<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_arithmetic_v = is_arithmetic<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_fundamental_v = is_fundamental<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_object_v = is_object<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_scalar_v = is_scalar<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_compound_v = is_compound<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_member_pointer_v = is_member_pointer<_Tp>::value; // C++14 20.10.4.3, type properties template _LIBCPP_CONSTEXPR bool is_const_v = is_const<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_volatile_v = is_volatile<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_trivial_v = is_trivial<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_trivially_copyable_v = is_trivially_copyable<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_standard_layout_v = is_standard_layout<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_pod_v = is_pod<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_literal_type_v = is_literal_type<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_empty_v = is_empty<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_polymorphic_v = is_polymorphic<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_abstract_v = is_abstract<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_final_v = is_final<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_signed_v = is_signed<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_unsigned_v = is_unsigned<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_constructible_v = is_constructible<_Tp, _Ts...>::value; template _LIBCPP_CONSTEXPR bool is_default_constructible_v = is_default_constructible<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_copy_constructible_v = is_copy_constructible<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_move_constructible_v = is_move_constructible<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_assignable_v = is_assignable<_Tp, _Up>::value; template _LIBCPP_CONSTEXPR bool is_copy_assignable_v = is_copy_assignable<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_move_assignable_v = is_move_assignable<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_destructible_v = is_destructible<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_trivially_constructible_v = is_trivially_constructible<_Tp, _Ts...>::value; template _LIBCPP_CONSTEXPR bool is_trivially_default_constructible_v = is_trivially_default_constructible<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_trivially_copy_constructible_v = is_trivially_copy_constructible<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_trivially_move_constructible_v = is_trivially_move_constructible<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_trivially_assignable_v = is_trivially_assignable<_Tp, _Up>::value; template _LIBCPP_CONSTEXPR bool is_trivially_copy_assignable_v = is_trivially_copy_assignable<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_trivially_move_assignable_v = is_trivially_move_assignable<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_trivially_destructible_v = is_trivially_destructible<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_nothrow_constructible_v = is_nothrow_constructible<_Tp, _Ts...>::value; template _LIBCPP_CONSTEXPR bool is_nothrow_default_constructible_v = is_nothrow_default_constructible<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_nothrow_copy_constructible_v = is_nothrow_copy_constructible<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_nothrow_move_constructible_v = is_nothrow_move_constructible<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_nothrow_assignable_v = is_nothrow_assignable<_Tp, _Up>::value; template _LIBCPP_CONSTEXPR bool is_nothrow_copy_assignable_v = is_nothrow_copy_assignable<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_nothrow_move_assignable_v = is_nothrow_move_assignable<_Tp>::value; template _LIBCPP_CONSTEXPR bool is_nothrow_destructible_v = is_nothrow_destructible<_Tp>::value; template _LIBCPP_CONSTEXPR bool has_virtual_destructor_v = has_virtual_destructor<_Tp>::value; // C++14 20.10.5, type properties queries template _LIBCPP_CONSTEXPR size_t alignment_of_v = alignment_of<_Tp>::value; template _LIBCPP_CONSTEXPR size_t rank_v = rank<_Tp>::value; template _LIBCPP_CONSTEXPR size_t extent_v = extent<_Tp, _Id>::value; // C++14 20.10.6, type relations template _LIBCPP_CONSTEXPR bool is_same_v = is_same<_Tp, _Up>::value; template _LIBCPP_CONSTEXPR bool is_base_of_v = is_base_of<_Tp, _Up>::value; template _LIBCPP_CONSTEXPR bool is_convertible_v = is_convertible<_Tp, _Up>::value; #endif /* _LIBCPP_HAS_NO_VARIABLE_TEMPLATES */ // 3.3.2, Other type transformations /* template class _LIBCPP_TYPE_VIS_ONLY raw_invocation_type; template class _LIBCPP_TYPE_VIS_ONLY raw_invocation_type<_Fn(_Args...)>; template class _LIBCPP_TYPE_VIS_ONLY invokation_type; template class _LIBCPP_TYPE_VIS_ONLY invokation_type<_Fn(_Args...)>; template using invokation_type_t = typename invokation_type<_Tp>::type; template using raw_invocation_type_t = typename raw_invocation_type<_Tp>::type; */ _LIBCPP_END_NAMESPACE_LFTS #endif /* _LIBCPP_STD_VER > 11 */ #endif /* _LIBCPP_EXPERIMENTAL_TYPE_TRAITS */