forked from mpusz/mp-units
Small code cleanup
This commit is contained in:
@@ -32,7 +32,7 @@ namespace units {
|
||||
namespace detail {
|
||||
|
||||
template<typename T, typename U = T>
|
||||
concept basic_arithmetic = // exposition only
|
||||
concept basic_arithmetic = // exposition only
|
||||
std::magma<std::ranges::plus, T, U> &&
|
||||
std::magma<std::ranges::minus, T, U> &&
|
||||
std::magma<std::ranges::times, T, U> &&
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
namespace std {
|
||||
|
||||
// concepts
|
||||
using concepts::common_with;
|
||||
using concepts::common_reference_with;
|
||||
using concepts::common_with;
|
||||
using concepts::constructible_from;
|
||||
using concepts::convertible_to;
|
||||
using concepts::default_constructible;
|
||||
|
||||
@@ -265,7 +265,7 @@ namespace std {
|
||||
}
|
||||
|
||||
struct times {
|
||||
template<class T, detail::multiplicable_with <T> U>
|
||||
template<class T, detail::multiplicable_with<T> U>
|
||||
constexpr decltype(auto) operator()(T&& t, U&& u) const
|
||||
{ return std::forward<T>(t) * std::forward<U>(u); }
|
||||
|
||||
@@ -290,7 +290,7 @@ namespace std {
|
||||
}
|
||||
|
||||
struct divided_by {
|
||||
template<class T, detail::divisible_with <T> U>
|
||||
template<class T, detail::divisible_with<T> U>
|
||||
constexpr decltype(auto) operator()(T&& t, U&& u) const
|
||||
{ return std::forward<T>(t) / std::forward<U>(u); }
|
||||
};
|
||||
@@ -312,7 +312,7 @@ namespace std {
|
||||
}
|
||||
|
||||
struct modulus {
|
||||
template<class T, detail::modulo_with <T> U>
|
||||
template<class T, detail::modulo_with<T> U>
|
||||
constexpr decltype(auto) operator()(T&& t, U&& u) const
|
||||
{ return std::forward<T>(t) % std::forward<U>(u); }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user