libstdc++: Define __cpp_lib_ranges macro for C++20
authorJonathan Wakely <jwakely@redhat.com>
Fri, 27 Mar 2020 23:21:58 +0000 (23:21 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 27 Mar 2020 23:26:03 +0000 (23:26 +0000)
commitb8a28a06eafafae47ee92fe640b334a8d1e4758a
treea475f6510ae977e8029e70663fa91788ba043402
parent81a8d137c22953df2ea046466c62cd26c0dba103
libstdc++: Define __cpp_lib_ranges macro for C++20

Define the feature test macro now that ranges support is complete.

This also changes the preprocessor checks for the __cpp_concepts macro
so that library components depending on concepts are only enabled when
C++20 concepts are supported, and not just for the Concepts TS (which
uses different syntax in places).

* include/bits/range_cmp.h (__cpp_lib_ranges): Define.
* include/bits/stl_iterator.h: Check value of __cpp_concepts so that
C++20 concepts are required.
* include/bits/stl_iterator_base_types.h: Likewise.
* include/std/concepts: Likewise.
* include/std/version: Likewise.
* testsuite/std/ranges/headers/ranges/synopsis.cc: Check feature test
macro.
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/range_cmp.h
libstdc++-v3/include/bits/stl_iterator.h
libstdc++-v3/include/bits/stl_iterator_base_types.h
libstdc++-v3/include/std/concepts
libstdc++-v3/include/std/version
libstdc++-v3/testsuite/24_iterators/move_iterator/move_only.cc
libstdc++-v3/testsuite/24_iterators/move_iterator/rel_ops_c++20.cc
libstdc++-v3/testsuite/std/ranges/headers/ranges/synopsis.cc