forked from mpusz/mp-units
Concepts enabled for customization points
This commit is contained in:
@@ -27,7 +27,6 @@
|
||||
#include <units/bits/external/hacks.h>
|
||||
#include <units/bits/external/numeric_concepts.h>
|
||||
#include <units/bits/external/type_traits.h>
|
||||
#include <units/customization_points.h>
|
||||
|
||||
namespace units {
|
||||
|
||||
|
@@ -22,6 +22,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/concepts.h>
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
|
||||
@@ -36,7 +37,7 @@ namespace units {
|
||||
*
|
||||
* @tparam Rep a representation type for which a type trait is defined
|
||||
*/
|
||||
template<typename Rep>
|
||||
template<Scalar Rep>
|
||||
inline constexpr bool treat_as_floating_point = std::is_floating_point_v<Rep>;
|
||||
|
||||
/**
|
||||
@@ -48,7 +49,7 @@ inline constexpr bool treat_as_floating_point = std::is_floating_point_v<Rep>;
|
||||
*
|
||||
* @tparam Rep a representation type for which a type trait is defined
|
||||
*/
|
||||
template<typename Rep>
|
||||
template<Scalar Rep>
|
||||
struct quantity_values {
|
||||
static constexpr Rep zero() noexcept { return Rep(0); }
|
||||
static constexpr Rep one() noexcept { return Rep(1); }
|
||||
|
@@ -23,6 +23,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/concepts.h>
|
||||
#include <units/customization_points.h>
|
||||
#include <units/bits/dimension_op.h>
|
||||
#include <cassert>
|
||||
|
||||
|
Reference in New Issue
Block a user