Fixes for apple-clang crashes and performance issues
The source of the crash with the latest changes seemed to be from the `IsOfCharacter` concept. This concept was refactored to use some type traits and more simple concepts although with less strict requirements. A new macro, `MP_UNITS_APPLE_CLANG_HACKS` was added to mp-units/bits/hacks.h to enable work arounds for pre-Xcode 16.1 apple-clang. Some tests were not passing and were removed with the preprocessor macro for apple-clang hacks is defined. Adding `ComplexFunctionsAvailable` and `VectorFunctionsAvailable` fixed some test failures in concepts_test.cpp but not all.
This commit is contained in:
1 parent
6d93f7385a
commit
c3e45088a6
4 files changed
+45
-3
No files matched your search
@@ -20,6 +20,7 @@
|
||||
// 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>
|
||||
@@ -308,7 +309,9 @@ 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>);
|
||||
|
||||
Reference in new issue
Block a user