_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && defined(__cpp_concepts) && __cpp_concepts >= 201811L
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
// [concept.same]
template<class _Fn, class... _Args>
concept regular_invocable = invocable<_Fn, _Args...>;
-#endif // _LIBCPP_STD_VER > 17 && defined(__cpp_concepts) && __cpp_concepts >= 201811L
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
_LIBCPP_END_NAMESPACE_STD
#include <__config>
-#if _LIBCPP_STD_VER > 17 && defined(__cpp_concepts) && __cpp_concepts >= 201811L
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#include <concepts>
#include <type_traits>
#include <version>
template <class T> inline constexpr T egamma_v = __illformed<T>{};
template <class T> inline constexpr T phi_v = __illformed<T>{};
-template <class T>
-concept __floating_point = is_floating_point_v<T>;
-
-template <__floating_point T> inline constexpr T e_v<T> = 2.718281828459045235360287471352662;
-template <__floating_point T> inline constexpr T log2e_v<T> = 1.442695040888963407359924681001892;
-template <__floating_point T> inline constexpr T log10e_v<T> = 0.434294481903251827651128918916605;
-template <__floating_point T> inline constexpr T pi_v<T> = 3.141592653589793238462643383279502;
-template <__floating_point T> inline constexpr T inv_pi_v<T> = 0.318309886183790671537767526745028;
-template <__floating_point T> inline constexpr T inv_sqrtpi_v<T> = 0.564189583547756286948079451560772;
-template <__floating_point T> inline constexpr T ln2_v<T> = 0.693147180559945309417232121458176;
-template <__floating_point T> inline constexpr T ln10_v<T> = 2.302585092994045684017991454684364;
-template <__floating_point T> inline constexpr T sqrt2_v<T> = 1.414213562373095048801688724209698;
-template <__floating_point T> inline constexpr T sqrt3_v<T> = 1.732050807568877293527446341505872;
-template <__floating_point T> inline constexpr T inv_sqrt3_v<T> = 0.577350269189625764509148780501957;
-template <__floating_point T> inline constexpr T egamma_v<T> = 0.577215664901532860606512090082402;
-template <__floating_point T> inline constexpr T phi_v<T> = 1.618033988749894848204586834365638;
+template <floating_point T> inline constexpr T e_v<T> = 2.718281828459045235360287471352662;
+template <floating_point T> inline constexpr T log2e_v<T> = 1.442695040888963407359924681001892;
+template <floating_point T> inline constexpr T log10e_v<T> = 0.434294481903251827651128918916605;
+template <floating_point T> inline constexpr T pi_v<T> = 3.141592653589793238462643383279502;
+template <floating_point T> inline constexpr T inv_pi_v<T> = 0.318309886183790671537767526745028;
+template <floating_point T> inline constexpr T inv_sqrtpi_v<T> = 0.564189583547756286948079451560772;
+template <floating_point T> inline constexpr T ln2_v<T> = 0.693147180559945309417232121458176;
+template <floating_point T> inline constexpr T ln10_v<T> = 2.302585092994045684017991454684364;
+template <floating_point T> inline constexpr T sqrt2_v<T> = 1.414213562373095048801688724209698;
+template <floating_point T> inline constexpr T sqrt3_v<T> = 1.732050807568877293527446341505872;
+template <floating_point T> inline constexpr T inv_sqrt3_v<T> = 0.577350269189625764509148780501957;
+template <floating_point T> inline constexpr T egamma_v<T> = 0.577215664901532860606512090082402;
+template <floating_point T> inline constexpr T phi_v<T> = 1.618033988749894848204586834365638;
inline constexpr double e = e_v<double>;
inline constexpr double log2e = log2e_v<double>;
_LIBCPP_POP_MACROS
-#endif //_LIBCPP_STD_VER > 17 && defined(__cpp_concepts) && __cpp_concepts >= 201811L
+#endif //_LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
#endif // _LIBCPP_NUMBERS
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17 && defined(__cpp_concepts) && __cpp_concepts >= 201811L
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
// [rand.req.urng]
template<class _Gen>
requires bool_constant<(_Gen::min() < _Gen::max())>::value;
};
-#endif // _LIBCPP_STD_VER > 17 && defined(__cpp_concepts) && __cpp_concepts >= 201811L
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
// __is_seed_sequence
# define __cpp_lib_latch 201907L
# endif
# define __cpp_lib_list_remove_return_type 201806L
-# if defined(__cpp_concepts) && __cpp_concepts >= 201811L
+# ifndef _LIBCPP_HAS_NO_CONCEPTS
# define __cpp_lib_math_constants 201907L
# endif
// # define __cpp_lib_polymorphic_allocator 201902L
#elif TEST_STD_VER == 20
-# if defined(__cpp_concepts) && __cpp_concepts >= 201811L
+# ifndef _LIBCPP_HAS_NO_CONCEPTS
# ifndef __cpp_lib_math_constants
# error "__cpp_lib_math_constants should be defined in c++20"
# endif
# endif
# else
# ifdef __cpp_lib_math_constants
-# error "__cpp_lib_math_constants should not be defined when defined(__cpp_concepts) && __cpp_concepts >= 201811L is not defined!"
+# error "__cpp_lib_math_constants should not be defined when defined(__cpp_concepts) && __cpp_concepts >= 201907L is not defined!"
# endif
-# endif
+# endif // _LIBCPP_HAS_NO_CONCEPTS
#elif TEST_STD_VER > 20
-# if defined(__cpp_concepts) && __cpp_concepts >= 201811L
+# ifndef _LIBCPP_HAS_NO_CONCEPTS
# ifndef __cpp_lib_math_constants
# error "__cpp_lib_math_constants should be defined in c++2b"
# endif
# endif
# else
# ifdef __cpp_lib_math_constants
-# error "__cpp_lib_math_constants should not be defined when defined(__cpp_concepts) && __cpp_concepts >= 201811L is not defined!"
+# error "__cpp_lib_math_constants should not be defined when defined(__cpp_concepts) && __cpp_concepts >= 201907L is not defined!"
# endif
-# endif
+# endif // _LIBCPP_HAS_NO_CONCEPTS
#endif // TEST_STD_VER > 20
# error "__cpp_lib_map_try_emplace should have the value 201411L in c++20"
# endif
-# if defined(__cpp_concepts) && __cpp_concepts >= 201811L
+# ifndef _LIBCPP_HAS_NO_CONCEPTS
# ifndef __cpp_lib_math_constants
# error "__cpp_lib_math_constants should be defined in c++20"
# endif
# endif
# else
# ifdef __cpp_lib_math_constants
-# error "__cpp_lib_math_constants should not be defined when defined(__cpp_concepts) && __cpp_concepts >= 201811L is not defined!"
+# error "__cpp_lib_math_constants should not be defined when defined(__cpp_concepts) && __cpp_concepts >= 201907L is not defined!"
# endif
-# endif
+# endif // _LIBCPP_HAS_NO_CONCEPTS
# if !defined(_LIBCPP_VERSION)
# ifndef __cpp_lib_math_special_functions
# error "__cpp_lib_map_try_emplace should have the value 201411L in c++2b"
# endif
-# if defined(__cpp_concepts) && __cpp_concepts >= 201811L
+# if !_LIBCPP_HAS_NO_CONCEPTS
# ifndef __cpp_lib_math_constants
# error "__cpp_lib_math_constants should be defined in c++2b"
# endif
# endif
# else
# ifdef __cpp_lib_math_constants
-# error "__cpp_lib_math_constants should not be defined when defined(__cpp_concepts) && __cpp_concepts >= 201811L is not defined!"
+# error "__cpp_lib_math_constants should not be defined when defined(__cpp_concepts) && __cpp_concepts >= 201907L is not defined!"
# endif
-# endif
+# endif // !_LIBCPP_HAS_NO_CONCEPTS
# if !defined(_LIBCPP_VERSION)
# ifndef __cpp_lib_math_special_functions
"name": "__cpp_lib_math_constants",
"values": { "c++20": 201907 },
"headers": ["numbers"],
- "depends": "defined(__cpp_concepts) && __cpp_concepts >= 201811L",
- "internal_depends": "defined(__cpp_concepts) && __cpp_concepts >= 201811L",
+ "depends": "defined(__cpp_concepts) && __cpp_concepts >= 201907L",
+ "internal_depends": "defined(__cpp_concepts) && __cpp_concepts >= 201907L",
}, {
"name": "__cpp_lib_math_special_functions",
"values": { "c++17": 201603 },
Feature(name='libcpp-no-if-constexpr', when=lambda cfg: '__cpp_if_constexpr' not in featureTestMacros(cfg)),
Feature(name='libcpp-no-structured-bindings', when=lambda cfg: '__cpp_structured_bindings' not in featureTestMacros(cfg)),
Feature(name='libcpp-no-deduction-guides', when=lambda cfg: featureTestMacros(cfg).get('__cpp_deduction_guides', 0) < 201611),
- Feature(name='libcpp-no-concepts', when=lambda cfg: featureTestMacros(cfg).get('__cpp_concepts', 0) < 201811),
+ Feature(name='libcpp-no-concepts', when=lambda cfg: featureTestMacros(cfg).get('__cpp_concepts', 0) < 201907),
Feature(name='has-fobjc-arc', when=lambda cfg: hasCompileFlag(cfg, '-xobjective-c++ -fobjc-arc') and
sys.platform.lower().strip() == 'darwin'), # TODO: this doesn't handle cross-compiling to Apple platforms.
Feature(name='objective-c++', when=lambda cfg: hasCompileFlag(cfg, '-xobjective-c++ -fobjc-arc')),