Type traits changed to variable templates

This commit is contained in:
Mateusz Pusz
2018-11-10 17:09:11 -08:00
parent 4e74617e2a
commit 94fd74000c
6 changed files with 31 additions and 49 deletions
+3 -4
View File
@@ -49,8 +49,7 @@ namespace {
namespace units {
template<typename T>
struct treat_as_floating_point<my_value<T>> : std::is_floating_point<T> {
};
inline constexpr bool treat_as_floating_point<my_value<T>> = std::is_floating_point_v<T>;
template<typename T>
struct quantity_values<my_value<T>> {
@@ -248,9 +247,9 @@ namespace {
static_assert(1000_m >= 1_km);
static_assert(1000_m <= 1_km);
// is_quantity
// is_quantity
static_assert(units::detail::is_quantity<length<millimeter, int>>::value);
static_assert(Quantity<length<millimeter, int>>);
// common_type