Type traits changed to variable templates
This commit is contained in:
1 parent
4e74617e2a
commit
94fd74000c
6 files changed
+31
-49
No files matched your search
@@ -77,17 +77,15 @@ namespace units {
|
||||
namespace detail {
|
||||
|
||||
template<typename T>
|
||||
struct is_ratio : std::false_type {
|
||||
};
|
||||
inline constexpr bool is_ratio = false;
|
||||
|
||||
template<intmax_t Num, intmax_t Den>
|
||||
struct is_ratio<std::ratio<Num, Den>> : std::true_type {
|
||||
};
|
||||
inline constexpr bool is_ratio<std::ratio<Num, Den>> = true;
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template<typename T>
|
||||
concept bool Ratio = detail::is_ratio<T>::value;
|
||||
concept bool Ratio = detail::is_ratio<T>;
|
||||
|
||||
// common_ratio
|
||||
|
||||
|
||||
@@ -30,17 +30,15 @@ namespace mp {
|
||||
namespace detail {
|
||||
|
||||
template<typename T>
|
||||
struct is_type_list : std::false_type {
|
||||
};
|
||||
inline constexpr bool is_type_list = false;
|
||||
|
||||
template<template<typename...> typename T, typename... Types>
|
||||
struct is_type_list<T<Types...>> : std::true_type {
|
||||
};
|
||||
inline constexpr bool is_type_list<T<Types...>> = true;
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template<typename T>
|
||||
concept bool TypeList = detail::is_type_list<T>::value;
|
||||
concept bool TypeList = detail::is_type_list<T>;
|
||||
|
||||
// push_front
|
||||
|
||||
|
||||
Reference in new issue
Block a user