public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r11-9764] libstdc++: Use __cpp_lib_concepts in std::reverse_iterator [PR104098] Date: Mon, 4 Apr 2022 11:46:55 +0000 (GMT) [thread overview] Message-ID: <20220404114655.75BF23858016@sourceware.org> (raw) https://gcc.gnu.org/g:f6bf63ff3684c28c3b2c4d3a67a42db738d6342d commit r11-9764-gf6bf63ff3684c28c3b2c4d3a67a42db738d6342d 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. (cherry picked from commit e13e95bd274148a825bc9527efac49e99080dd64) 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 2b7efcbf3c3..79e9959fc58 100644 --- a/libstdc++-v3/include/bits/stl_iterator.h +++ b/libstdc++-v3/include/bits/stl_iterator.h @@ -93,7 +93,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, @@ -150,7 +150,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
reply other threads:[~2022-04-04 11:46 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220404114655.75BF23858016@sourceware.org \ --to=redi@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).