From dc47ac32df9d9509579e7909d4d966d435a88dd9 Mon Sep 17 00:00:00 2001 From: Roth Michaels Date: Mon, 21 Apr 2025 16:31:52 -0400 Subject: [PATCH] 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. --- .../mp-units/framework/representation_concepts.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/core/include/mp-units/framework/representation_concepts.h b/src/core/include/mp-units/framework/representation_concepts.h index 69668c74..44cbf4a3 100644 --- a/src/core/include/mp-units/framework/representation_concepts.h +++ b/src/core/include/mp-units/framework/representation_concepts.h @@ -340,11 +340,22 @@ concept SomeRepresentation = } // namespace detail +#ifdef MP_UNITS_XCODE15_HACKS +MP_UNITS_EXPORT template +concept RepresentationOf = + detail::SomeRepresentation && + ((QuantitySpec && + (detail::QuantityKindSpec || detail::IsOfCharacter)) || + (std::same_as && detail::IsOfCharacter)); + +#else + MP_UNITS_EXPORT template concept RepresentationOf = ((QuantitySpec && ((detail::QuantityKindSpec && detail::SomeRepresentation) || detail::IsOfCharacter)) || (std::same_as && detail::IsOfCharacter)); +#endif } // namespace mp_units