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: 102002 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp400786vqr; Thu, 1 Jun 2023 08:08:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6sWQBpg4aqegnHyA5ZE01JalgSM7HNlpPr0fB1W0rujVjID1R0BpcxES590ge2ro5sn8tr X-Received: by 2002:a2e:834b:0:b0:2ac:66c8:3c4b with SMTP id l11-20020a2e834b000000b002ac66c83c4bmr4560071ljh.11.1685632107017; Thu, 01 Jun 2023 08:08:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685632106; cv=none; d=google.com; s=arc-20160816; b=CcbFrtFGT7J2C9/De7zsnUCsQ0tuFqNL0R3gonbiUBiWRXCtUyZmNe+zljaZst+R1d NvAOOLUg0Rfls8PyqnnrxxgmR1R4jsOw0wH1669wvv46Tw95GdfG/zHUHgi0dbUJbzOH 4k3+/5Tgu8uWg9HKtkHARBZAINqFMxmIXOLbZ0fNtGAl5xLnarF6ejqKXNjIs7xXLD3S Z2C/XLlpcPeePoVBrloxvCYfFjx7PZIxWDL2tsINYYHeiCzjtkcmG/3uWIQN9knUr4Mg vJ/vej/ScytoY+5vGxW4MkeQUnBDim/ial1myad7kdd7AFSYWNEOy3yAAndE22MHIiQh gY4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=/FX64YTGsE5ZWHs94fINnhLip9Q6PbOs5SYBpFDwzOc=; b=jUTC61ycy4HJ5BOHpzIC9cld5B3dkkZlRE+3ZW1JAzhz68yOBvoBbhnbbbGKDGTn7u f3VcstLqTEhtVomXZhs9M8Jy4FhY0iM3ueMal6oGObepprDyNEIF5xlGvZEtEirVPo3R Gb4vbgshtwuG7QpoYy4YL4/I+fqmCmeyzXhobGhAfCWyan6YH2QKn5Zp2ibp/ElBE0aX DrcvlX3Xm1KhklLspYpPXhDm0suNewt/6fp1aFtg1UFESNCka3iKt8BChr6ggoMbkPVt RRVhlvuq3YxpUXCQSPI1HYG/GFdps0k44fIKFUErsJj/ulPMvymk7yIxh8F8ZRoEY3YO 6n5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=CdaChX8t; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id a15-20020aa7d74f000000b00514a6ae120fsi5150045eds.258.2023.06.01.08.08.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 08:08:26 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=CdaChX8t; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CF5B3385735D for ; Thu, 1 Jun 2023 15:08:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CF5B3385735D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685632088; bh=/FX64YTGsE5ZWHs94fINnhLip9Q6PbOs5SYBpFDwzOc=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=CdaChX8t5e2Zb3P6fIyOTdxHfnK9uE2eT1+EyIcCLymSTzu5EWDKmJfkxIdi6z8zi voCSgN6pzUPV8tAL4gaA+MsQM32IT5HYCw771HtNB4nCe+kOPn4tB+pCij1MxvNLQN 9ReQv969wgWXx+rJrZL9v/8ITamTetqnhKFw8fs8= 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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767513371754582676?= X-GMAIL-MSGID: =?utf-8?q?1767513371754582676?= 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. + +