aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2022-01-18 15:34:24 +0000
committerJonathan Wakely <jwakely@redhat.com>2022-01-18 16:31:03 +0000
commite13e95bd274148a825bc9527efac49e99080dd64 (patch)
tree73e8cc16b9e64cfcf8d34a384aa9e674411adef8 /libstdc++-v3
parent302343d8dd30e34516f74a61ec758d80a6c4d1db (diff)
downloadgcc-e13e95bd274148a825bc9527efac49e99080dd64.zip
gcc-e13e95bd274148a825bc9527efac49e99080dd64.tar.gz
gcc-e13e95bd274148a825bc9527efac49e99080dd64.tar.bz2
libstdc++: Use __cpp_lib_concepts in std::reverse_iterator [PR104098]
We should not assume that std::iter_value_t etc. are defined unconditionally for C++20 mode. libstdc++-v3/ChangeLog: PR libstdc++/104098 * include/bits/stl_iterator.h (reverse_iterator): Check __cpp_lib_concepts instead of __cplusplus.
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/include/bits/stl_iterator.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/include/bits/stl_iterator.h b/libstdc++-v3/include/bits/stl_iterator.h
index 549a391..266ddd0 100644
--- a/libstdc++-v3/include/bits/stl_iterator.h
+++ b/libstdc++-v3/include/bits/stl_iterator.h
@@ -94,7 +94,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* @{
*/
-#if __cplusplus > 201703L && __cpp_lib_concepts
+#if __cpp_lib_concepts
namespace __detail
{
// Weaken iterator_category _Cat to _Limit if it is derived from that,
@@ -155,7 +155,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
public:
typedef _Iterator iterator_type;
typedef typename __traits_type::pointer pointer;
-#if __cplusplus <= 201703L
+#if ! __cpp_lib_concepts
typedef typename __traits_type::difference_type difference_type;
typedef typename __traits_type::reference reference;
#else