220 39425 <CALmDwq1c8__QT0t3Xk_-tEE+nkuxP7+HT75HAfeRWY_sY0EAGw@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Nicolas Lesser <blitzrakete@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Contract attributes and trailing return types
Date: Thu, 26 Jul 2018 15:03:39 -0700
Lines: 102
Approved: news@gmane.org
Message-ID: <CALmDwq1c8__QT0t3Xk_-tEE+nkuxP7+HT75HAfeRWY_sY0EAGw@mail.gmail.com>
References: <b39be2a8-c0c4-4887-a4ad-d11a50107aa9@isocpp.org>
 <CALmDwq3o0_8STpgWt6NVQ1eejD-krUefpJkk=rDmkOK-co-1LQ@mail.gmail.com> <08e4fce4-e6c6-4dc2-a9ca-098f1ed8b380@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="000000000000a48ad10571ee2baf"
X-Trace: blaine.gmane.org 1532642511 17466 195.159.176.226 (26 Jul 2018 22:01:51 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 26 Jul 2018 22:01:51 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDXKNLEUTADRBSEK5HNAKGQEUAMXOWI@isocpp.org Fri Jul 27 00:01:47 2018
Return-path: <std-proposals+bncBDXKNLEUTADRBSEK5HNAKGQEUAMXOWI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi0-f69.google.com ([209.85.218.69])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDXKNLEUTADRBSEK5HNAKGQEUAMXOWI@isocpp.org>)
	id 1fioKN-0004KD-BM
	for gclcip-std-proposals@m.gmane.org; Fri, 27 Jul 2018 00:01:43 +0200
