refactor: DerivedQuantitySpec implementation simplified

This commit is contained in:
Mateusz Pusz
2023-02-07 22:28:14 -08:00
parent 8de74eb6f7
commit 8a0a61b589

View File

@@ -115,19 +115,13 @@ struct derived_quantity_spec;
namespace detail { namespace detail {
template<typename T>
inline constexpr bool is_derived_from_specialization_of_derived_quantity_spec = false;
template<typename... Args>
inline constexpr bool is_derived_from_specialization_of_derived_quantity_spec<derived_quantity_spec<Args...>> = true;
/** /**
* @brief Concept matching all derived quantity specification types * @brief Concept matching all derived quantity specification types
* *
* Satisfied by all `derived_quantity_spec` specializations. * Satisfied by all `derived_quantity_spec` specializations.
*/ */
template<typename T> template<typename T>
concept DerivedQuantitySpec = detail::is_derived_from_specialization_of_derived_quantity_spec<T>; concept DerivedQuantitySpec = is_derived_from_specialization_of<T, derived_quantity_spec>;
} // namespace detail } // namespace detail