Small code cleanup

This commit is contained in:
Mateusz Pusz
2019-11-16 18:27:31 +01:00
parent 86d4252cca
commit 9c6229302d
4 changed files with 12 additions and 9 deletions
+1 -1
View File
@@ -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> &&
+1 -1
View File
@@ -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;
+3 -3
View File
@@ -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); }
};