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 [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 6B4A438356B1 for ; Fri, 22 Jul 2022 16:21:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6B4A438356B1 Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-253-CXh8fR86NliuIGsO9ADMTw-1; Fri, 22 Jul 2022 12:21:06 -0400 X-MC-Unique: CXh8fR86NliuIGsO9ADMTw-1 Received: by mail-qv1-f72.google.com with SMTP id d18-20020a0cfe92000000b0047342562073so3289001qvs.1 for ; Fri, 22 Jul 2022 09:21:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MO3dSqSglUm2XQ7PwMNQKkvPdQjVS0k50cVT00Su12Q=; b=JAbD/G78Pn+3xdrAcRYLm8xCymoVoiwLCbdw37y8Kip8QeM7kjcdFt9mrQh5/wRaYJ VaPbNoztxus0CSZHE5HfiX1yQPDpLUhYcaP+GmgpKdDVWFfLVYe6SlJ+KT57OBAY5nWd hwusuOAZdAO2/CQeEvnDKb1fbFbxR6HD+me7yHHqCLVOHlHgnei/GxrFvJu8ITLVYWzR RnAdEutCjtmqIF13O1rhBGM7Q2yb9FNGU9qY5U5xXASq2xhDriotS+PPx3+fk+lqx9Ln 1rGIfs0JR1ePKy9vE5FklGQ8aUhTE083Fn4zXy8/OKYFb6X63xrGDuUl3+a5U80dGa+v odgw== X-Gm-Message-State: AJIora8kGK+1VqkkpjIx9dmCaGPM378wyKOH4rizkrQ/d1GbmjJDOQx5 OY7IU9OpfY+O+/omPPptSJlsQ2YFNaw4yVXRkcOQs+dOLUG3o/Wr58pXMV3hCtggtSk0z2gSNZb +VYfiE7ufYAuor8/TaccEQhLsvZdgAFM= X-Received: by 2002:a05:620a:269a:b0:6b5:b769:2591 with SMTP id c26-20020a05620a269a00b006b5b7692591mr518659qkp.293.1658506866326; Fri, 22 Jul 2022 09:21:06 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uNEpEuBR05Qeznuv0hBA6UcVn582He2DjMgAikRWyPHMKxFJlavQQdKkIGh3GBWl4NGqszstW0NQleugV9dLE= X-Received: by 2002:a05:620a:269a:b0:6b5:b769:2591 with SMTP id c26-20020a05620a269a00b006b5b7692591mr518648qkp.293.1658506866113; Fri, 22 Jul 2022 09:21:06 -0700 (PDT) MIME-Version: 1.0 References: <20220722155200.1533671-1-ppalka@redhat.com> In-Reply-To: <20220722155200.1533671-1-ppalka@redhat.com> From: Jonathan Wakely Date: Fri, 22 Jul 2022 17:20:55 +0100 Message-ID: Subject: Re: [PATCH] libstdc++: Fix backward compatibility of P2325R3 backport [PR106320] To: Patrick Palka Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jul 2022 16:21:11 -0000 On Fri, 22 Jul 2022 at 16:52, Patrick Palka via Libstdc++ wrote: > > The 11 and 10 partial backports of P2325R3, r11-9555-g92d612cccc1eec and > r10-10808-g22b86cdc4d7fdd, unnecessarily preserved some changes from the > paper that made certain views no longer default constructible, changes > which aren't required to reap the overall benefits of the paper and > which conflicted with the goal to maximize backwards compatibility with > pre-P2325R3 code. > > This patch reverts the problematic changes, specifically it relaxes > the constraints on various views' default constructors so that they > reflect only the requirements that were already implicitly imposed by > the NSDMIs of the view. Thus for example this patch retains the > default_initializable<_Vp> constraint on transform_view's default > constructor since its '_Vp _M_base = _Vp()' NSDMI already reflects this > constraint, and it removes the default_initializable<_Fp> constraint > since the corresponding member '__detail::__box<_Fp> _M_fun' doesn't > require default initializability (specializations of __box are always > default constructible). > > After reverting these changes, all static_asserts from p2325.cc that > verify lack of default constructibility now fail as expected, matching > the pre-P2325R3 behavior. > > Tested on x86_64-pc-linux-gnu, does this look OK for the 11 and 10 > branches? OK for gcc-10 and gcc-11 (with the completed ChangeLog), thanks.