|
|
|
|
@@ -649,7 +649,7 @@ template<typename T> constexpr bool_t is_pointer_v = is_pointer<T> {};
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is of a floating point type
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if type `T` is a floating point type and store it in `is_same::value`.
|
|
|
|
|
/// \details Checks if type \f$T\f$ is a floating point type and store it in `is_same::value`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_lvalue_reference
|
|
|
|
|
: detail::_is_lvalue_reference<T>{};
|
|
|
|
|
@@ -666,7 +666,7 @@ template<typename T> constexpr bool_t is_lvalue_reference_v = is_lvalue_referenc
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is of a floating point type
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if type `T` is a floating point type and store it in `is_same::value`.
|
|
|
|
|
/// \details Checks if type \f$T\f$ is a floating point type and store it in `is_same::value`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_rvalue_reference
|
|
|
|
|
: detail::_is_rvalue_reference<T>{};
|
|
|
|
|
@@ -683,7 +683,7 @@ template<typename T> constexpr bool_t is_rvalue_reference_v = is_rvalue_referenc
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is a pointer to a member function
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if type `T` is pointer to a member function and store it in `is_member_function_pointer::value`.
|
|
|
|
|
/// \details Checks if type \f$T\f$ is pointer to a member function and store it in `is_member_function_pointer::value`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_member_function_pointer
|
|
|
|
|
: bool_constant<FENNEC_BUILTIN_IS_MEMBER_FUNCTION_POINTER(T)> {};
|
|
|
|
|
@@ -700,7 +700,7 @@ template<typename T> constexpr bool_t is_member_function_pointer_v = is_member_f
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is a pointer to a member object
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if type `T` is pointer to a member object and store it in `is_member_object_pointer::value`.
|
|
|
|
|
/// \details Checks if type \f$T\f$ is pointer to a member object and store it in `is_member_object_pointer::value`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_member_object_pointer
|
|
|
|
|
: bool_constant<FENNEC_BUILTIN_IS_MEMBER_OBJECT_POINTER(T)> {};
|
|
|
|
|
@@ -722,7 +722,7 @@ template<typename T> constexpr bool_t is_member_object_pointer_v = is_member_obj
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is an arithmetic type
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if type `T` is a built-in type with arithmetic operators and store it in `is_same::value`.
|
|
|
|
|
/// \details Checks if type \f$T\f$ is a built-in type with arithmetic operators and store it in `is_same::value`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_arithmetic
|
|
|
|
|
: bool_constant<is_integral_v<T> or is_floating_point_v<T>>{};
|
|
|
|
|
@@ -753,7 +753,7 @@ template<typename T> constexpr bool_t is_fundamental_v = is_fundamental<T>::valu
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is an arithmetic type
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if type `T` is a built-in type with arithmetic operators and store it in `is_scalar::value`.
|
|
|
|
|
/// \details Checks if type \f$T\f$ is a built-in type with arithmetic operators and store it in `is_scalar::value`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_scalar
|
|
|
|
|
: bool_constant<is_arithmetic_v<T> or is_enum_v<T> or is_pointer_v<T>>{};
|
|
|
|
|
@@ -770,7 +770,7 @@ template<typename T> constexpr bool_t is_scalar_v = is_scalar<T>::value;
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is an object
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if type `T` is an object and store it in `is_object::value`.
|
|
|
|
|
/// \details Checks if type \f$T\f$ is an object and store it in `is_object::value`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_object : bool_constant<FENNEC_BUILTIN_IS_OBJECT(T)> {};
|
|
|
|
|
|
|
|
|
|
@@ -786,7 +786,7 @@ template<typename T> constexpr bool_t is_object_v = is_object<T>::value;
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is a object compound type
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if type `T` is an object and store it in `is_compound::value`.
|
|
|
|
|
/// \details Checks if type \f$T\f$ is an object and store it in `is_compound::value`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_compound : bool_constant<not is_fundamental_v<T>> {};
|
|
|
|
|
|
|
|
|
|
@@ -802,7 +802,7 @@ template<typename T> constexpr bool_t is_compound_v = is_compound<T>::value;
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is of a reference type
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if type `T` is a reference type and store it in `is_reference::value`.
|
|
|
|
|
/// \details Checks if type \f$T\f$ is a reference type and store it in `is_reference::value`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_reference
|
|
|
|
|
: detail::_is_reference<T>{};
|
|
|
|
|
@@ -819,7 +819,7 @@ template<typename T> constexpr bool_t is_reference_v = is_reference<T> {};
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is a pointer to a member
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if type `T` is pointer to a member and store it in `is_member_function_pointer::value`.
|
|
|
|
|
/// \details Checks if type \f$T\f$ is pointer to a member and store it in `is_member_function_pointer::value`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_member_pointer
|
|
|
|
|
: bool_constant<FENNEC_BUILTIN_IS_MEMBER_POINTER(T)> {};
|
|
|
|
|
@@ -841,7 +841,7 @@ template<typename T> constexpr bool_t is_member_pointer_v = is_member_pointer<T>
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is of a const type
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if type `T` is a const type and store it in `is_same::value`.
|
|
|
|
|
/// \details Checks if type \f$T\f$ is a const type and store it in `is_same::value`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_const
|
|
|
|
|
: detail::_is_const<T>{};
|
|
|
|
|
@@ -858,7 +858,7 @@ template<typename T> constexpr bool_t is_const_v = is_const<T> {};
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is of a volatile type
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if type `T` is a volatile type and store it in `is_same::value`.
|
|
|
|
|
/// \details Checks if type \f$T\f$ is a volatile type and store it in `is_same::value`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_volatile
|
|
|
|
|
: detail::_is_volatile<T>{};
|
|
|
|
|
@@ -873,9 +873,9 @@ template<typename T> constexpr bool_t is_volatile_v = is_volatile<T> {};
|
|
|
|
|
// fennec::is_trivial --------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is trivial
|
|
|
|
|
/// \brief Check if type \f$T\f$ is trivial
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \details Checks if \f$T\f$
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_trivial : bool_constant<FENNEC_BUILTIN_IS_TRIVIAL(T)> {};
|
|
|
|
|
|
|
|
|
|
@@ -889,9 +889,9 @@ template<typename T> constexpr bool_t is_trivial_v = is_trivial<T>{};
|
|
|
|
|
// fennec::is_trivially_copyable ---------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is trivially_copyable
|
|
|
|
|
/// \brief Check if type \f$T\f$ is trivially_copyable
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \details Checks if \f$T\f$
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_trivially_copyable : bool_constant<FENNEC_BUILTIN_IS_TRIVIALLY_COPYABLE(T)> {};
|
|
|
|
|
|
|
|
|
|
@@ -905,9 +905,9 @@ template<typename T> constexpr bool_t is_trivially_copyable_v = is_trivially_cop
|
|
|
|
|
// fennec::is_standard_layout ------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is standard_layout
|
|
|
|
|
/// \brief Check if type \f$T\f$ is standard_layout
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \details Checks if \f$T\f$
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_standard_layout : bool_constant<FENNEC_BUILTIN_IS_STANDARD_LAYOUT(T)> {};
|
|
|
|
|
|
|
|
|
|
@@ -921,9 +921,9 @@ template<typename T> constexpr bool_t is_standard_layout_v = is_standard_layout<
|
|
|
|
|
// fennec::has_unique_object_representations ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` has unique object representations
|
|
|
|
|
/// \brief Check if type \f$T\f$ has unique object representations
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \details Checks if \f$T\f$
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct has_unique_object_representations
|
|
|
|
|
: bool_constant<FENNEC_BUILTIN_HAS_UNIQUE_OBJECT_REPRESENTATIONS(remove_cv_t<T>)> {};
|
|
|
|
|
@@ -938,9 +938,9 @@ template<typename T> constexpr bool_t has_unique_object_representations_v = has_
|
|
|
|
|
// fennec::is_empty ----------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is empty
|
|
|
|
|
/// \brief Check if type \f$T\f$ is empty
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \details Checks if \f$T\f$
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_empty : bool_constant<FENNEC_BUILTIN_IS_EMPTY(T)> {};
|
|
|
|
|
|
|
|
|
|
@@ -954,9 +954,9 @@ template<typename T> constexpr bool_t is_empty_v = is_empty<T>{};
|
|
|
|
|
// fennec::is_polymorphic ----------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is polymorphic
|
|
|
|
|
/// \brief Check if type \f$T\f$ is polymorphic
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \details Checks if \f$T\f$
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_polymorphic : bool_constant<FENNEC_BUILTIN_IS_POLYMORPHIC(T)> {};
|
|
|
|
|
|
|
|
|
|
@@ -970,9 +970,9 @@ template<typename T> constexpr bool_t is_polymorphic_v = is_polymorphic<T>{};
|
|
|
|
|
// fennec::is_abstract -------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is abstract
|
|
|
|
|
/// \brief Check if type \f$T\f$ is abstract
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \details Checks if \f$T\f$
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_abstract : bool_constant<FENNEC_BUILTIN_IS_ABSTRACT(T)> {};
|
|
|
|
|
|
|
|
|
|
@@ -986,9 +986,9 @@ template<typename T> constexpr bool_t is_abstract_v = is_abstract<T>{};
|
|
|
|
|
// fennec::is_complete -------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is complete
|
|
|
|
|
/// \brief Check if type \f$T\f$ is complete
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \details Checks if \f$T\f$
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_complete : detail::_is_complete<T>::type {};
|
|
|
|
|
|
|
|
|
|
@@ -1002,9 +1002,9 @@ template<typename T> constexpr bool_t is_complete_v = is_complete<T>{};
|
|
|
|
|
// fennec::is_final -------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is final
|
|
|
|
|
/// \brief Check if type \f$T\f$ is final
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \details Checks if \f$T\f$
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_final : bool_constant<FENNEC_BUILTIN_IS_FINAL(T)> {};
|
|
|
|
|
|
|
|
|
|
@@ -1018,9 +1018,9 @@ template<typename T> constexpr bool_t is_final_v = is_final<T>{};
|
|
|
|
|
// fennec::is_aggregate -------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is aggregate
|
|
|
|
|
/// \brief Check if type \f$T\f$ is aggregate
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \details Checks if \f$T\f$
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_aggregate : bool_constant<FENNEC_BUILTIN_IS_AGGREGATE(T)> {};
|
|
|
|
|
|
|
|
|
|
@@ -1037,7 +1037,7 @@ template<typename T> constexpr bool_t is_aggregate_v = is_aggregate<T>{};
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is of a signed integral
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if type `T` is a signed type i.e. `T(-1) < T(0)` and stores it in `is_same::value`.
|
|
|
|
|
/// \details Checks if type \f$T\f$ is a signed type i.e. `T(-1) < T(0)` and stores it in `is_same::value`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_signed
|
|
|
|
|
: detail::_is_signed<remove_cvref_t<T>> {};
|
|
|
|
|
@@ -1055,7 +1055,7 @@ template<typename T> constexpr bool_t is_signed_v = is_signed<T>::value;
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is of an unsigned integral
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if type `T` is an unsigned type i.e. `T(-1) > T(0)` and stores it in `is_same::value`.
|
|
|
|
|
/// \details Checks if type \f$T\f$ is an unsigned type i.e. `T(-1) > T(0)` and stores it in `is_same::value`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_unsigned
|
|
|
|
|
: detail::_is_unsigned<remove_cvref_t<T>> {};
|
|
|
|
|
@@ -1172,9 +1172,9 @@ template<typename T> constexpr bool_t is_scoped_enum_v = is_scoped_enum<T>::valu
|
|
|
|
|
// fennec::is_convertible ----------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T0` can be converted `T1`
|
|
|
|
|
/// \brief Check if type \f$T0\f$ can be converted \f$T1\f$
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `TypeT0`
|
|
|
|
|
/// \details Checks if \f$TypeT0\f$
|
|
|
|
|
/// \tparam FromT First type
|
|
|
|
|
/// \tparam ToT Second type
|
|
|
|
|
template<typename FromT, typename ToT> struct is_convertible
|
|
|
|
|
@@ -1191,8 +1191,8 @@ template<typename FromT, typename ToT> constexpr bool_t is_convertible_v = is_co
|
|
|
|
|
// fennec::is_constructible --------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` can be constructed with `ArgsT,` i.e. `ClassT(ArgsT...)`.
|
|
|
|
|
/// This may be read as "is `ClassT` constructible with `ArgsT`"
|
|
|
|
|
/// \brief Check if \f$ClassT\f$ can be constructed with `ArgsT,` i.e. `ClassT(ArgsT...)`.
|
|
|
|
|
/// This may be read as "is \f$ClassT\f$ constructible with \f$ArgsT\f$"
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
/// \tparam ArgsT The arguments for the specific constructor
|
|
|
|
|
template<typename ClassT, typename...ArgsT> struct is_constructible
|
|
|
|
|
@@ -1207,7 +1207,7 @@ template<typename ClassT, typename...ArgsT> constexpr bool_t is_constructible_v
|
|
|
|
|
// fennec::is_trivially_constructible ----------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is trivially constructible
|
|
|
|
|
/// \brief Check if \f$ClassT\f$ is trivially constructible
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
/// \tparam ArgsT The arguments for the specific constructor
|
|
|
|
|
template<typename ClassT, typename...ArgsT> struct is_trivially_constructible
|
|
|
|
|
@@ -1222,7 +1222,7 @@ template<typename ClassT> constexpr bool_t is_trivially_constructible_v = is_tri
|
|
|
|
|
// fennec::is_nothrow_constructible ------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is nothrow constructible
|
|
|
|
|
/// \brief Check if \f$ClassT\f$ is nothrow constructible
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
/// \tparam ArgsT The arguments for the specific constructor
|
|
|
|
|
template<typename ClassT, typename...ArgsT> struct is_nothrow_constructible
|
|
|
|
|
@@ -1237,7 +1237,7 @@ template<typename ClassT> constexpr bool_t is_nothrow_constructible_v = is_nothr
|
|
|
|
|
// fennec::is_default_constructible ------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is default constructible
|
|
|
|
|
/// \brief Check if \f$ClassT\f$ is default constructible
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
template<typename ClassT> struct is_default_constructible
|
|
|
|
|
: bool_constant<FENNEC_BUILTIN_IS_CONSTRUCTIBLE(ClassT)> {};
|
|
|
|
|
@@ -1251,7 +1251,7 @@ template<typename ClassT> constexpr bool_t is_default_constructible_v = is_defau
|
|
|
|
|
// fennec::is_trivially_default_constructible --------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is trivially default constructible
|
|
|
|
|
/// \brief Check if \f$ClassT\f$ is trivially default constructible
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
template<typename ClassT> struct is_trivially_default_constructible
|
|
|
|
|
: bool_constant<FENNEC_BUILTIN_IS_TRIVIALLY_CONSTRUCTIBLE(ClassT)> {};
|
|
|
|
|
@@ -1265,7 +1265,7 @@ template<typename ClassT> constexpr bool_t is_trivially_default_constructible_v
|
|
|
|
|
// fennec::is_nothrow_default_constructible --------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is nothrow default constructible
|
|
|
|
|
/// \brief Check if \f$ClassT\f$ is nothrow default constructible
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
template<typename ClassT> struct is_nothrow_default_constructible
|
|
|
|
|
: bool_constant<FENNEC_BUILTIN_IS_NOTHROW_CONSTRUCTIBLE(ClassT)> {};
|
|
|
|
|
@@ -1279,7 +1279,7 @@ template<typename ClassT> constexpr bool_t is_nothrow_default_constructible_v =
|
|
|
|
|
// fennec::is_copy_constructible ---------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is copy constructible
|
|
|
|
|
/// \brief Check if \f$ClassT\f$ is copy constructible
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
template<typename ClassT> struct is_copy_constructible
|
|
|
|
|
: bool_constant<FENNEC_BUILTIN_IS_CONSTRUCTIBLE(ClassT, add_lvalue_reference_t<const ClassT>)> {};
|
|
|
|
|
@@ -1293,7 +1293,7 @@ template<typename ClassT, typename...ArgsT> constexpr bool_t is_copy_constructib
|
|
|
|
|
// fennec::is_trivially_copy_constructible -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is trivially copy constructible
|
|
|
|
|
/// \brief Check if \f$ClassT\f$ is trivially copy constructible
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
template<typename ClassT> struct is_trivially_copy_constructible
|
|
|
|
|
: bool_constant<FENNEC_BUILTIN_IS_CONSTRUCTIBLE(ClassT, add_lvalue_reference_t<const ClassT>)> {};
|
|
|
|
|
@@ -1307,7 +1307,7 @@ template<typename ClassT> struct is_trivially_copy_constructible
|
|
|
|
|
// fennec::is_nothrow_copy_constructible -------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is nothrow copy constructible
|
|
|
|
|
/// \brief Check if \f$ClassT\f$ is nothrow copy constructible
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
template<typename ClassT> struct is_nothrow_copy_constructible
|
|
|
|
|
: bool_constant<FENNEC_BUILTIN_IS_CONSTRUCTIBLE(ClassT, add_lvalue_reference_t<const ClassT>)> {};
|
|
|
|
|
@@ -1321,7 +1321,7 @@ template<typename ClassT, typename...ArgsT> constexpr bool_t is_nothrow_copy_con
|
|
|
|
|
// fennec::is_move_constructible ---------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is move constructible
|
|
|
|
|
/// \brief Check if \f$ClassT\f$ is move constructible
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
template<typename ClassT> struct is_move_constructible
|
|
|
|
|
: bool_constant<FENNEC_BUILTIN_IS_CONSTRUCTIBLE(ClassT, add_rvalue_reference_t<ClassT>)> {};
|
|
|
|
|
@@ -1335,7 +1335,7 @@ template<typename ClassT, typename...ArgsT> constexpr bool_t is_move_constructib
|
|
|
|
|
// fennec::is_trivially_move_constructible -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is trivially move constructible
|
|
|
|
|
/// \brief Check if \f$ClassT\f$ is trivially move constructible
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
template<typename ClassT> struct is_trivially_move_constructible
|
|
|
|
|
: bool_constant<FENNEC_BUILTIN_IS_CONSTRUCTIBLE(ClassT, add_lvalue_reference_t<const ClassT>)> {};
|
|
|
|
|
@@ -1349,7 +1349,7 @@ template<typename ClassT> struct is_trivially_move_constructible
|
|
|
|
|
// fennec::is_nothrow_move_constructible -------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is nothrow move constructible
|
|
|
|
|
/// \brief Check if \f$ClassT\f$ is nothrow move constructible
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
template<typename ClassT> struct is_nothrow_move_constructible
|
|
|
|
|
: bool_constant<FENNEC_BUILTIN_IS_CONSTRUCTIBLE(ClassT, add_lvalue_reference_t<const ClassT>)> {};
|
|
|
|
|
@@ -1363,7 +1363,7 @@ template<typename ClassT, typename...ArgsT> constexpr bool_t is_nothrow_move_con
|
|
|
|
|
// fennec::is_assignable -----------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is assignable
|
|
|
|
|
/// \brief Check if \f$ClassT\f$ is assignable
|
|
|
|
|
/// \tparam ClassAT The class type to test
|
|
|
|
|
/// \tparam ClassBT The arguments for the specific constructor
|
|
|
|
|
template<typename ClassAT, typename ClassBT> struct is_assignable
|
|
|
|
|
@@ -1378,7 +1378,7 @@ template<typename ClassAT, typename ClassBT> constexpr bool_t is_assignable_v =
|
|
|
|
|
// fennec::is_trivially_assignable -------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is trivially assignable
|
|
|
|
|
/// \brief Check if \f$ClassT\f$ is trivially assignable
|
|
|
|
|
/// \tparam ClassAT The class type to test
|
|
|
|
|
/// \tparam ClassBT The arguments for the specific constructor
|
|
|
|
|
template<typename ClassAT, typename ClassBT> struct is_trivially_assignable
|
|
|
|
|
@@ -1394,7 +1394,7 @@ template<typename ClassAT, typename ClassBT> constexpr bool_t is_trivially_assig
|
|
|
|
|
// fennec::is_nothrow_assignable ---------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is nothrow assignable
|
|
|
|
|
/// \brief Check if \f$ClassT\f$ is nothrow assignable
|
|
|
|
|
/// \tparam ClassAT The class type to test
|
|
|
|
|
/// \tparam ClassBT The arguments for the specific constructor
|
|
|
|
|
template<typename ClassAT, typename ClassBT> struct is_nothrow_assignable
|
|
|
|
|
@@ -1409,7 +1409,7 @@ template<typename ClassAT, typename ClassBT> constexpr bool_t is_nothrow_assigna
|
|
|
|
|
// fennec::is_copy_assignable ------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is copy assignable
|
|
|
|
|
/// \brief Check if \f$ClassT\f$ is copy assignable
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
template<typename ClassT> struct is_copy_assignable
|
|
|
|
|
: bool_constant<FENNEC_BUILTIN_IS_ASSIGNABLE(add_lvalue_reference_t<ClassT>, add_lvalue_reference_t<const ClassT>)> {};
|
|
|
|
|
@@ -1423,7 +1423,7 @@ template<typename ClassT> constexpr bool_t is_copy_assignable_v = is_copy_assign
|
|
|
|
|
// fennec::is_trivially_copy_assignable --------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is trivially_copy assignable
|
|
|
|
|
/// \brief Check if \f$ClassT\f$ is trivially_copy assignable
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
template<typename ClassT> struct is_trivially_copy_assignable
|
|
|
|
|
: bool_constant<FENNEC_BUILTIN_IS_TRIVIALLY_ASSIGNABLE(add_lvalue_reference_t<ClassT>, add_lvalue_reference_t<const ClassT>)> {};
|
|
|
|
|
@@ -1437,7 +1437,7 @@ template<typename ClassT> constexpr bool_t is_trivially_copy_assignable_v = is_t
|
|
|
|
|
// fennec::is_nothrow_copy_assignable ----------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is nothrow_copy assignable
|
|
|
|
|
/// \brief Check if \f$ClassT\f$ is nothrow_copy assignable
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
template<typename ClassT> struct is_nothrow_copy_assignable
|
|
|
|
|
: bool_constant<FENNEC_BUILTIN_IS_NOTHROW_ASSIGNABLE(add_lvalue_reference_t<ClassT>, add_lvalue_reference_t<const ClassT>)> {};
|
|
|
|
|
@@ -1451,7 +1451,7 @@ template<typename ClassT> constexpr bool_t is_nothrow_copy_assignable_v = is_not
|
|
|
|
|
// fennec::is_move_assignable ------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is move assignable
|
|
|
|
|
/// \brief Check if \f$ClassT\f$ is move assignable
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
template<typename ClassT> struct is_move_assignable
|
|
|
|
|
: bool_constant<FENNEC_BUILTIN_IS_ASSIGNABLE(add_lvalue_reference_t<ClassT>, add_rvalue_reference_t<ClassT>)> {};
|
|
|
|
|
@@ -1465,7 +1465,7 @@ template<typename ClassT> constexpr bool_t is_move_assignable_v = is_move_assign
|
|
|
|
|
// fennec::is_trivially_move_assignable --------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is trivially_move assignable
|
|
|
|
|
/// \brief Check if \f$ClassT\f$ is trivially_move assignable
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
template<typename ClassT> struct is_trivially_move_assignable
|
|
|
|
|
: bool_constant<FENNEC_BUILTIN_IS_TRIVIALLY_ASSIGNABLE(add_lvalue_reference_t<ClassT>, add_rvalue_reference_t<ClassT>)> {};
|
|
|
|
|
@@ -1479,7 +1479,7 @@ template<typename ClassT> constexpr bool_t is_trivially_move_assignable_v = is_t
|
|
|
|
|
// fennec::is_nothrow_move_assignable --------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is nothrow_move assignable
|
|
|
|
|
/// \brief Check if \f$ClassT\f$ is nothrow_move assignable
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
template<typename ClassT> struct is_nothrow_move_assignable
|
|
|
|
|
: bool_constant<FENNEC_BUILTIN_IS_NOTHROW_ASSIGNABLE(add_lvalue_reference_t<ClassT>, add_rvalue_reference_t<ClassT>)> {};
|
|
|
|
|
@@ -1493,7 +1493,7 @@ template<typename ClassT> constexpr bool_t is_nothrow_move_assignable_v = is_not
|
|
|
|
|
// fennec::is_destructible ---------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is destructible
|
|
|
|
|
/// \brief Check if \f$ClassT\f$ is destructible
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
template<typename ClassT> struct is_destructible
|
|
|
|
|
: detail::_is_destructible<ClassT>::type {};
|
|
|
|
|
@@ -1507,7 +1507,7 @@ template<typename ClassT> constexpr bool_t is_destructible_v = is_destructible<C
|
|
|
|
|
// fennec::is_trivially_destructible -----------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is trivially destructible
|
|
|
|
|
/// \brief Check if \f$ClassT\f$ is trivially destructible
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
template<typename ClassT> struct is_trivially_destructible
|
|
|
|
|
: bool_constant<FENNEC_BUILTIN_IS_TRIVIALLY_DESTRUCTIBLE(ClassT)> {};
|
|
|
|
|
@@ -1521,7 +1521,7 @@ template<typename ClassT> constexpr bool_t is_trivially_destructible_v = is_triv
|
|
|
|
|
// fennec::is_nothrow_destructible -------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is nothrow destructible
|
|
|
|
|
/// \brief Check if \f$ClassT\f$ is nothrow destructible
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
template<typename ClassT> struct is_nothrow_destructible
|
|
|
|
|
: detail::_is_nothrow_destructible<ClassT>::type {};
|
|
|
|
|
@@ -1542,7 +1542,7 @@ template<typename ClassT> constexpr bool_t is_nothrow_destructible_v = is_nothro
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if the two types are identical
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T0` and `T1` are identical and store it in `is_same::value`
|
|
|
|
|
/// \details Checks if \f$T0\f$ and \f$T1\f$ are identical and store it in `is_same::value`
|
|
|
|
|
/// \tparam T0 first type to check
|
|
|
|
|
/// \tparam T1 second type to check
|
|
|
|
|
template<typename T0, typename T1> struct is_same : false_type {};
|
|
|
|
|
@@ -1561,9 +1561,9 @@ template<typename T0, typename T1> constexpr bool_t is_same_v = is_same<T0, T1>
|
|
|
|
|
// fennec::is_base_of --------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `Derived` has a base type of `Base`
|
|
|
|
|
/// \brief Check if \f$Derived\f$ has a base type of \f$Base\f$
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `Base` is a base type of `Derived` and stores it in `is_base_of::value`
|
|
|
|
|
/// \details Checks if \f$Base\f$ is a base type of \f$Derived\f$ and stores it in `is_base_of::value`
|
|
|
|
|
/// \tparam Base base type to check
|
|
|
|
|
/// \tparam Derived derived type to check
|
|
|
|
|
template<typename Base, typename Derived> struct is_base_of : bool_constant<
|
|
|
|
|
@@ -1581,9 +1581,9 @@ template<typename Base, typename Derived> constexpr bool_t is_base_of_v = is_bas
|
|
|
|
|
// fennec::is_iterable -------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is iterable
|
|
|
|
|
/// \brief Check if type \f$T\f$ is iterable
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \details Checks if \f$T\f$
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_iterable : decltype(detail::_is_iterable<T>(0)) {};
|
|
|
|
|
|
|
|
|
|
@@ -1597,9 +1597,9 @@ template<typename T> constexpr bool_t is_iterable_v = is_iterable<T>{};
|
|
|
|
|
// fennec::is_indexable ------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is indexable
|
|
|
|
|
/// \brief Check if type \f$T\f$ is indexable
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \details Checks if \f$T\f$
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_indexable : decltype(detail::_is_indexable<T>(0)) {};
|
|
|
|
|
|
|
|
|
|
@@ -1613,9 +1613,9 @@ template<typename T> constexpr bool_t is_indexable_v = is_indexable<T>{};
|
|
|
|
|
// fennec::is_mappable -------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is mappable
|
|
|
|
|
/// \brief Check if type \f$T\f$ is mappable
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \details Checks if \f$T\f$
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_mappable : decltype(detail::_is_mappable<T>(0)) {};
|
|
|
|
|
|
|
|
|
|
|