diff options
Diffstat (limited to 'libstdc++-v3/include/std/array')
-rw-r--r-- | libstdc++-v3/include/std/array | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libstdc++-v3/include/std/array b/libstdc++-v3/include/std/array index ad36cda..0e32d7b 100644 --- a/libstdc++-v3/include/std/array +++ b/libstdc++-v3/include/std/array @@ -45,6 +45,9 @@ #include <bits/utility.h> // std::index_sequence, std::tuple_size #include <debug/assertions.h> +#define __glibcxx_want_to_array +#include <bits/version.h> + namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION @@ -297,7 +300,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator==(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) { return std::equal(__one.begin(), __one.end(), __two.begin()); } -#if __cpp_lib_three_way_comparison && __cpp_lib_concepts +#if __cpp_lib_three_way_comparison // C++ >= 20 && lib_concepts template<typename _Tp, size_t _Nm> [[nodiscard]] constexpr __detail::__synth3way_t<_Tp> @@ -414,8 +417,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return std::move(std::get<_Int>(__arr)); } -#if __cplusplus >= 202002L && __cpp_generic_lambdas >= 201707L -#define __cpp_lib_to_array 201907L +#ifdef __cpp_lib_to_array // C++ >= 20 && __cpp_generic_lambdas >= 201707L template<typename _Tp, size_t _Nm> [[nodiscard]] constexpr array<remove_cv_t<_Tp>, _Nm> @@ -473,7 +475,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION else __builtin_unreachable(); // FIXME: see PR c++/91388 } -#endif // C++20 +#endif // __cpp_lib_to_array // Tuple interface to class template array. |