From patchwork Thu Nov 14 16:52:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1194969 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-513437-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="v4BVHuDi"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="L21nJIph"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47DSGW4zDLz9sP3 for ; Fri, 15 Nov 2019 03:53:07 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=Fjd6svsCSvRLw3SSMJM0cx1TVusw0CrqCintuG5FSAvtZRRde6IaT fxiGsHeSUJSKqH6E5yXOIN0iLTV7spdVtPuA+z8tqMoWbGRPlKxJs16djyEB5dn3 xhXPEky1A1ZyTkIiTKGCo5OZ8ZUmHYslL/EmbpC01f/ig93RRdXv44= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=HTtwUNdgoKRhkX9PTkGaKeZsnpA=; b=v4BVHuDi3X6MnLIpud+6 WTHNy6aRXy9qI+GxHVsLUMye3QM2bElyXG8vJLjRJa8rk8Sadtvjve4waobMdvh6 MFJ5uJnumv9OsO0gIPVXF3cyq0KP0EZ6vFO278mqfZb+XazOTjP1lvw+YloCj24k 7CsPIl3bdnrv1X7llse9KVs= Received: (qmail 98941 invoked by alias); 14 Nov 2019 16:52:53 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 98924 invoked by uid 89); 14 Nov 2019 16:52:53 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-17.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=UD:iterator_concepts.h X-HELO: us-smtp-delivery-1.mimecast.com Received: from us-smtp-2.mimecast.com (HELO us-smtp-delivery-1.mimecast.com) (205.139.110.61) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 14 Nov 2019 16:52:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573750362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=EE8vMN+8q4ezuJ7mZHYOBkC/UEpHHSKyKB4Pc5V7cr8=; b=L21nJIph2sPuRmCgs0ZlZZGD2s4jQQ/2MjCbUBk0t7CrVTj4C/DnbxtonqKLAZqqnl5ddY QbGuWEPmOllp9oiMEZhhq93ss0MITFXe59EkLgi8iXIT8QG6XMu+5jdMop5ox6OVqj2cS/ 1u0U+QItqHFY8LvYeYp/311O2B5dPcg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-380-nZUzhzmTOdWBER9wmeMPug-1; Thu, 14 Nov 2019 11:52:38 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D0F58801E76; Thu, 14 Nov 2019 16:52:37 +0000 (UTC) Received: from localhost (unknown [10.33.36.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id 772805D6AE; Thu, 14 Nov 2019 16:52:37 +0000 (UTC) Date: Thu, 14 Nov 2019 16:52:37 +0000 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH] libstdc++: Rename disable_sized_sentinel [P1871R1] Message-ID: <20191114165237.GA32495@redhat.com> MIME-Version: 1.0 X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.12.1 (2019-06-15) X-Mimecast-Spam-Score: 0 Content-Disposition: inline * include/bits/iterator_concepts.h (disable_sized_sentinel): Rename to disable_sized_sentinel_for. * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust. Tested powerpc64le-linux, committed to trunk. commit 3a7f3e87680cc0ca20318b0983d517cd32851fc5 Author: Jonathan Wakely Date: Wed Nov 13 22:27:59 2019 +0000 libstdc++: Rename disable_sized_sentinel [P1871R1] * include/bits/iterator_concepts.h (disable_sized_sentinel): Rename to disable_sized_sentinel_for. * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust. diff --git a/libstdc++-v3/include/bits/iterator_concepts.h b/libstdc++-v3/include/bits/iterator_concepts.h index 8b398616a56..7cc058eb8c9 100644 --- a/libstdc++-v3/include/bits/iterator_concepts.h +++ b/libstdc++-v3/include/bits/iterator_concepts.h @@ -524,11 +524,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION && __detail::__weakly_eq_cmp_with<_Sent, _Iter>; template - inline constexpr bool disable_sized_sentinel = false; + inline constexpr bool disable_sized_sentinel_for = false; template concept sized_sentinel_for = sentinel_for<_Sent, _Iter> - && !disable_sized_sentinel, remove_cv_t<_Iter>> + && !disable_sized_sentinel_for, remove_cv_t<_Iter>> && requires(const _Iter& __i, const _Sent& __s) { { __s - __i } -> same_as>; diff --git a/libstdc++-v3/include/bits/stl_iterator.h b/libstdc++-v3/include/bits/stl_iterator.h index 411feba90e0..a707621c9ed 100644 --- a/libstdc++-v3/include/bits/stl_iterator.h +++ b/libstdc++-v3/include/bits/stl_iterator.h @@ -449,9 +449,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION # if __cplusplus > 201703L && defined __cpp_lib_concepts template requires (!sized_sentinel_for<_Iterator1, _Iterator2>) - inline constexpr bool disable_sized_sentinel, - reverse_iterator<_Iterator2>> - = true; + inline constexpr bool + disable_sized_sentinel_for, + reverse_iterator<_Iterator2>> = true; # endif // C++20 # endif // C++14 diff --git a/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++20.cc b/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++20.cc index 824b0b4f38c..fb3bb420a54 100644 --- a/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++20.cc +++ b/libstdc++-v3/testsuite/24_iterators/headers/iterator/synopsis_c++20.cc @@ -79,7 +79,7 @@ namespace std } struct I { }; -template<> constexpr bool std::disable_sized_sentinel = true; +template<> constexpr bool std::disable_sized_sentinel_for = true; namespace __gnu_test { @@ -87,8 +87,8 @@ namespace __gnu_test constexpr auto* iter_move = &std::ranges::iter_move; constexpr auto* iter_swap = &std::ranges::iter_swap; // sized sentinels - constexpr bool const* disable_sized_sentinel - = &std::disable_sized_sentinel; + constexpr bool const* disable_sized_sentinel_for + = &std::disable_sized_sentinel_for; // default sentinels constexpr std::default_sentinel_t const* default_sentinel = &std::default_sentinel;