mirror of
https://github.com/mpusz/mp-units.git
synced 2025-06-25 01:01:33 +02:00
fix: gcc-15 bug workaround and hopefully a compile-time improvement
Resolves #702
This commit is contained in:
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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_;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user