From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 4BFCC3858025; Tue, 26 Apr 2022 13:13:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4BFCC3858025 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r10-10578] libstdc++: Use __cpp_lib_concepts in std::reverse_iterator [PR104098] X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/releases/gcc-10 X-Git-Oldrev: 01c72ccad94e4f7b71504e502cba43d62b658143 X-Git-Newrev: 5c8f58be95d666e08221447d43d84782e1e6fb95 Message-Id: <20220426131322.4BFCC3858025@sourceware.org> Date: Tue, 26 Apr 2022 13:13:22 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2022 13:13:22 -0000 https://gcc.gnu.org/g:5c8f58be95d666e08221447d43d84782e1e6fb95 commit r10-10578-g5c8f58be95d666e08221447d43d84782e1e6fb95 Author: Jonathan Wakely 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 85e58973ac6..215822581a3 100644 --- a/libstdc++-v3/include/bits/stl_iterator.h +++ b/libstdc++-v3/include/bits/stl_iterator.h @@ -92,7 +92,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, @@ -138,7 +138,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