From f83ba6eb39bb5117a5f3aee8e60e02d16445b890 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johel=20Ernesto=20Guerrero=20Pe=C3=B1a?= Date: Mon, 7 Sep 2020 23:28:02 -0400 Subject: [PATCH] refactor: remove indirection for further simplification --- src/include/units/concepts.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/include/units/concepts.h b/src/include/units/concepts.h index b165faec..45f64bea 100644 --- a/src/include/units/concepts.h +++ b/src/include/units/concepts.h @@ -85,10 +85,6 @@ namespace detail { template void to_base_scaled_unit(const volatile scaled_unit*); -template -// inline constexpr bool // TODO: Replace with concept when it works with MSVC -concept is_derived_from_scaled_unit = requires { to_base_scaled_unit(std::declval()); }; - } // namespace detail /** @@ -97,7 +93,7 @@ concept is_derived_from_scaled_unit = requires { to_base_scaled_unit(std::declva * Satisfied by all unit types derived from an specialization of :class:`scaled_unit`. */ template -concept Unit = detail::is_derived_from_scaled_unit; +concept Unit = requires { detail::to_base_scaled_unit(std::declval()); }; // BaseDimension template @@ -109,10 +105,6 @@ namespace detail { template void to_base_base_dimension(const volatile base_dimension*); -template -// inline constexpr bool // TODO: Replace with concept when it works with MSVC -concept is_derived_from_base_dimension = requires { to_base_base_dimension(std::declval()); }; - } // namespace detail /** @@ -121,7 +113,7 @@ concept is_derived_from_base_dimension = requires { to_base_base_dimension(std:: * Satisfied by all dimension types derived from an specialization of `base_dimension`. */ template -concept BaseDimension = detail::is_derived_from_base_dimension; +concept BaseDimension = requires { detail::to_base_base_dimension(std::declval()); }; // Exponent namespace detail {