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:
1 parent
0c3bb98c6d
commit
ada508a683
4 files changed
+39
-66
No files matched your search
@@ -20,7 +20,6 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#include <mp-units/bits/hacks.h>
|
||||
#include <mp-units/systems/isq/space_and_time.h>
|
||||
#include <mp-units/systems/natural.h>
|
||||
#include <mp-units/systems/si.h>
|
||||
@@ -309,9 +308,7 @@ static_assert(!RepresentationOf<std::complex<double>, quantity_character::scalar
|
||||
static_assert(!RepresentationOf<std::complex<double>, quantity_character::vector>);
|
||||
static_assert(!RepresentationOf<std::complex<double>, quantity_character::tensor>);
|
||||
static_assert(RepresentationOf<cartesian_vector<double>, quantity_character::vector>);
|
||||
#ifndef MP_UNITS_APPLE_CLANG_HACKS
|
||||
static_assert(!RepresentationOf<cartesian_vector<double>, quantity_character::scalar>);
|
||||
#endif
|
||||
static_assert(!RepresentationOf<cartesian_vector<double>, quantity_character::complex>);
|
||||
static_assert(!RepresentationOf<cartesian_vector<double>, quantity_character::tensor>);
|
||||
static_assert(!RepresentationOf<std::chrono::seconds, quantity_character::scalar>);
|
||||
|
||||
@@ -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]>>);
|
||||
|
||||
Reference in new issue
Block a user