mirror of
https://github.com/openRuyi-Project/gcc.git
synced 2026-10-04 16:08:34 +00:00
libstdc++: Define __cpp_lib_ranges in <algorithm>
The __cpp_lib_ranges macro is missing from <algorithm>. libstdc++-v3/ChangeLog: * include/std/algorithm: Define __glibcxx_want_ranges. * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Check feature test macro in C++20 mode.
This commit is contained in:
@@ -67,6 +67,7 @@
|
||||
#define __glibcxx_want_constexpr_algorithms
|
||||
#define __glibcxx_want_freestanding_algorithm
|
||||
#define __glibcxx_want_parallel_algorithm
|
||||
#define __glibcxx_want_ranges
|
||||
#define __glibcxx_want_ranges_contains
|
||||
#define __glibcxx_want_ranges_find_last
|
||||
#define __glibcxx_want_ranges_fold
|
||||
|
||||
@@ -19,6 +19,14 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#if __cplusplus >= 202002L
|
||||
#ifndef __cpp_lib_ranges
|
||||
# error "Feature test macro for ranges is missing in <algorithm>"
|
||||
#elif __cpp_lib_ranges < 201911L
|
||||
# error "Feature test macro for ranges has wrong value in <algorithm>"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace std
|
||||
{
|
||||
// 25.1, non-modifying sequence operations:
|
||||
|
||||
Reference in New Issue
Block a user