From patchwork Thu Jun 1 15:07:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 70456 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4CD0E3855897 for ; Thu, 1 Jun 2023 15:07:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4CD0E3855897 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685632073; bh=/FX64YTGsE5ZWHs94fINnhLip9Q6PbOs5SYBpFDwzOc=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=RQyO76TZ0Nn2rnE2uWUvdv3L2oGweR0inG8AvjHgthHU+ZvEYCDwWid0pNocH3yMx h+1nrYqtuBRxxtP+UyjdlGy1BFNvoNKyO/51bYeq2tyTDTThZpFfUsg5YBwaM0mDUV Vx1boIund5mSY8OKEeV+WYrCIDaHIYkMsuBqykBI= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 8E6143858421 for ; Thu, 1 Jun 2023 15:07:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8E6143858421 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-369-SntiwQCKODaqt3aMdMbDog-1; Thu, 01 Jun 2023 11:07:14 -0400 X-MC-Unique: SntiwQCKODaqt3aMdMbDog-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 26C833C1484E; Thu, 1 Jun 2023 15:07:13 +0000 (UTC) Received: from localhost (unknown [10.42.28.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id D444914171BB; Thu, 1 Jun 2023 15:07:12 +0000 (UTC) To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Document removal of implicit allocator rebinding extensions Date: Thu, 1 Jun 2023 16:07:11 +0100 Message-Id: <20230601150711.257954-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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-Patchwork-Original-From: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Pushed to trunk. The first two changes will be backported too. -- >8 -- Traditionally libstdc++ allowed containers and strings to be instantiated with allocator's that have the wrong value type, implicitly rebinding the allocator to the container's value type. Since C++20 that has been explicitly ill-formed, so the extension is no longer supported in strict modes (e.g. -std=c++17) and in C++20 and later. libstdc++-v3/ChangeLog: * doc/xml/manual/evolution.xml: Document removal of implicit allocator rebinding extensions in strict mode and for C++20. * doc/html/*: Regenerate. --- libstdc++-v3/doc/html/manual/api.html | 13 +++++++++++++ libstdc++-v3/doc/xml/manual/evolution.xml | 19 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/libstdc++-v3/doc/xml/manual/evolution.xml b/libstdc++-v3/doc/xml/manual/evolution.xml index 4037a18d2df..db70f24f2f9 100644 --- a/libstdc++-v3/doc/xml/manual/evolution.xml +++ b/libstdc++-v3/doc/xml/manual/evolution.xml @@ -915,6 +915,13 @@ Calling a std::bind result as volatile was deprecated for C++17. libstdc++.so.8. + + The extension allowing containers to be instantiated with an allocator + that doesn't match the container's value type is no longer allowed in + strict () modes, only in + modes. + +
<constant>9</constant> @@ -998,6 +1005,12 @@ Calling a std::bind result as volatile was deprecated for C++17. added. + + The extension allowing containers to be instantiated with an allocator + that doesn't match the container's value type is no longer allowed in + C++20 mode, even in non-strict mode. + +
<constant>11</constant> @@ -1096,6 +1109,12 @@ Deprecate the non-standard overload that allows std::setfill to be used with std::basic_istream. + + The extension allowing std::basic_string to be instantiated + with an allocator that doesn't match the string's character type is no + longer allowed in C++20 mode. + +