Fix for long Xcode 15 build time after removing Representation concept

For some reason this new implementation of `RepresentationOf` was
causing long build times again in the Kalman fiter examples.  I'm not
sure why this is and if we should keep the old implemention only for
Xcode 15 or if we should revert this implementation change in general.
This commit is contained in:
Roth Michaels
2025-04-21 16:31:52 -04:00
parent 2e7f25a782
commit dc47ac32df

View File

@ -340,11 +340,22 @@ concept SomeRepresentation =
} // namespace detail
#ifdef MP_UNITS_XCODE15_HACKS
MP_UNITS_EXPORT template<typename T, auto V>
concept RepresentationOf =
detail::SomeRepresentation<T> &&
((QuantitySpec<MP_UNITS_REMOVE_CONST(decltype(V))> &&
(detail::QuantityKindSpec<MP_UNITS_REMOVE_CONST(decltype(V))> || detail::IsOfCharacter<T, V.character>)) ||
(std::same_as<quantity_character, decltype(V)> && detail::IsOfCharacter<T, V>));
#else
MP_UNITS_EXPORT template<typename T, auto V>
concept RepresentationOf =
((QuantitySpec<MP_UNITS_REMOVE_CONST(decltype(V))> &&
((detail::QuantityKindSpec<MP_UNITS_REMOVE_CONST(decltype(V))> && detail::SomeRepresentation<T>) ||
detail::IsOfCharacter<T, V.character>)) ||
(std::same_as<quantity_character, decltype(V)> && detail::IsOfCharacter<T, V>));
#endif
} // namespace mp_units