Do not use WeaklyRegular with Xcode 15 for type detection

Removing the `WeaklyRegular` requirement from the `Scalar`, `Complex`,
and `Vector` concepts seems to address compiler crashes or long
compilation times with apple-clang included in Xcode 15.

I thought I had previously tried removing the `WeaklyRegular`
requirement and it had not solved the problem but either I made a
mistake with this test or some other changes after rebasing this work
changed the situation.
This commit is contained in:
Roth Michaels
2024-12-19 11:19:09 -05:00
parent 0c3bb98c6d
commit ada508a683
4 changed files with 39 additions and 66 deletions
-4
View File
@@ -65,8 +65,6 @@ static_assert(sizeof(quantity<isq::length[m]>) == sizeof(double));
static_assert(sizeof(quantity<si::metre, short>) == sizeof(short));
static_assert(sizeof(quantity<isq::length[m], short>) == sizeof(short));
#ifndef MP_UNITS_APPLE_CLANG_HACKS
template<template<auto, typename> typename Q>
concept invalid_types = requires {
requires !requires { typename Q<isq::dim_length, double>; }; // dimension instead of reference
@@ -86,8 +84,6 @@ concept invalid_types = requires {
};
static_assert(invalid_types<quantity>);
#endif
static_assert(std::is_trivially_default_constructible_v<quantity<isq::length[m]>>);
static_assert(std::is_trivially_copy_constructible_v<quantity<isq::length[m]>>);
static_assert(std::is_trivially_move_constructible_v<quantity<isq::length[m]>>);