Original-Received: by mail-oi0-f69.google.com with SMTP id j17-v6sf2539215oii.8
        for <gclcip-std-proposals@m.gmane.org>; Thu, 26 Jul 2018 15:03:54 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1532642633; cv=pass;
        d=google.com; s=arc-20160816;
        b=o7uBK28Jj5q9yPrLK5RJMSICLFiwRvXsY0OfMd6HVxFVzZ0mnuTIKLD3qhL02tzQsI
         tk/rPWjSGt8zmLrl5X3dtO4vhPD8XwpLYAskz8dSZv7Bn8zwo6ygXGtMrZOUu1Ayufdx
         tofNx1yWXOaQVQ5d6hmfS542jzUnrt5ZXIjmHi45ztqiwtqNTybdmEPfRMZp1m21h6n4
         QJqTSr++XROZ4Yf4qWywMKI21V+yt95CJN5TPQd7rW5WszcVd0pgzJjf7jbIJFUNiyFz
         y8KELJBuAOI+XZH/2BingyLd1uF0jyFTFmx7vripGguUmqeaiGUxhiGee+0arS0i6+87
         sQrA==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date
         :from:in-reply-to:references:mime-version:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=DO138Ca/A73IENvExVyOOZzn+MPIX+SjkJRKe7QoylI=;
        b=KV9DWr3TcxVApyLPwHc9VoAWS5WVU83Wyg8+H2O5xR/XV5oL5xDxaKrohXfxE0K2R9
         krmysnKGvG1he5eXMNIxxfY2SHaQV5kYCP//3tlgyTcaKpk8ckvwqVWqalCuOQC9rZvp
         AzkaKHKsQBvaJrLiOGQd47cDJBY0kcOd0EEhigEet+F/eiI2SMWYExIA85SawUPvxVed
         eURZCTONv1E0+DBFuaR7D1tfvHqhbBzXAGYD0leVilDwmKoDwZQS83dW/OF/2G6Q6nEo
         JMevKLlIYY5K5WpG8L0oxw0LZHtwwPtS5kIPpwlTfDgIb34Gx3T2NjIeki+mOdJm5Eem
         Sa2Q==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b="d8Rgvmo/";
       spf=pass (google.com: domain of blitzrakete@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=blitzrakete@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:references:in-reply-to:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=DO138Ca/A73IENvExVyOOZzn+MPIX+SjkJRKe7QoylI=;
        b=ikxN7BU7kmZ0DRNdSf5GV8IiueHJzmud1DkQEGEXaLpO9iQ99bN570wXqx4kH0ZUb+
         q/LlEEJQFqbC4VLz4bHemc8pVBYEZmD9OVPOEUUkH+5Xk10ZcO/vI4JEMS8Uws8SfdnR
         O6rBnAcd7qkbeBKBXDGMJuH1Z5uspf5a3yXn65wGa1VqPMLEFqR0jzA+xZHnHYGZ265T
         3gUg/ZOs11WPafTMsgUQkAHcP57OFCPQCAT9m2GtxUSKXjLCb5AvmWGwsYBKIJfbiRIx
         1OBRHbnbqAd3hVDTCw4ElJ4PvfSTJ2xAJBL/ZQeOdpx5OZ7BGUDcBIeRcZSbuXjqg8wz
         umKw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:references:in-reply-to:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=DO138Ca/A73IENvExVyOOZzn+MPIX+SjkJRKe7QoylI=;
        b=pqBrr47Db1ur97/QhGGQKGPmi7o0jKOnc43NRgU9ZNt3WyNkDG15+LuwianUEtMlEj
         oooad6vWzbrJnDBfSkUbjIHMzp/AGm8R8I4OEzXTyPAJ6UG4jHSukKyf7JMF5VbOSXhX
         4I1YnZ9YkbgS6Dzs2OeH5RXZA0HfTAgwExeAvA5V6mYfw26gaBOEulxOO44cBLPeV39S
         8/z0wgoZwuBQNmrQCu8KFgh37ihrYsg/i+tvHmVDOVdgxynX0ALIBVORqIRUP6wX8F/n
         Aqb2s3d3GpJQIJ6hofSZA/aaWOtjBK8H3cjH8I9Mf0gaVa01mVVFWWwrn8cLYPsETpZn
         YIsw==
X-Gm-Message-State: AOUpUlF+FXXB+oX15Mmh6JX6VTutWmQL5qDHl10koWHv9P5DLY/WHrdE
	H0TA/6S46dqYgOl9EdAIJLPhcA==
X-Google-Smtp-Source: AAOMgpc88gXJATubMmaqDjfYIIk/XuoGBCoC1lhxD85AOSieODz3MGxxlIGXYEE7iOxcjZTBQkJxHw==
X-Received: by 2002:aca:b244:: with SMTP id b65-v6mr2227016oif.83.1532642633589;
        Thu, 26 Jul 2018 15:03:53 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a54:4388:: with SMTP id u8-v6ls1027508oiv.6.gmail; Thu, 26
 Jul 2018 15:03:52 -0700 (PDT)
X-Received: by 2002:aca:3ad4:: with SMTP id h203-v6mr3791876oia.294.1532642632558;
        Thu, 26 Jul 2018 15:03:52 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1532642632; cv=none;
        d=google.com; s=arc-20160816;
        b=RltXwqwlhxKDrVUclK55pN58+pRbZvToW6GK8/SsbYroeAcYc0W46Om4sTtLtCmZn6
         Xj6wt8HxLrOHjeDpzM9MxxQQXPtuEESOwzeHMEE2ECSEKh2AkxEK9LWS2tkeeRZ7udZQ
         c3W0MdCavmIlU7i+Bq77tmD+iqrUQy12SvReCqbJ+6USfx223RcNYW/I87v7zcuXUZHp
         W4G1JYh+vDjPC16JCuwefD5ib8++V4Rq2fvAOU3KPCmccLNbpdDyJQ687054/KVbamrV
         XrAPru4zxLMTRWqRj/R12dgS6B1uyNUnjinlG6bpTRoPJ+u6eoxZmDBmFJvsuocYmK2H
         RKCA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:in-reply-to:references:mime-version
         :dkim-signature:arc-authentication-results;
        bh=qhyNbYJwR9SWOaXFX37bcca6jJWM38W018RsMEliyeQ=;
        b=rY0Uo6G8u/Q6+4RKeqEsNBueXchIZo7k/oQntJsXfsek9sc1i66TnluU+pFOJIkRja
         sZ7lD/rNZDS3DdxWwKBpTQLsV/78XpMjO0/Vn7l4zZxQvJZIBK3ePP8655AH8ddVcspe
         i9rtTGpzhtwDlhLAcKIHDJbfzAv9xdcVx8um1hOCfvUjyOVo8WSnXRtc9ul6idOh1THG
         ghkuw0UGXPScDrYrWObc6WO13ER2gQWc5zfNH03VLg4ua8UYllCidE4lt3OGbGfjSaUe
         UYPLrV2AVgKjzPyzAqDxP+EY+RxALn/74rIqoy0nMzJ0Pqq/DuXRXOjogpZhnh8ozV6x
         pUAg==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b="d8Rgvmo/";
       spf=pass (google.com: domain of blitzrakete@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=blitzrakete@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Original-Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
        by mx.google.com with SMTPS id y11-v6sor1393504oix.10.2018.07.26.15.03.52
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Thu, 26 Jul 2018 15:03:52 -0700 (PDT)
Received-SPF: pass (google.com: domain of blitzrakete@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 2002:aca:f305:: with SMTP id r5-v6mr4117859oih.230.1532642631909;
 Thu, 26 Jul 2018 15:03:51 -0700 (PDT)
In-Reply-To: <08e4fce4-e6c6-4dc2-a9ca-098f1ed8b380@isocpp.org>
X-Original-Sender: blitzrakete@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b="d8Rgvmo/";       spf=pass
 (google.com: domain of blitzrakete@gmail.com designates 209.85.220.41 as
 permitted sender) smtp.mailfrom=blitzrakete@gmail.com;       dmarc=pass
 (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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:39425
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/39425>

--000000000000a48ad10571ee2baf
Content-Type: text/plain; charset="UTF-8"

Ah, didn't know that "appertain" means that. Thanks for correcting me :)

On Thu, Jul 26, 2018 at 3:01 PM Nicol Bolas <jmckesson@gmail.com> wrote:

>
>
> On Thursday, July 26, 2018 at 5:49:24 PM UTC-4, Nicolas Lesser wrote:
>>
>> Attributes with trailing return type generally suffer from this problem:
>>
>> auto f(int x, int y) [[deprecated]] -> int;
>>
>> If you don't mind, you can put the contracts before, just like we
>> normally do with attributes:
>>
>> [[expects: x>0]]
>> [[expects: y!=0]]
>> [[ensures result: result > x+y]]
>> auto f(int x, int y) -> int;
>>
>
> Not according to P0542. Contracts "appertain to the function type", so
> they can't be prefixed.
>
> --
> 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
> email 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/08e4fce4-e6c6-4dc2-a9ca-098f1ed8b380%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/08e4fce4-e6c6-4dc2-a9ca-098f1ed8b380%40isocpp.org?utm_medium=email&utm_source=footer>
> .
>

-- 
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 email 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/CALmDwq1c8__QT0t3Xk_-tEE%2BnkuxP7%2BHT75HAfeRWY_sY0EAGw%40mail.gmail.com.

--000000000000a48ad10571ee2baf
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Ah, didn&#39;t know that &quot;appertain&quot; means that.=
 Thanks for correcting me :)</div><br><div class=3D"gmail_quote"><div dir=
=3D"ltr">On Thu, Jul 26, 2018 at 3:01 PM Nicol Bolas &lt;<a href=3D"mailto:=
jmckesson@gmail.com">jmckesson@gmail.com</a>&gt; wrote:<br></div><blockquot=
e class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc sol=
id;padding-left:1ex"><div dir=3D"ltr"><br><br>On Thursday, July 26, 2018 at=
 5:49:24 PM UTC-4, Nicolas Lesser wrote:<blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:=
1ex"><div dir=3D"ltr">Attributes with trailing return type generally suffer=
 from this problem:<div><br></div><div>auto f(int x, int y) [[deprecated]] =
-&gt; int;</div><div><br></div><div>If you don&#39;t mind, you can put the =
contracts before, just like we normally do with attributes:</div><div><br><=
/div><div><div>[[expects: x&gt;0]]</div><div>[[expects: y!=3D0]]</div><div>=
[[ensures result: result &gt; x+y]]</div></div><div>auto f(int x, int y) -&=
gt; int;</div></div></blockquote><div><br></div><div>Not according to P0542=
.. Contracts &quot;appertain to the function type&quot;, so they can&#39;t b=
e prefixed.</div><br></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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">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/08e4fce4-e6c6-4dc2-a9ca-098f1ed8b380%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/08e4fce4-e6c6-=
4dc2-a9ca-098f1ed8b380%40isocpp.org</a>.<br>
</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/CALmDwq1c8__QT0t3Xk_-tEE%2BnkuxP7%2BH=
T75HAfeRWY_sY0EAGw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CALmDwq1c8__Q=
T0t3Xk_-tEE%2BnkuxP7%2BHT75HAfeRWY_sY0EAGw%40mail.gmail.com</a>.<br />

--000000000000a48ad10571ee2baf--

.
