mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-06 13:44:27 +02:00
build: clang-13 support added
This commit is contained in:
@@ -75,7 +75,7 @@ public:
|
|||||||
uncertainty_type uncertainty;
|
uncertainty_type uncertainty;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if UNITS_COMP_CLANG == 12 || UNITS_COMP_MSVC
|
#if UNITS_COMP_CLANG <= 13 || UNITS_COMP_MSVC
|
||||||
|
|
||||||
template<QuantityOrQuantityPoint QQP, units::Quantity U>
|
template<QuantityOrQuantityPoint QQP, units::Quantity U>
|
||||||
estimation(state<QQP>, U) -> estimation<QQP>;
|
estimation(state<QQP>, U) -> estimation<QQP>;
|
||||||
|
23
src/core/include/units/bits/external/hacks.h
vendored
23
src/core/include/units/bits/external/hacks.h
vendored
@@ -66,9 +66,10 @@
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if UNITS_COMP_CLANG == 12 && UNITS_LIBCXX
|
#if UNITS_LIBCXX
|
||||||
|
|
||||||
|
#if UNITS_COMP_CLANG == 12
|
||||||
|
|
||||||
#include <concepts/compare.hpp>
|
|
||||||
#include <concepts/concepts.hpp>
|
#include <concepts/concepts.hpp>
|
||||||
#include <range/v3/functional/comparisons.hpp>
|
#include <range/v3/functional/comparisons.hpp>
|
||||||
#include <range/v3/iterator.hpp>
|
#include <range/v3/iterator.hpp>
|
||||||
@@ -76,6 +77,12 @@
|
|||||||
#include <range/v3/algorithm/lower_bound.hpp>
|
#include <range/v3/algorithm/lower_bound.hpp>
|
||||||
#include <range/v3/algorithm/transform.hpp>
|
#include <range/v3/algorithm/transform.hpp>
|
||||||
|
|
||||||
|
#elif UNITS_COMP_CLANG == 13
|
||||||
|
|
||||||
|
#include <range/v3/functional/comparisons.hpp>
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <concepts>
|
#include <concepts>
|
||||||
@@ -99,7 +106,9 @@ namespace std {
|
|||||||
template<class T>
|
template<class T>
|
||||||
concept default_constructible = constructible_from<T>;
|
concept default_constructible = constructible_from<T>;
|
||||||
|
|
||||||
#elif UNITS_COMP_CLANG && UNITS_LIBCXX
|
#elif UNITS_LIBCXX
|
||||||
|
|
||||||
|
#if UNITS_COMP_CLANG == 12
|
||||||
|
|
||||||
// concepts
|
// concepts
|
||||||
using concepts::common_with;
|
using concepts::common_with;
|
||||||
@@ -209,6 +218,14 @@ constexpr bool in_range(T t) noexcept
|
|||||||
std::cmp_less_equal(t, std::numeric_limits<R>::max());
|
std::cmp_less_equal(t, std::numeric_limits<R>::max());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#elif UNITS_COMP_CLANG == 13
|
||||||
|
|
||||||
|
using concepts::three_way_comparable;
|
||||||
|
using concepts::three_way_comparable_with;
|
||||||
|
using ::ranges::compare_three_way;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
Reference in New Issue
Block a user