refactor: TagType renamed to SymbolicConstant

This commit is contained in:
Mateusz Pusz
2024-11-05 08:00:10 +01:00
parent cc25f9b0de
commit 43ea6adc64
6 changed files with 6 additions and 6 deletions

View File

@@ -196,7 +196,7 @@ template<template<auto...> typename T, typename T1, typename T2, typename... Ts>
namespace detail { namespace detail {
template<typename T> template<typename T>
concept TagType = std::is_empty_v<T> && std::is_final_v<T>; concept SymbolicConstant = std::is_empty_v<T> && std::is_final_v<T>;
} }

View File

@@ -42,7 +42,7 @@ struct dimension_interface;
* Satisfied by all dimension types in the library. * Satisfied by all dimension types in the library.
*/ */
MP_UNITS_EXPORT template<typename T> MP_UNITS_EXPORT template<typename T>
concept Dimension = detail::TagType<T> && std::derived_from<T, detail::dimension_interface>; concept Dimension = detail::SymbolicConstant<T> && std::derived_from<T, detail::dimension_interface>;
MP_UNITS_EXPORT template<symbol_text Symbol> MP_UNITS_EXPORT template<symbol_text Symbol>
struct base_dimension; struct base_dimension;

View File

@@ -47,7 +47,7 @@ MP_UNITS_EXPORT template<symbol_text Symbol, long double Value>
struct mag_constant; struct mag_constant;
MP_UNITS_EXPORT template<typename T> MP_UNITS_EXPORT template<typename T>
concept MagConstant = detail::TagType<T> && is_derived_from_specialization_of_v<T, mag_constant>; concept MagConstant = detail::SymbolicConstant<T> && is_derived_from_specialization_of_v<T, mag_constant>;
template<auto... Ms> template<auto... Ms>
struct magnitude; struct magnitude;

View File

@@ -65,7 +65,7 @@ struct point_origin_interface;
* Satisfied by either quantity points or by all types derived from `absolute_point_origin` class template. * Satisfied by either quantity points or by all types derived from `absolute_point_origin` class template.
*/ */
MP_UNITS_EXPORT template<typename T> MP_UNITS_EXPORT template<typename T>
concept PointOrigin = detail::TagType<T> && std::derived_from<T, detail::point_origin_interface>; concept PointOrigin = detail::SymbolicConstant<T> && std::derived_from<T, detail::point_origin_interface>;
/** /**
* @brief A concept matching all quantity point origins for a specified quantity type in the library * @brief A concept matching all quantity point origins for a specified quantity type in the library

View File

@@ -37,7 +37,7 @@ struct quantity_spec_interface_base;
} }
MP_UNITS_EXPORT template<typename T> MP_UNITS_EXPORT template<typename T>
concept QuantitySpec = detail::TagType<T> && std::derived_from<T, detail::quantity_spec_interface_base>; concept QuantitySpec = detail::SymbolicConstant<T> && std::derived_from<T, detail::quantity_spec_interface_base>;
MP_UNITS_EXPORT MP_UNITS_EXPORT
#if MP_UNITS_API_NO_CRTP #if MP_UNITS_API_NO_CRTP

View File

@@ -43,7 +43,7 @@ struct unit_interface;
* Satisfied by all unit types provided by the library. * Satisfied by all unit types provided by the library.
*/ */
MP_UNITS_EXPORT template<typename T> MP_UNITS_EXPORT template<typename T>
concept Unit = detail::TagType<T> && std::derived_from<T, detail::unit_interface>; concept Unit = detail::SymbolicConstant<T> && std::derived_from<T, detail::unit_interface>;
template<Magnitude auto M, Unit U> template<Magnitude auto M, Unit U>
requires(M != magnitude<>{} && M != mag<1>) requires(M != magnitude<>{} && M != mag<1>)