220 39504 <c46dda85-6994-464b-b505-0a712ce51cb4@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: "'Hamza Sood' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Contract attributes and trailing return types
Date: Thu, 2 Aug 2018 11:51:24 -0700 (PDT)
Lines: 118
Approved: news@gmane.org
Message-ID: <c46dda85-6994-464b-b505-0a712ce51cb4@isocpp.org>
References: <b39be2a8-c0c4-4887-a4ad-d11a50107aa9@isocpp.org>
 <CALmDwq3o0_8STpgWt6NVQ1eejD-krUefpJkk=rDmkOK-co-1LQ@mail.gmail.com>
 <08e4fce4-e6c6-4dc2-a9ca-098f1ed8b380@isocpp.org> <CALmDwq1c8__QT0t3Xk_-tEE+nkuxP7+HT75HAfeRWY_sY0EAGw@mail.gmail.com>
 <CAOfiQq=2=Vuqbb6zRg3bjfr3_ZPWHO=1cDXz1FsON=eAnNzf2w@mail.gmail.com>
 <CAOHCbiuWjkdDOBstE4=qMUBrQfrRoU7wbo_-2UxQEESH2XP7ag@mail.gmail.com>
 <f0dac9d7-d139-4056-bf7f-bcad493436e0@isocpp.org>
 <c787e7ba-9c65-429b-9d53-ba8af7998963@isocpp.org>
 <9dd24044-8886-4b01-8724-0586b5ed1f55@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_373_1589672321.1533235884673"
