From patchwork Mon Feb 17 13:22:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1239226 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=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-519643-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha1 header.s=default header.b=bCc+hFxl; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=K1IPFRrR; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Ll694fMlz9sRJ for ; Tue, 18 Feb 2020 00:22:56 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=p8a9ycFyWkFwsePq2s5LhhWZoq64TnT3DS3Mnvk34J1+unA1hFbPv DWDx/fZai8lZxbDySmfrqi4W9DEdaq9DSyPVaVE5CitTeXYfNDl3r8rosmkQgUWR uazfjuijZliCx2GyJzougW3Hl5v6lBpcOkpjHP78WiQY1zRmtAHu20= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=kJK3qOzAL4yOWo18CH5JXo9e58k=; b=bCc+hFxlzx2LZPK74jnp BTS744L+UQ9mGXoYEkjpOkuain08NKmiy16X6O4iy8JBMTa149yvUrgQCGpFDmZB C8jFiO3bRDZIW7bk98r5rkc0WyLUbjthucvIE1aaEK/Dckf0G5TuII8A8Gr931KM 98IDS2VsSnU1Xjl7dgfg2hM= Received: (qmail 26337 invoked by alias); 17 Feb 2020 13:22:22 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 26269 invoked by uid 89); 17 Feb 2020 13:22:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: us-smtp-1.mimecast.com Received: from us-smtp-delivery-1.mimecast.com (HELO us-smtp-1.mimecast.com) (205.139.110.120) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Feb 2020 13:22:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581945738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=k0lcGqZY3k/K4T4OrmJksIV/3pOtotq5XiL0oFvcglM=; b=K1IPFRrRaCwwsTlcNqlUURHYeUzOde9p44ewl4jWPgZgRKGTmFKkZ5dFeHBSM0T0tfh6Y5 QA/k9+nD4z+ZQKy6+buYMtCKuojJ5YiXk7NK1cGkz0PSyAlxQOaUCJrZmBeygEzSSakhXz c/wYnvLYL6B8wLC27F1hJF48sEjVg3k= 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-66-G_F00Z4wPX-jK8xxXZy_Aw-1; Mon, 17 Feb 2020 08:22:15 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F0DD8800D50; Mon, 17 Feb 2020 13:22:14 +0000 (UTC) Received: from localhost (unknown [10.33.36.167]) by smtp.corp.redhat.com (Postfix) with ESMTP id A0D385D9CA; Mon, 17 Feb 2020 13:22:14 +0000 (UTC) Date: Mon, 17 Feb 2020 13:22:13 +0000 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Make "implicit expression variants" more explicit (P2102R0) Message-ID: <20200217132213.GA1504943@redhat.com> MIME-Version: 1.0 X-Clacks-Overhead: GNU Terry Pratchett X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline * include/bits/iterator_concepts.h (indirectly_copyable_storable): Add const-qualified expression variations. * include/std/concepts (copyable): Likewise. Tested powerpc64le-linux, committed to master. commit d6dfa3dafc0a69a84002f1c0be17a70b0996cc72 Author: Jonathan Wakely Date: Mon Feb 17 13:20:57 2020 +0000 libstdc++: Make "implicit expression variants" more explicit (P2102R0) * include/bits/iterator_concepts.h (indirectly_copyable_storable): Add const-qualified expression variations. * include/std/concepts (copyable): Likewise. diff --git a/libstdc++-v3/include/bits/iterator_concepts.h b/libstdc++-v3/include/bits/iterator_concepts.h index 04c862a4b97..792b3262106 100644 --- a/libstdc++-v3/include/bits/iterator_concepts.h +++ b/libstdc++-v3/include/bits/iterator_concepts.h @@ -693,7 +693,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template concept indirectly_copyable_storable = indirectly_copyable<_In, _Out> + && indirectly_writable<_Out, iter_value_t<_In>&> && indirectly_writable<_Out, const iter_value_t<_In>&> + && indirectly_writable<_Out, iter_value_t<_In>&&> + && indirectly_writable<_Out, const iter_value_t<_In>&&> && copyable> && constructible_from, iter_reference_t<_In>> && assignable_from&, iter_reference_t<_In>>; diff --git a/libstdc++-v3/include/std/concepts b/libstdc++-v3/include/std/concepts index db614899942..acc9dd2599d 100644 --- a/libstdc++-v3/include/std/concepts +++ b/libstdc++-v3/include/std/concepts @@ -251,7 +251,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template concept copyable = copy_constructible<_Tp> && movable<_Tp> - && assignable_from<_Tp&, const _Tp&>; + && assignable_from<_Tp&, _Tp&> && assignable_from<_Tp&, const _Tp&> + && assignable_from<_Tp&, const _Tp>; template concept semiregular = copyable<_Tp> && default_initializable<_Tp>;