From e6cfd4e69b696d243ae2d96ab880279bf27c9c9c Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Tue, 10 Aug 2021 13:54:39 +0200 Subject: [PATCH] build: clang-13 support added --- example/kalman_filter/kalman.h | 2 +- src/core/include/units/bits/external/hacks.h | 23 +++++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/example/kalman_filter/kalman.h b/example/kalman_filter/kalman.h index 3e416a8b..f78cc289 100644 --- a/example/kalman_filter/kalman.h +++ b/example/kalman_filter/kalman.h @@ -75,7 +75,7 @@ public: uncertainty_type uncertainty; }; -#if UNITS_COMP_CLANG == 12 || UNITS_COMP_MSVC +#if UNITS_COMP_CLANG <= 13 || UNITS_COMP_MSVC template estimation(state, U) -> estimation; diff --git a/src/core/include/units/bits/external/hacks.h b/src/core/include/units/bits/external/hacks.h index 847293f5..20579827 100644 --- a/src/core/include/units/bits/external/hacks.h +++ b/src/core/include/units/bits/external/hacks.h @@ -66,9 +66,10 @@ #endif -#if UNITS_COMP_CLANG == 12 && UNITS_LIBCXX +#if UNITS_LIBCXX + +#if UNITS_COMP_CLANG == 12 -#include #include #include #include @@ -76,6 +77,12 @@ #include #include +#elif UNITS_COMP_CLANG == 13 + +#include + +#endif + #endif #include @@ -99,7 +106,9 @@ namespace std { template concept default_constructible = constructible_from; -#elif UNITS_COMP_CLANG && UNITS_LIBCXX +#elif UNITS_LIBCXX + +#if UNITS_COMP_CLANG == 12 // concepts using concepts::common_with; @@ -209,6 +218,14 @@ constexpr bool in_range(T t) noexcept std::cmp_less_equal(t, std::numeric_limits::max()); } +#elif UNITS_COMP_CLANG == 13 + +using concepts::three_way_comparable; +using concepts::three_way_comparable_with; +using ::ranges::compare_three_way; + +#endif + #endif } // namespace std