|
- #pragma once
-
- #define cppmp_define_checker(name) \
- template<typename... T> \
- struct name \
- : public integral_constant<decltype(std::name<T...>::value), std::name<T...>::value> \
- { }; \
- \
- template<typename... T> \
- constexpr decltype(auto) name ## _v = name<T...>::value;
-
- #include "types.h"
-
- namespace cppmp
- {
-
- /**
- * @brief Evaluates to true_t if the passed template parameters are valid, false_t otherwise.
- */
- template<typename...>
- struct is_valid;
-
- /**
- * @brief Is true if the passed template parameters are valid, false otherwise.
- */
- template<typename... T>
- constexpr decltype(auto) is_valid_v = is_valid<T...>::value;
-
- /**
- * @brief Evaluates to true_t if T is a specialization if T_template, false_t otherwise.
- */
- template<typename T, template <typename...> class T_template>
- struct is_specialization_of;
-
- /**
- * @brief Evaluates to true if T is a specialization if T_template, false otherwise.
- */
- template<typename T, template <typename...> class T_template>
- constexpr decltype(auto) is_specialization_of_v = is_specialization_of<T, T_template>::value;
-
- /**
- * @brief Evaluates to true_t if all passed parameters are true, false_t otherwise.
- */
- template<bool... B>
- struct is_true;
-
- /**
- * @brief Evaluates to true if all passed parameters are true, false otherwise.
- */
- template<bool... B>
- constexpr decltype(auto) is_true_v = is_true<B...>::value;
-
- cppmp_define_checker(is_void);
- cppmp_define_checker(is_null_pointer);
- cppmp_define_checker(is_integral);
- cppmp_define_checker(is_floating_point);
- cppmp_define_checker(is_array);
- cppmp_define_checker(is_enum);
- cppmp_define_checker(is_union);
- cppmp_define_checker(is_class);
- cppmp_define_checker(is_function);
- cppmp_define_checker(is_pointer);
- cppmp_define_checker(is_lvalue_reference);
- cppmp_define_checker(is_rvalue_reference);
- cppmp_define_checker(is_member_object_pointer);
- cppmp_define_checker(is_member_function_pointer);
- cppmp_define_checker(is_fundamental);
- cppmp_define_checker(is_arithmetic);
- cppmp_define_checker(is_scalar);
- cppmp_define_checker(is_object);
- cppmp_define_checker(is_compound);
- cppmp_define_checker(is_reference);
- cppmp_define_checker(is_member_pointer);
- cppmp_define_checker(is_const);
- cppmp_define_checker(is_volatile);
- cppmp_define_checker(is_trivial);
- cppmp_define_checker(is_trivially_copyable);
- cppmp_define_checker(is_standard_layout);
- cppmp_define_checker(is_pod);
- cppmp_define_checker(is_literal_type);
- cppmp_define_checker(is_empty);
- cppmp_define_checker(is_polymorphic);
- cppmp_define_checker(is_abstract);
- cppmp_define_checker(is_final);
- cppmp_define_checker(is_signed);
- cppmp_define_checker(is_unsigned);
- cppmp_define_checker(is_constructible);
- cppmp_define_checker(is_trivially_constructible);
- cppmp_define_checker(is_nothrow_constructible);
- cppmp_define_checker(is_default_constructible);
- cppmp_define_checker(is_trivially_default_constructible);
- cppmp_define_checker(is_nothrow_default_constructible);
- cppmp_define_checker(is_copy_constructible);
- cppmp_define_checker(is_trivially_copy_constructible);
- cppmp_define_checker(is_nothrow_copy_constructible);
- cppmp_define_checker(is_move_constructible);
- cppmp_define_checker(is_trivially_move_constructible);
- cppmp_define_checker(is_nothrow_move_constructible);
- cppmp_define_checker(is_assignable);
- cppmp_define_checker(is_trivially_assignable);
- cppmp_define_checker(is_nothrow_assignable);
- cppmp_define_checker(is_copy_assignable);
- cppmp_define_checker(is_trivially_copy_assignable);
- cppmp_define_checker(is_nothrow_copy_assignable);
- cppmp_define_checker(is_move_assignable);
- cppmp_define_checker(is_trivially_move_assignable);
- cppmp_define_checker(is_nothrow_move_assignable);
- cppmp_define_checker(is_destructible);
- cppmp_define_checker(is_trivially_destructible);
- cppmp_define_checker(is_nothrow_destructible);
- cppmp_define_checker(has_virtual_destructor);
- cppmp_define_checker(is_swappable_with);
- cppmp_define_checker(is_swappable);
- cppmp_define_checker(is_nothrow_swappable_with);
- cppmp_define_checker(is_nothrow_swappable);
- cppmp_define_checker(alignment_of);
- cppmp_define_checker(rank);
- cppmp_define_checker(extent);
- cppmp_define_checker(is_same);
- cppmp_define_checker(is_base_of);
- cppmp_define_checker(is_convertible);
-
- #if __cplusplus >= 201703L
- cppmp_define_checker(has_unique_object_representations);
- cppmp_define_checker(is_aggregate);
- cppmp_define_checker(is_invocable);
- cppmp_define_checker(is_invocable_r);
- cppmp_define_checker(is_nothrow_invocable);
- cppmp_define_checker(is_nothrow_invocable_r);
- #endif
-
- }
-
- #undef cppmp_define_checker
-
- #include "checker.inl"
|