Skip to content

Commit dc47ac3

Browse files
committed
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.
1 parent 2e7f25a commit dc47ac3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/core/include/mp-units/framework/representation_concepts.h

+11
Original file line numberDiff line numberDiff line change
@@ -340,11 +340,22 @@ concept SomeRepresentation =
340340

341341
} // namespace detail
342342

343+
#ifdef MP_UNITS_XCODE15_HACKS
344+
MP_UNITS_EXPORT template<typename T, auto V>
345+
concept RepresentationOf =
346+
detail::SomeRepresentation<T> &&
347+
((QuantitySpec<MP_UNITS_REMOVE_CONST(decltype(V))> &&
348+
(detail::QuantityKindSpec<MP_UNITS_REMOVE_CONST(decltype(V))> || detail::IsOfCharacter<T, V.character>)) ||
349+
(std::same_as<quantity_character, decltype(V)> && detail::IsOfCharacter<T, V>));
350+
351+
#else
352+
343353
MP_UNITS_EXPORT template<typename T, auto V>
344354
concept RepresentationOf =
345355
((QuantitySpec<MP_UNITS_REMOVE_CONST(decltype(V))> &&
346356
((detail::QuantityKindSpec<MP_UNITS_REMOVE_CONST(decltype(V))> && detail::SomeRepresentation<T>) ||
347357
detail::IsOfCharacter<T, V.character>)) ||
348358
(std::same_as<quantity_character, decltype(V)> && detail::IsOfCharacter<T, V>));
359+
#endif
349360

350361
} // namespace mp_units

0 commit comments

Comments
 (0)