X-Trace: blaine.gmane.org 1533235761 7107 195.159.176.226 (2 Aug 2018 18:49:21 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 2 Aug 2018 18:49:21 +0000 (UTC)
Cc: hamza_sood@me.com
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCP5NIM2SYKRBLNFRXNQKGQE5MKBXZY@isocpp.org Thu Aug 02 20:49:17 2018
Return-path: <std-proposals+bncBCP5NIM2SYKRBLNFRXNQKGQE5MKBXZY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yb0-f199.google.com ([209.85.213.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCP5NIM2SYKRBLNFRXNQKGQE5MKBXZY@isocpp.org>)
	id 1flIey-0001iz-0t
	for gclcip-std-proposals@m.gmane.org; Thu, 02 Aug 2018 20:49:16 +0200
Original-Received: by mail-yb0-f199.google.com with SMTP id w13-v6sf1854020ybk.5
        for <gclcip-std-proposals@m.gmane.org>; Thu, 02 Aug 2018 11:51:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:cc:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=DSpC02TT7Mx7V5Rzk92UXHL04cN5WfoKwEB7tM3EV8E=;
        b=ijqSF/Gwg4AwnPD/23/MQN4qcQZGAaatibGgRQzT9yETfm2DJIVFqHubh+nL46WIvW
         eiueP0YJcThNssaBUBA0pBhNfcLhERQS8M7e+sifhzwfxKEimj2qeL/mHtRFfD0gUs7i
         K2uYUcHObbW7BA83LBQAkzx7nNAoUTicTUGAP/LHc/dAbmVZHIrrUl1s/7ctqQyX+z6m
         N6GIuPHb8RZm7f2F6EddZsiwhgGfUiMmbY8J51MmSg6DZ5lbI7bFWA9jFx4NQgN64F7w
         r8brTKmAiP7baDKvotp4cFqeVZv12jfcuv+8yQtooN5BfGbDxUbgldXMZW6b5uz3gQRn
         CYag==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to
         :references:subject:mime-version:x-original-sender:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=DSpC02TT7Mx7V5Rzk92UXHL04cN5WfoKwEB7tM3EV8E=;
        b=SFcQVtc8cVfjbk4mu0WgbOrVS94e3425srA370cQ70qraxBrcV4ZtwhMJkf/dhS3i/
         FBu8mUJZmpRoz4JWmWGNREloSKX1QexpsMO+MOuvSW6sbcsx9IsYqsNCMjZcdcJFp/Qt
         4VB6BSVDf+vVYelL3GExgUa3wOJpwVal03TIztAV9/G1GsxFzCpwZW/cWrOBqWmHvK9o
         qi+yb+GC1CI9A+WEVs2fUg2RX6ASerKgWNGUIdmn99Kzihu24XwXUupwiJncdNK0T1dH
         3YlRhiRFl9a9zmZPgbADgKFd5CK6sg90qg+pbvBHZe6/I9pAYXuT0Q77f0TBY6dOU3ao
         hQIQ==
X-Gm-Message-State: AOUpUlHi1AQjmjFoWXwC5BdNplV/+U5SzBojDhqLZbZ4wDc/SarJEaWN
	BDzii9LfkKGCrQefVS5pL5XRFg==
X-Google-Smtp-Source: AAOMgpdM6j7O9yDPcrRYJXQwsLj0CZ0eQGdybQsasuexkROk3CFcVzvtY0111/SSinHN0s4sGTxLRQ==
X-Received: by 2002:a5b:3cf:: with SMTP id t15-v6mr992192ybp.10.1533235886552;
        Thu, 02 Aug 2018 11:51:26 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a0d:d414:: with SMTP id w20-v6ls528843ywd.13.gmail; Thu, 02
 Aug 2018 11:51:25 -0700 (PDT)
X-Received: by 2002:a0d:de01:: with SMTP id h1-v6mr97308ywe.3.1533235885148;
        Thu, 02 Aug 2018 11:51:25 -0700 (PDT)
In-Reply-To: <9dd24044-8886-4b01-8724-0586b5ed1f55@isocpp.org>
X-Original-Sender: hamza_sood@me.com
X-Original-From: Hamza Sood <hamza_sood@me.com>
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:39504
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/39504>

------=_Part_373_1589672321.1533235884673
Content-Type: multipart/alternative; 
	boundary="----=_Part_374_99762319.1533235884673"

------=_Part_374_99762319.1533235884673
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Right, but the current placement also conflicts with an existing meaning:=
=20
attributes at that location appertain to the function type.

On Wednesday, August 1, 2018 at 11:16:47 PM UTC+1, T. C. wrote:
>
> When there's no requires-clause, an attribute at that location already ha=
s=20
> a meaning: it appertains to some portion of the return type. For example:
>
> auto f() -> int [[meow]];  // [[meow]] is part of the type-specifier-seq;=
=20
> appertains to the type "int".
> auto y() -> int(*)() [[purr]]; // [[purr]] appertains to the type int().
>
> On Tuesday, July 31, 2018 at 3:08:40 PM UTC-4, Hamza Sood wrote:
>>
>> Would anything break if a dedicated contract-specifier-seq was added=20
>> after the requires-clause?
>>
>> It feels really messy having contracts interrupt the function type like=
=20
>> that, especially when they don=E2=80=99t really have anything to do with=
 it=20
>> (semantically anyway).
>>
>> On Friday, July 27, 2018 at 4:59:24 AM UTC+1, Nicol Bolas wrote:
>>>
>>> On Thursday, July 26, 2018 at 9:07:47 PM UTC-4, Tony V E wrote:
>>>>
>>>> How does this compare to where `requires` goes?  Is that before or=20
>>>> after the trailing return?
>>>>
>>>
>>> It appears to be after the whole thing, including the trailing return.=
=20
>>> It seems to be:
>>>
>>> Identifier/auto function_name(...) cv_qualifiers &/&& noexcept=20
>>> attributes trailing-return-type requires-clause
>>>
>>> C++'s syntax is a huge mess...
>>>
>>

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/c46dda85-6994-464b-b505-0a712ce51cb4%40isocpp.or=
g.

------=_Part_374_99762319.1533235884673
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Right, but the current placement also conflicts with an ex=
isting meaning: attributes at that location appertain to the function type.=
<br><br>On Wednesday, August 1, 2018 at 11:16:47 PM UTC+1, T. C. wrote:<blo=
ckquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-=
left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">When there&#39;s =
no requires-clause, an attribute at that location already has a meaning: it=
 appertains to some portion of the return type. For example:<div><div><br><=
/div><div>auto f() -&gt; int [[meow]];=C2=A0 // [[meow]] is part of the typ=
e-specifier-seq; appertains to the type &quot;int&quot;.</div><div>auto y()=
 -&gt; int(*)() [[purr]]; // [[purr]] appertains to the type int().</div><d=
iv><br></div><div><div>On Tuesday, July 31, 2018 at 3:08:40 PM UTC-4, Hamza=
 Sood wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left=
:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div>W=
ould anything break if a dedicated contract-specifier-seq was added after t=
he requires-clause?</div><div><br></div><div>It feels really messy having c=
ontracts interrupt the function type like that, especially when they don=E2=
=80=99t really have anything to do with it (semantically anyway).</div><br>=
On Friday, July 27, 2018 at 4:59:24 AM UTC+1, Nicol Bolas wrote:<blockquote=
 class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px =
#ccc solid;padding-left:1ex"><div dir=3D"ltr">On Thursday, July 26, 2018 at=
 9:07:47 PM UTC-4, Tony V E wrote:<blockquote class=3D"gmail_quote" style=
=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"=
><div dir=3D"ltr"><div>How does this compare to where `requires` goes?=C2=
=A0 Is that before or after the trailing return?<br></div></div></blockquot=
e><div><br></div><div>It appears to be after the whole thing, including the=
 trailing return. It seems to be:</div><div><br></div><div>Identifier/auto =
function_name(...) cv_qualifiers &amp;/&amp;&amp; noexcept attributes trail=
ing-return-type requires-clause</div><div><br></div><div>C++&#39;s syntax i=
s a huge mess...<br></div></div></blockquote></div></blockquote></div></div=
></div></div></blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/c46dda85-6994-464b-b505-0a712ce51cb4%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/c46dda85-6994-464b-b505-0a712ce51cb4=
%40isocpp.org</a>.<br />

------=_Part_374_99762319.1533235884673--

------=_Part_373_1589672321.1533235884673--

.
