fix: gcc-15 bug workaround and hopefully a compile-time improvement

Resolves #702
This commit is contained in:
Mateusz Pusz
2025-06-10 18:53:19 +02:00
parent 8d70f19ad3
commit d00108bb0a
5 changed files with 5 additions and 5 deletions

View File

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

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.
*/
MP_UNITS_EXPORT template<typename T>
concept PointOrigin = detail::SymbolicConstant<T> && std::derived_from<T, detail::point_origin_interface>;
concept PointOrigin = std::derived_from<T, detail::point_origin_interface> && detail::SymbolicConstant<T>;
/**
* @brief A concept matching all quantity point origins for a specified quantity type in the library

View File

@ -36,7 +36,7 @@ struct quantity_spec_interface_base;
}
MP_UNITS_EXPORT template<typename T>
concept QuantitySpec = detail::SymbolicConstant<T> && std::derived_from<T, detail::quantity_spec_interface_base>;
concept QuantitySpec = std::derived_from<T, detail::quantity_spec_interface_base> && detail::SymbolicConstant<T>;
template<typename Q>
struct kind_of_;

View File

@ -42,7 +42,7 @@ struct unit_interface;
* Satisfied by all unit types provided by the library.
*/
MP_UNITS_EXPORT template<typename T>
concept Unit = detail::SymbolicConstant<T> && std::derived_from<T, detail::unit_interface>;
concept Unit = std::derived_from<T, detail::unit_interface> && detail::SymbolicConstant<T>;
MP_UNITS_EXPORT template<symbol_text Symbol, auto...>
struct named_unit;

View File

@ -52,7 +52,7 @@ template<auto... Ms>
struct unit_magnitude;
template<typename T>
constexpr bool is_mag_constant = detail::SymbolicConstant<T> && is_derived_from_specialization_of_v<T, mag_constant>;
constexpr bool is_mag_constant = is_derived_from_specialization_of_v<T, mag_constant> && detail::SymbolicConstant<T>;
} // namespace detail