From patchwork Fri Jun 18 15:12:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Palka X-Patchwork-Id: 1494319 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=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=hs1YFTHc; dkim-atps=neutral Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4G62Tq6q6wz9s1l for ; Sat, 19 Jun 2021 01:12:31 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 611173AAA01B for ; Fri, 18 Jun 2021 15:12:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 611173AAA01B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1624029148; bh=CuDGxC0bQ+EJ0INEXXVVXtw72VjWKA/thc/9Rc9A2mg=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=hs1YFTHc1l7wW1jF4C3b/8n6ET1Kv7vfvjcOVUWE9xjemRno1uc9ckVd/2iERK8cV PBB0UQVpPNr8YExULlC94I625xXdEM6+E6w9hAR7fjyEdY77c+NQv2DyVQRtjIuNAd jAJ3Plya/S+mDUNA2yESxgsIyZ3PrwgncNkDQVrU= 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.133.124]) by sourceware.org (Postfix) with ESMTP id 8038E383B428 for ; Fri, 18 Jun 2021 15:12:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8038E383B428 Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-506-1TftFWvDM9W2F7iTHs5DBg-1; Fri, 18 Jun 2021 11:12:06 -0400 X-MC-Unique: 1TftFWvDM9W2F7iTHs5DBg-1 Received: by mail-qk1-f199.google.com with SMTP id o14-20020a05620a0d4eb02903a5eee61155so3572193qkl.9 for ; Fri, 18 Jun 2021 08:12:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CuDGxC0bQ+EJ0INEXXVVXtw72VjWKA/thc/9Rc9A2mg=; b=ZHFf031GxIFhDrm+oCACWhrmOPbPi4vE9wGC8L6GHinueGUT7qpGPMEEY/XVzQXSQ/ lYJ+y4vl+ijSArEUGMzvlCai9yUK5njjvpjHw6Cw9L56WBFlkkHy8LN+jrFDJIhGQjFT 5T+2KtcRD8Pw8JsjFYLlZZ+V0T5dAMd9ufPsvdbfJf4RkzxOQbhSpyCBEsc4YVeQF06P DRH19xpSxvd1Jk6BcLZSOZj/HcMGhNIBRShltCcya/8tS4J4q3CcKcl0Thi0j9192chO 0Vd4TG31nUfpD6k8Njk09hrBz5dAsQ0n8/1dvPJwCpig5Jf01p8PcnyDoNBBC1ny4h1q dRoA== X-Gm-Message-State: AOAM532fo/TCJr6nKQHqODcjRqP0DP6I36YCTySTU4oxfTQ/w+alCTQb 1CsNg+KsuUAKGaIKepNCzuzx9Bt02VGtBCTFN6gK0x0JmpcFgsAmerg+eQHPsrxMoU6d5aLGL0g ss7kejpgi4O1IFe62PYZlwm8HuCpiwHABWB+e3PtzAf5fn8ykeVeNeoC6cWJPkdZpJ3M= X-Received: by 2002:ad4:4772:: with SMTP id d18mr6200167qvx.35.1624029125590; Fri, 18 Jun 2021 08:12:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztf6tAJmjEs3QZDqiJtkxIsPWe8Zqv9XOQ5q+zqNg7cmbKdkSqFroeRitkceltPJL1yZVreQ== X-Received: by 2002:ad4:4772:: with SMTP id d18mr6200145qvx.35.1624029125329; Fri, 18 Jun 2021 08:12:05 -0700 (PDT) Received: from localhost.localdomain (ool-457d493a.dyn.optonline.net. [69.125.73.58]) by smtp.gmail.com with ESMTPSA id y18sm5320509qtj.53.2021.06.18.08.12.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Jun 2021 08:12:04 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH] libstdc++: Implement LWG 3557 change to convertible_to Date: Fri, 18 Jun 2021 11:12:01 -0400 Message-Id: <20210618151201.1703195-1-ppalka@redhat.com> X-Mailer: git-send-email 2.32.0.93.g670b81a890 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-15.3 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_LOW, RCVD_IN_MSPIKE_H4, 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-Patchwork-Original-From: Patrick Palka via Gcc-patches From: Patrick Palka Reply-To: Patrick Palka Cc: libstdc++@gcc.gnu.org Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" libstdc++-v3/ChangeLog: * include/std/concepts (convertible_to): Just use declval as per LWG 3557. --- libstdc++-v3/include/std/concepts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libstdc++-v3/include/std/concepts b/libstdc++-v3/include/std/concepts index 4490f534412..7f5421f1475 100644 --- a/libstdc++-v3/include/std/concepts +++ b/libstdc++-v3/include/std/concepts @@ -70,9 +70,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// [concept.convertible], concept convertible_to template concept convertible_to = is_convertible_v<_From, _To> - && requires(add_rvalue_reference_t<_From> (&__f)()) { - static_cast<_To>(__f()); - }; + && requires { static_cast<_To>(std::declval<_From>()); }; /// [concept.commonref], concept common_reference_with template