From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path:
Received: from us-smtp-delivery-124.mimecast.com
(us-smtp-delivery-124.mimecast.com [216.205.24.124])
by sourceware.org (Postfix) with ESMTP id 0DBD5386180A
for ; Wed, 27 Jan 2021 12:44:36 +0000 (GMT)
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0DBD5386180A
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-229-9kY1GCdzMuO1JMssuil3xQ-1; Wed, 27 Jan 2021 07:44:33 -0500
X-MC-Unique: 9kY1GCdzMuO1JMssuil3xQ-1
Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com
[10.5.11.16])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 778B38143E5;
Wed, 27 Jan 2021 12:44:32 +0000 (UTC)
Received: from localhost (unknown [10.33.36.102])
by smtp.corp.redhat.com (Postfix) with ESMTP id 12C075F9B8;
Wed, 27 Jan 2021 12:44:31 +0000 (UTC)
Date: Wed, 27 Jan 2021 12:44:31 +0000
From: Jonathan Wakely
To: Paul Fee
Cc: gcc-patches ,
libstdc++
Subject: Re: [PATCH v2] libstdc++: C++23, implement WG21 P1679R3
Message-ID: <20210127124431.GZ541588@redhat.com>
References:
<20210127123958.GY541588@redhat.com>
MIME-Version: 1.0
In-Reply-To: <20210127123958.GY541588@redhat.com>
X-Clacks-Overhead: GNU Terry Pratchett
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: multipart/mixed; boundary="m51xatjYGsM+13rf"
Content-Disposition: inline
X-Spam-Status: No, score=-14.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH,
DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0,
KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,
SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: gcc-patches@gcc.gnu.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Gcc-patches mailing list
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
X-List-Received-Date: Wed, 27 Jan 2021 12:44:37 -0000
--m51xatjYGsM+13rf
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
On 27/01/21 12:40 +0000, Jonathan Wakely wrote:
>On 15/01/21 01:23 +0000, Paul Fee via Libstdc++ wrote:
>>Add contains member function to basic_string_view and basic_string.
>>
>>The new method is enabled for -std=gnu++20, gnu++2b and c++2b. This allows
>>users to access the method as a GNU extension to C++20. The conditional
>>test may be reduced to "__cplusplus > 202011L" once GCC has a c++2b switch.
>>
>>Changes since v1 (13th Jan 2021)
>>* New:
>> Test __cplusplus >= 202011L, rather than __cplusplus > 202011L.
>>
>>* As suggested by Jonathan Wakely:
>> Adjust formatting.
>> Test feature-test macro is defined by and .
>> Correct copyright dates on new files.
>> Fix comment typo.
>>
>>libstdc++-v3/
>>
>> Add contains member function to basic_string_view.
>> Likewise to basic_string_view, both with and without _GLIBCXX_USE_CXX11_ABI.
>> Enabled with -std=gnu++20, gnu++2b and c++2b.
>> * include/bits/basic_string.h (basic_string::contains): New.
>> * libstdc++-v3/include/std/string_view (basic_string_view::contains): New.
>> * testsuite/21_strings/basic_string/operations/contains/char/1.cc: New test.
>> * testsuite/21_strings/basic_string/operations/contains/wchar_t/1.cc:
>>New test.
>> * testsuite/21_strings/basic_string_view/operations/contains/char/1.cc:
>>New test.
>> * testsuite/21_strings/basic_string_view/operations/contains/wchar_t/1.cc:
>>New test.
>
>I've committed this to master now.
>
>Now that -std=gnu++23 is supported I changed the preprocessor
>condition to just check __cplusplus > 201102L (and not enable it for
>-std=gnu++20) and changed the tests to use 23 not 2b. I've attached
>what I committed.
>
>Thanks for your patch!
And here's the patch for the release notes, pushed to wwwdocs.
--m51xatjYGsM+13rf
Content-Type: text/x-patch; charset=us-ascii
Content-Disposition: attachment; filename="patch.txt"
commit 12bb55fed649ece4d29536438cdd9853bbd85b1d
Author: Jonathan Wakely
Date: Wed Jan 27 12:42:58 2021 +0000
Document C++23 std::string::contains support
diff --git a/htdocs/gcc-11/changes.html b/htdocs/gcc-11/changes.html
index 9d2e4f29..9b86e6c8 100644
--- a/htdocs/gcc-11/changes.html
+++ b/htdocs/gcc-11/changes.html
@@ -310,7 +310,7 @@ a work-in-progress.
std::from_chars
for floating-point types.
- Improved experimental C++2a support, including:
+ Improved experimental C++20 support, including:
- Calendar additions to
<chrono>
.
std::bit_cast
@@ -322,6 +322,13 @@ a work-in-progress.
- Efficient access to
basic_stringbuf
's buffer.
+ Experimental C++23 support, including:
+
+ contains
member functions for strings,
+ thanks to Paul Fee.
+
+
+
Faster std::uniform_int_distribution
,
thanks to Daniel Lemire.
--m51xatjYGsM+13rf--