|
|
|
|
@@ -147,18 +147,18 @@
|
|
|
|
|
/// <th style="vertical-align: top">Description
|
|
|
|
|
///
|
|
|
|
|
/// <tr><td width="50%" style="vertical-align: top"> <br>
|
|
|
|
|
/// \ref fennec::is_fundamental "is_fundamental<TypeT>::value"<br>
|
|
|
|
|
/// \ref fennec::is_fundamental_v "is_fundamental_v<TypeT>"
|
|
|
|
|
/// <td width="50%" style="vertical-align: top">
|
|
|
|
|
/// \copydetails fennec::is_fundamental
|
|
|
|
|
///
|
|
|
|
|
/// <tr><td width="50%" style="vertical-align: top"> <br>
|
|
|
|
|
/// \ref fennec::is_arithmetic "is_arithmetic<TypeT>::value"<br>
|
|
|
|
|
/// \ref fennec::is_arithmetic_v "is_arithmetic_v<TypeT>"
|
|
|
|
|
/// <td width="50%" style="vertical-align: top">
|
|
|
|
|
/// \copydetails fennec::is_arithmetic
|
|
|
|
|
///
|
|
|
|
|
/// <tr><td width="50%" style="vertical-align: top"> <br>
|
|
|
|
|
/// \ref fennec::is_fundamental "is_fundamental<TypeT>::value"<br>
|
|
|
|
|
/// \ref fennec::is_fundamental_v "is_fundamental_v<TypeT>"
|
|
|
|
|
/// <td width="50%" style="vertical-align: top">
|
|
|
|
|
/// \copydetails fennec::is_fundamental
|
|
|
|
|
///
|
|
|
|
|
/// <tr><td width="50%" style="vertical-align: top"> <br>
|
|
|
|
|
/// \ref fennec::is_scalar "is_scalar<TypeT>::value"<br>
|
|
|
|
|
/// \ref fennec::is_scalar_v "is_scalar_v<TypeT>"
|
|
|
|
|
/// <td width="50%" style="vertical-align: top">
|
|
|
|
|
@@ -271,12 +271,6 @@
|
|
|
|
|
/// \copydetails fennec::is_aggregate
|
|
|
|
|
///
|
|
|
|
|
/// <tr><td width="50%" style="vertical-align: top"> <br>
|
|
|
|
|
/// \ref fennec::is_implicit_lifetime "is_implicit_lifetime<TypeT>::value"<br>
|
|
|
|
|
/// \ref fennec::is_implicit_lifetime_v "is_implicit_lifetime_v<TypeT>"
|
|
|
|
|
/// <td width="50%" style="vertical-align: top">
|
|
|
|
|
/// \copydetails fennec::is_implicit_lifetime
|
|
|
|
|
///
|
|
|
|
|
/// <tr><td width="50%" style="vertical-align: top"> <br>
|
|
|
|
|
/// \ref fennec::is_signed "is_signed<TypeT>::value"<br>
|
|
|
|
|
/// \ref fennec::is_signed_v "is_signed_v<TypeT>"
|
|
|
|
|
/// <td width="50%" style="vertical-align: top">
|
|
|
|
|
@@ -451,7 +445,7 @@ constexpr inline bool is_constant_evaluated() noexcept {
|
|
|
|
|
/// \details Stores a boolean value in `is_void::value`, representing whether the provided type is of base type void.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_void
|
|
|
|
|
: detail::_is_void<remove_cvr_t<T>>{};
|
|
|
|
|
: detail::_is_void<remove_cvref_t<T>>{};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_void<T>::value```
|
|
|
|
|
@@ -468,7 +462,7 @@ template<typename T> constexpr bool_t is_void_v = is_void<T>::value;
|
|
|
|
|
/// \details Stores a boolean value in `is_null_pointer::value`, representing whether the provided type is of base type nullptr_t.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_null_pointer
|
|
|
|
|
: detail::_is_null_pointer<remove_cvr_t<T>>{};
|
|
|
|
|
: detail::_is_null_pointer<remove_cvref_t<T>>{};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_null_pointer<T>::value```
|
|
|
|
|
@@ -477,6 +471,57 @@ template<typename T> constexpr bool_t is_null_pointer_v = is_null_pointer<T>::va
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_bool =====================================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is of type bool
|
|
|
|
|
///
|
|
|
|
|
/// \details Stores a boolean value in `is_bool::value`, representing whether the provided type is of base type bool.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_bool
|
|
|
|
|
: detail::_is_bool<remove_cvref_t<T>>{};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_bool<T>::value```
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_bool_v = is_bool<T>::value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_integral =================================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is of an integral
|
|
|
|
|
///
|
|
|
|
|
/// \details Stores a boolean value in `is_integral::value`, representing whether the provided type is of a base integer type.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_integral
|
|
|
|
|
: detail::_is_integral<remove_cvref_t<T>> {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_integral<T>::value```
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_integral_v = is_integral<T>::value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_floating_point ===========================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is of a floating point type
|
|
|
|
|
///
|
|
|
|
|
/// \details Stores a boolean value in `is_floating_point::value`, representing whether the provided type is of a base floating point type.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_floating_point
|
|
|
|
|
: detail::_is_floating_point<remove_cvref_t<T>>{};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_floating_point<T>::value```
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_floating_point_v = is_floating_point<T> {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_array ====================================================================================================
|
|
|
|
|
|
|
|
|
|
#ifdef FENNEC_BUILTIN_IS_ARRAY
|
|
|
|
|
@@ -557,7 +602,7 @@ template<typename T> constexpr size_t is_class_v = is_class<T>::value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_function ====================================================================================================
|
|
|
|
|
// fennec::is_function =================================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is a class
|
|
|
|
|
@@ -572,41 +617,363 @@ template<typename T> constexpr size_t is_function_v = is_function<T>::value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Integral Types ======================================================================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_bool =====================================================================================================
|
|
|
|
|
// fennec::is_pointer ==================================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is of type bool
|
|
|
|
|
/// \brief Check if \p T is of a pointer type
|
|
|
|
|
///
|
|
|
|
|
/// \details Stores a boolean value in `is_bool::value`, representing whether the provided type is of base type bool.
|
|
|
|
|
/// \details Stores a boolean value in `is_pointer::value`, representing whether the provided type is of a base pointer type.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_bool
|
|
|
|
|
: detail::_is_bool<remove_cvr_t<T>>{};
|
|
|
|
|
template<typename T> struct is_pointer
|
|
|
|
|
: detail::_is_pointer<remove_cvref_t<T>>{};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_bool<T>::value```
|
|
|
|
|
/// \brief Shorthand for ```is_pointer<T>::value```
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_bool_v = is_bool<T>::value;
|
|
|
|
|
template<typename T> constexpr bool_t is_pointer_v = is_pointer<T> {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_integral =================================================================================================
|
|
|
|
|
// fennec::is_lvalue_reference =========================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is of an integral
|
|
|
|
|
/// \brief Check if \p T is of a floating point type
|
|
|
|
|
///
|
|
|
|
|
/// \details Stores a boolean value in `is_integral::value`, representing whether the provided type is of a base integer type.
|
|
|
|
|
/// \details Checks if type `T` is a floating point type and store it in `is_same::value`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_integral
|
|
|
|
|
: detail::_is_integral<remove_cvr_t<T>> {};
|
|
|
|
|
template<typename T> struct is_lvalue_reference
|
|
|
|
|
: detail::_is_lvalue_reference<T>{};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_integral<T>::value```
|
|
|
|
|
/// \brief Shorthand for ```is_floating_point<T>::value```
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_integral_v = is_integral<T>::value;
|
|
|
|
|
template<typename T> constexpr bool_t is_lvalue_reference_v = is_lvalue_reference<T> {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_rvalue_reference =========================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \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`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_rvalue_reference
|
|
|
|
|
: detail::_is_rvalue_reference<T>{};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_floating_point<T>::value```
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_rvalue_reference_v = is_rvalue_reference<T> {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_member_function_pointer ==================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \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`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_member_function_pointer
|
|
|
|
|
: bool_constant<FENNEC_BUILTIN_IS_MEMBER_FUNCTION_POINTER(T)> {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_member_function_pointer<T>::value```
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_member_function_pointer_v = is_member_function_pointer<T> {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_member_object_pointer ====================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \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`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_member_object_pointer
|
|
|
|
|
: bool_constant<FENNEC_BUILTIN_IS_MEMBER_OBJECT_POINTER(T)> {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_member_object_pointer<T>::value```
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_member_object_pointer_v = is_member_object_pointer<T> {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_arithmetic ===============================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \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`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_arithmetic
|
|
|
|
|
: bool_constant<is_integral_v<T> or is_floating_point_v<T>>{};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_arithmetic<T>::value```
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_arithmetic_v = is_arithmetic<T>::value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_fundamental ==============================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is a fundamental type, i.e. arithmetic, void, or nullptr_t
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_fundamental
|
|
|
|
|
: bool_constant<is_arithmetic_v<T> or is_void_v<T> or is_null_pointer_v<T>>{};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_fundamental<T>::value```
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_fundamental_v = is_fundamental<T>::value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_scalar ===================================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \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`.
|
|
|
|
|
/// \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>>{};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_scalar<T>::value```
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_scalar_v = is_scalar<T>::value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_object ===================================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is an object
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if type `T` is an object and store it in `is_same::value`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_object : bool_constant<FENNEC_BUILTIN_IS_OBJECT(T)> {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_object<T>::value```
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_object_v = is_object<T>::value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_compound =================================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is a object compound type
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if type `T` is an object and store it in `is_same::value`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_compound : bool_constant<not is_fundamental_v<T>> {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_compound<T>::value```
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_compound_v = is_compound<T>::value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_reference ================================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \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`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_reference
|
|
|
|
|
: detail::_is_reference<T>{};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_floating_point<T>::value```
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_reference_v = is_reference<T> {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_member_pointer ===========================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \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`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_member_pointer
|
|
|
|
|
: bool_constant<FENNEC_BUILTIN_IS_MEMBER_POINTER(T)> {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_member_function_pointer<T>::value```
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_member_pointer_v = is_member_pointer<T> {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_trivial ==================================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is trivial
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_trivial : bool_constant<FENNEC_BUILTIN_IS_TRIVIAL(T)> {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for `is_trivial<T>::value`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_trivial_v = is_trivial<T>{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_trivially_copyable =======================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is trivially_copyable
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_trivially_copyable : bool_constant<FENNEC_BUILTIN_IS_TRIVIALLY_COPYABLE(T)> {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for `is_trivially_copyable<T>::value`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_trivially_copyable_v = is_trivially_copyable<T>{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_standard_layout ==========================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is standard_layout
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_standard_layout : bool_constant<FENNEC_BUILTIN_IS_STANDARD_LAYOUT(T)> {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for `is_standard_layout<T>::value`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_standard_layout_v = is_standard_layout<T>{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::has_unique_object_representations ===========================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` has unique object representations
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \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>)> {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for `has_unique_object_representations<T>::value`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t has_unique_object_representations_v = has_unique_object_representations<T>{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_empty ====================================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is empty
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_empty : bool_constant<FENNEC_BUILTIN_IS_EMPTY(T)> {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for `is_empty<T>::value`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_empty_v = is_empty<T>{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_polymorphic ==============================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is polymorphic
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_polymorphic : bool_constant<FENNEC_BUILTIN_IS_POLYMORPHIC(T)> {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for `is_polymorphic<T>::value`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_polymorphic_v = is_polymorphic<T>{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_abstract =================================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is abstract
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_abstract : bool_constant<FENNEC_BUILTIN_IS_ABSTRACT(T)> {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for `is_abstract<T>::value`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_abstract_v = is_abstract<T>{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_complete =================================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is complete
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_complete : detail::_is_complete<T>::type {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for `is_complete<T>::value`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_complete_v = is_complete<T>{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_final =================================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is final
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_final : bool_constant<FENNEC_BUILTIN_IS_FINAL(T)> {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for `is_final<T>::value`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_final_v = is_final<T>{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_aggregate =================================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is aggregate
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_aggregate : bool_constant<FENNEC_BUILTIN_IS_AGGREGATE(T)> {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for `is_aggregate<T>::value`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_aggregate_v = is_aggregate<T>{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -619,7 +986,7 @@ template<typename T> constexpr bool_t is_integral_v = is_integral<T>::value;
|
|
|
|
|
/// \details Checks if type `T` 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_cvr_t<T>> {};
|
|
|
|
|
: detail::_is_signed<remove_cvref_t<T>> {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_signed<T>::value```
|
|
|
|
|
@@ -637,138 +1004,12 @@ template<typename T> constexpr bool_t is_signed_v = is_signed<T>::value;
|
|
|
|
|
/// \details Checks if type `T` 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_cvr_t<T>> {};
|
|
|
|
|
: detail::_is_unsigned<remove_cvref_t<T>> {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_unsigned<T>::value```
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_unsigned_v = is_unsigned<T>::value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Floating Point Types ================================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is of a floating point type
|
|
|
|
|
///
|
|
|
|
|
/// \details Stores a boolean value in `is_floating_point::value`, representing whether the provided type is of a base floating point type.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_floating_point
|
|
|
|
|
: detail::_is_floating_point<remove_cvr_t<T>>{};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_floating_point<T>::value```
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_floating_point_v = is_floating_point<T> {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Pointer Types =======================================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is of a pointer type
|
|
|
|
|
///
|
|
|
|
|
/// \details Stores a boolean value in `is_pointer::value`, representing whether the provided type is of a base pointer type.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_pointer
|
|
|
|
|
: detail::_is_pointer<remove_cvr_t<T>>{};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_pointer<T>::value```
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_pointer_v = is_pointer<T> {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Reference Types =======================================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \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`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_reference
|
|
|
|
|
: detail::_is_reference<T>{};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_floating_point<T>::value```
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_reference_v = is_reference<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`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_lvalue_reference
|
|
|
|
|
: detail::_is_lvalue_reference<T>{};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_floating_point<T>::value```
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_lvalue_reference_v = is_lvalue_reference<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`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_rvalue_reference
|
|
|
|
|
: detail::_is_rvalue_reference<T>{};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_floating_point<T>::value```
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_rvalue_reference_v = is_rvalue_reference<T> {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Arithmetic Types ====================================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \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`.
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_arithmetic
|
|
|
|
|
: bool_constant<is_integral_v<T> or is_floating_point_v<T>>{};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_arithmetic<T>::value```
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_arithmetic_v = is_arithmetic<T>::value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Arithmetic Types ====================================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \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`.
|
|
|
|
|
/// \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>>{};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_scalar<T>::value```
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_scalar_v = is_scalar<T>::value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_fundamental ==============================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if \p T is a fundamental type, i.e. arithmetic, void, or nullptr_t
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_fundamental
|
|
|
|
|
: bool_constant<is_arithmetic_v<T> || is_void_v<T> || is_null_pointer_v<T>>{};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for ```is_fundamental<T>::value```
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_fundamental_v = is_fundamental<T>::value;
|
|
|
|
|
template<typename T> constexpr bool_t is_unsigned_v = is_unsigned<T>::value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_same =====================================================================================================
|
|
|
|
|
@@ -791,7 +1032,7 @@ template<typename T> struct is_same<T, T> : true_type {};
|
|
|
|
|
template<typename T0, typename T1> constexpr bool_t is_same_v = is_same<T0, T1> {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_base_of =====================================================================================================
|
|
|
|
|
// fennec::is_base_of ==================================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `Derived` has a base type of `Base`
|
|
|
|
|
@@ -809,61 +1050,7 @@ template<typename Base, typename Derived> struct is_base_of : bool_constant<
|
|
|
|
|
/// \tparam Derived derived type to check
|
|
|
|
|
template<typename Base, typename Derived> constexpr bool_t is_base_of_v = is_base_of<Base, Derived> {};
|
|
|
|
|
|
|
|
|
|
// fennec::is_complete ==============================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is complete
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_complete : detail::_is_complete<T>::type {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for `is_complete<TypeT0, TypeT1>::value`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_complete_v = is_complete<T>{};
|
|
|
|
|
|
|
|
|
|
// fennec::is_iterable ==============================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is iterable
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_iterable : decltype(detail::_is_iterable<T>(0)) {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for `is_iterable<TypeT0, TypeT1>::value`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_iterable_v = is_iterable<T>{};
|
|
|
|
|
|
|
|
|
|
// fennec::is_indexable ==============================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is indexable
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_indexable : decltype(detail::_is_indexable<T>(0)) {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for `is_indexable<TypeT0, TypeT1>::value`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_indexable_v = is_indexable<T>{};
|
|
|
|
|
|
|
|
|
|
// fennec::is_mappable ==============================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is mappable
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_mappable : decltype(detail::_is_mappable<T>(0)) {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for `is_mappable<TypeT0, TypeT1>::value`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_mappable_v = is_mappable<T>{};
|
|
|
|
|
|
|
|
|
|
// fennec::is_convertible ==============================================================================================
|
|
|
|
|
|
|
|
|
|
@@ -883,6 +1070,7 @@ template<typename FromT, typename ToT> struct is_convertible
|
|
|
|
|
template<typename FromT, typename ToT> constexpr bool_t is_convertible_v = is_convertible<FromT, ToT>{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_constructible ============================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
@@ -899,6 +1087,8 @@ template<typename ClassT, typename...ArgsT> constexpr bool_t is_constructible_v
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_trivially_constructible ==================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is trivially constructible
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
@@ -911,6 +1101,8 @@ template<typename ClassT> constexpr bool_t is_trivially_constructible_v = is_tri
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_default_constructible ====================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is default constructible
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
@@ -923,6 +1115,8 @@ template<typename ClassT> constexpr bool_t is_default_constructible_v = is_defau
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_copy_constructible =======================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is copy constructible
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
@@ -935,8 +1129,10 @@ template<typename ClassT, typename...ArgsT> constexpr bool_t is_copy_constructib
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_move_constructible =======================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is copy constructible
|
|
|
|
|
/// \brief Check if `ClassT` 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>)> {};
|
|
|
|
|
@@ -946,42 +1142,6 @@ template<typename ClassT> struct is_move_constructible
|
|
|
|
|
template<typename ClassT, typename...ArgsT> constexpr bool_t is_move_constructible_v = is_move_constructible<ClassT>{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_destructible ===================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is destructible
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
template<typename ClassT> struct is_destructible
|
|
|
|
|
: detail::_is_destructible<ClassT>::type {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for `is_destructible<ClassT, ArgsT...>::value`
|
|
|
|
|
template<typename ClassT> constexpr bool_t is_destructible_v = is_destructible<ClassT>{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` 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)> {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for `is_trivially_destructible<ClassT, ArgsT...>::value`
|
|
|
|
|
template<typename ClassT> constexpr bool_t is_trivially_destructible_v = is_trivially_destructible<ClassT>{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is nothrow destructible
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
template<typename ClassT> struct is_nothrow_destructible
|
|
|
|
|
: detail::_is_nothrow_destructible<ClassT>::type {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for `is_nothrow_destructible<ClassT, ArgsT...>::value`
|
|
|
|
|
template<typename ClassT> constexpr bool_t is_nothrow_destructible_v = is_nothrow_destructible<ClassT>{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_assignable ===============================================================================================
|
|
|
|
|
|
|
|
|
|
@@ -998,6 +1158,7 @@ template<typename ClassAT, typename ClassBT> struct is_assignable
|
|
|
|
|
template<typename ClassT, typename...ArgsT> constexpr bool_t is_assignable_v = is_assignable<ClassT, ArgsT...>{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_copy_assignable ==========================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
@@ -1011,6 +1172,7 @@ template<typename ClassT> struct is_copy_assignable
|
|
|
|
|
template<typename ClassT> constexpr bool_t is_copy_assignable_v = is_copy_assignable<ClassT>{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_move_assignable ==========================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
@@ -1024,6 +1186,96 @@ template<typename ClassT> struct is_move_assignable
|
|
|
|
|
template<typename ClassT> constexpr bool_t is_move_assignable_v = is_move_assignable<ClassT>{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_destructible =============================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is destructible
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
template<typename ClassT> struct is_destructible
|
|
|
|
|
: detail::_is_destructible<ClassT>::type {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for `is_destructible<ClassT, ArgsT...>::value`
|
|
|
|
|
template<typename ClassT> constexpr bool_t is_destructible_v = is_destructible<ClassT>{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_trivially_destructible ===================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` 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)> {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for `is_trivially_destructible<ClassT, ArgsT...>::value`
|
|
|
|
|
template<typename ClassT> constexpr bool_t is_trivially_destructible_v = is_trivially_destructible<ClassT>{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_nothrow_destructible =====================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if `ClassT` is nothrow destructible
|
|
|
|
|
/// \tparam ClassT The class type to test
|
|
|
|
|
template<typename ClassT> struct is_nothrow_destructible
|
|
|
|
|
: detail::_is_nothrow_destructible<ClassT>::type {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for `is_nothrow_destructible<ClassT, ArgsT...>::value`
|
|
|
|
|
template<typename ClassT> constexpr bool_t is_nothrow_destructible_v = is_nothrow_destructible<ClassT>{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_iterable =================================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is iterable
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_iterable : decltype(detail::_is_iterable<T>(0)) {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for `is_iterable<TypeT0, TypeT1>::value`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_iterable_v = is_iterable<T>{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_indexable ================================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is indexable
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_indexable : decltype(detail::_is_indexable<T>(0)) {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for `is_indexable<TypeT0, TypeT1>::value`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_indexable_v = is_indexable<T>{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// fennec::is_mappable =================================================================================================
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Check if type `T` is mappable
|
|
|
|
|
///
|
|
|
|
|
/// \details Checks if `T`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> struct is_mappable : decltype(detail::_is_mappable<T>(0)) {};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
/// \brief Shorthand for `is_mappable<TypeT0, TypeT1>::value`
|
|
|
|
|
/// \tparam T type to check
|
|
|
|
|
template<typename T> constexpr bool_t is_mappable_v = is_mappable<T>{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif // FENNEC_LANG_TYPE_TRAITS_H
|
|
|
|
|
|