public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-6692] libstdc++: Use __cpp_lib_concepts in std::reverse_iterator [PR104098]
@ 2022-01-18 16:32 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2022-01-18 16:32 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:e13e95bd274148a825bc9527efac49e99080dd64
commit r12-6692-ge13e95bd274148a825bc9527efac49e99080dd64
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue Jan 18 15:34:24 2022 +0000
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.
Diff:
---
libstdc++-v3/include/bits/stl_iterator.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libstdc++-v3/include/bits/stl_iterator.h b/libstdc++-v3/include/bits/stl_iterator.h
index 549a391d04d..266ddd02a78 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-18 16:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-18 16:32 [gcc r12-6692] libstdc++: Use __cpp_lib_concepts in std::reverse_iterator [PR104098] Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).