220 34242 <CA+fGSbMS_aR8n6MSaRHNYh6vO+Wxtb4KiKnWs9t2AvrE9otE=w@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Ricardo Fabiano de Andrade <ricardofabianodeandrade@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: constexpr only functions: arbitrary literal types
 for non-type, constexpr arguments, is_constexpr...
Date: Thu, 31 Aug 2017 17:22:49 -0500
Lines: 165
Approved: news@gmane.org
Message-ID: <CA+fGSbMS_aR8n6MSaRHNYh6vO+Wxtb4KiKnWs9t2AvrE9otE=w@mail.gmail.com>
References: <17e156a0-0368-4ec0-a087-e8b4bc8d9f62@isocpp.org>
 <CA+fGSbMtnehJhDx3Bz_GfxsqyrK_ch5hes7aGZqnufrimtG=gQ@mail.gmail.com> <635c6793-0bb8-4407-b890-04ab33d1fe8b@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="001a1140c1d6ac68370558141507"
X-Trace: blaine.gmane.org 1504218179 22104 195.159.176.226 (31 Aug 2017 22:22:59 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 31 Aug 2017 22:22:59 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCJN7V7TRQMBBOUYULGQKGQERPVEVYQ@isocpp.org Fri Sep 01 00:22:54 2017
Return-path: <std-proposals+bncBCJN7V7TRQMBBOUYULGQKGQERPVEVYQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pg0-f70.google.com ([74.125.83.70])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCJN7V7TRQMBBOUYULGQKGQERPVEVYQ@isocpp.org>)
	id 1dnXrJ-00054e-87
	for gclcip-std-proposals@m.gmane.org; Fri, 01 Sep 2017 00:22:45 +0200
Original-Received: by mail-pg0-f70.google.com with SMTP id t3sf2188751pgt.14
        for <gclcip-std-proposals@m.gmane.org>; Thu, 31 Aug 2017 15:22:52 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1504218172; cv=pass;
        d=google.com; s=arc-20160816;
        b=Xt6dUW09oIyDQDstwmhYwTq/CD2jAJDVXy4s8+CoicMsZGtp8KNVB+BbMEq/y4BmPZ
         3XURJx34V+79DuYcDjcHU7kZ/SSIuS3bwKiYPGExlOIvvPy+OlLrOcqqhK/9rdkz29zO
         qckSFuypu7siX10eLd60LZ4rCxboKP2mpxaMBRx2PQU2p2KvWbppGaHBLNYXuJoyKQiy
         fOIk0FWWYzwkEKt5o0UhyniXg7mJnqjbQrO8sbXOVxbVkIYTmlxfxkl+JdemEq8ZdQUh
         B8E08l1Cn+GuSw6FrVM/3og36ZgBcgHrgYXxRy/LWvlB6b2xWloeXn9NhjKIyICvINut
         1+cg==
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:references:in-reply-to:mime-version:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=1V8pMzIZLkwiuzjq4rM4w6pXFkqeaMm0Q/xgkgQIElw=;
        b=RU5lOXDm+6PEhSnr6R0iyplaMvl0dLZ9vB0Qz3vK7FWuB+JB0bw5NrDlBN2VKY7e3L
         xlK4jbw119JwNSQ0rMBXUE/L0/gqxvXB3OwJluHbIP96vK6BMDjwyJylZ2To6XkdK/X4
         sr0MnsxMTJoADy++iAULGI8FPZwWTWSfgYOTjMjfZoU470aPdNE0VjYOFcd2aBWaH9pC
         g/1mxZPs8SdqouFfnnBmk86ijWfkVC/GjYYo+QuDKGA/Og6yCGVsMA1noSdK/TLj8NsP
         h1w8nUE27guqsBsLAGmGNPgWEDvfWxmcl0n1EyRqsx+dPyTyoEgKNuB0c/VFKPbWrNO+
         GvjQ==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=a/72S/Lc;
       spf=pass (google.com: domain of ricardofabianodeandrade@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=ricardofabianodeandrade@gmail.com;
       dmarc=pass (p=NONE sp=NONE 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:in-reply-to:references: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=1V8pMzIZLkwiuzjq4rM4w6pXFkqeaMm0Q/xgkgQIElw=;
        b=H512QFiUIVhkHRVzRdkBcsJSKQi3mxjJJdVIVHh7tPZx8PZuZ5ZTxhHpCUi/RKyypu
         P2P5FQ/7kWuYyHdpxPtkvdHvKC+oyhbxu9pFsLVvWcvJqcbT/sdQ/jxsXcdfx9yjpY3g
         bZRZYDqssT5AZNYCIUIUPoxKirhQHEcDk63ypfoDRxr1fO9f7Ui6fr2aXT4dr/Kl+jcz
         KBYq82YfnBvywOLOCOe1LsxurD2nx429uxq35SnOzwaFsRpyEMToLZm6azPoSkkO+fxo
         eFi9X7GU44gb6U7IRDz/kVQ8cnhuT2iHa4XwUqW1V8Xx8vxmO6SbI/urwUauA+/f8L5m
         tLaA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:in-reply-to:references: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=1V8pMzIZLkwiuzjq4rM4w6pXFkqeaMm0Q/xgkgQIElw=;
        b=i9hwz3gvWFaqtHkzhx6XBTYWQ+jVWqQ4UwujIn7R9JRjzg6xqUyD9SuxtJwyJzLwQI
         1J0FIbLi5wwO4rN9FvQLe8AJq9+bOsfRTayo7biuPwGeg3V+S6i2grEhhxbCE0LYIhQo
         +DCIZ9WOnRhwIQzRGE7zn1KPoBudt8m7YVHaiWhsR+owLgJG8TwB133BCyKjANlHOgGc
         Ns5dAwDXDtYtQW5EnothQAYlXnt3QLZ5cZWWZRFeGfpi1BBQxf/Aqdcgsezvuj7or1jh
         B++Zxw++qrvUEmKINyfXVxPX7BPElUw/UV/sKAKIsPQY27Bs/bMn3OMRDan9yHMc73Um
         cBYg==
X-Gm-Message-State: AHYfb5jHGbS7NTfi1FLYiX7q0WYR8Ukxo9rqjQcaVH6DsQ4/fppPEMUB
	mdgAkPEV402jIN9K
X-Google-Smtp-Source: ADKCNb4GMFmakJIS2/tCbpSWfHpawlAhdBKbZ5JNLd7tyUG+O/ELoX76L8/Tt1HbAkaUmMB0K48QGA==
X-Received: by 10.99.0.7 with SMTP id 7mr2773009pga.128.1504218171913;
        Thu, 31 Aug 2017 15:22:51 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.37.207 with SMTP id l198ls459812iol.33.gmail; Thu, 31 Aug
 2017 15:22:50 -0700 (PDT)
X-Received: by 10.107.31.147 with SMTP id f141mr591277iof.177.1504218170298;
        Thu, 31 Aug 2017 15:22:50 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1504218170; cv=none;
        d=google.com; s=arc-20160816;
        b=ix+3WYQFNVIC3jLnyghkY7wspRplEdK40CQWi3F3MT7tbc13gHJW+6TOHenRR7bb8g
         H8AZQt1jEDnj0GQOpar2xHunEgAT6hO/9MQyYK75SVVO9+402yMFB5Tx/Pj+C/XTZOUW
         657VMPLIN+j5T+bwdwzCaydfSVU/AObLy4EkPOdNw/L0AZ9qXOrILC/3hjtjaWFzd/BA
         6GDt/2zj1SJ8ySnrE2rrjlCeIumegq2wFFAn+0rOo/b9bcvqlI7jEDNmYFDkY5w7Ui+e
         4H/ICSV3WVdaBWEx95ChYnA5PPEDx1UQjlpHZxu7c0AP+a7Vn+Dx6zOmXtLyRezIsJq7
         DDew==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:references:in-reply-to:mime-version
         :dkim-signature:arc-authentication-results;
        bh=APvUj3dgHA07RKZfirhPdNd7a8U2RvrbUhsM9v4FB2E=;
        b=n/DlwG/vR2qbqkah7yACWuoaVD2VaWCH0tDLzWodWAki3WjC/uedIfiahsALeceBqM
         UUuncR2nJuvso5vyfc/odAvCgpEo4GnzpAF4x3owfRSBtB1qVAD4e7INUrd+iKFTV4zj
         MWHv2IY06/Oe7rjgAeZ5n+JZU+cOoLf2fx6MZ31rQ+nMajtWuFLEiPZFkdk4Nmsae/lh
         3yla83ELaxboJD9xYxjg9zbB7+b1pIsg3+dlsktwGqCpqS5oKk5hzYy15ID9pPscZsKX
         +mTbday7Br1/ClXHcGBVJT+kfDLj2+m9IK/L1zz4xe1KajkChHwfmvXZZQWSdU+Z/lwq
         IrjA==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=a/72S/Lc;
       spf=pass (google.com: domain of ricardofabianodeandrade@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=ricardofabianodeandrade@gmail.com;
       dmarc=pass (p=NONE sp=NONE 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 y14sor55612iof.18.2017.08.31.15.22.50
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Thu, 31 Aug 2017 15:22:50 -0700 (PDT)
Received-SPF: pass (google.com: domain of ricardofabianodeandrade@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 10.107.32.14 with SMTP id g14mr6763472iog.147.1504218169762;
 Thu, 31 Aug 2017 15:22:49 -0700 (PDT)
Original-Received: by 10.107.13.14 with HTTP; Thu, 31 Aug 2017 15:22:49 -0700 (PDT)
In-Reply-To: <635c6793-0bb8-4407-b890-04ab33d1fe8b@isocpp.org>
X-Original-Sender: ricardofabianodeandrade@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=a/72S/Lc;       spf=pass
 (google.com: domain of ricardofabianodeandrade@gmail.com designates
 209.85.220.41 as permitted sender) smtp.mailfrom=ricardofabianodeandrade@gmail.com;
       dmarc=pass (p=NONE sp=NONE 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-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:34242
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/34242>

--001a1140c1d6ac68370558141507
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Thu, Aug 31, 2017 at 4:32 PM, Bastien Penavayre <swac31@gmail.com> wrote=
:

> Le jeudi 31 ao=C3=BBt 2017 22:17:41 UTC+2, Ricardo Andrade a =C3=A9crit :
>>
>> Very interesting proposal. Looking forward to hearing additional feedbac=
k
>> from others, I hope it moves forward.
>>
> Thanks.
>
>> Simple syntax question: why not placing constexpr() next to where
>> noexcept() is, at the end of the function declaration/definition?
>>
> That's a good question. I'm not opposed to the idea but my motivation was
> the following:
>
> To make as little change as possible to the existing grammar.
> As of now constexpr is a front specifier for function/members, tail
> specifier for lambdas and syntactically I'm only expending it, i'm not
> creating something new.
> auto func() constexpr; //invalid now
>
>  | This alternative seems more consistent, even with lambda functions
> examples.
> You can notice that it's the case with the lambdas in my exemple and I
> agree,
> but for now lambdas and functions/methods don't have the same syntax to
> express their constexpr-ness.
> A Proposal to correct this wouldn't be affected by this proposal.
>
> On a more design oriented front, as constexpr would allow "specialization=
"
> I feel like it's not a bad idea to put it at the front of the function, t=
o
> make it more visible.
>
> I hope I've answered your question correctly.
> If you have any other, please, feel free to ask.
>

I was interested in the motivation behind your choice and after the
explanation I am more open to it.
I'll be following the thread.

> --
> 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/635c6793-0bb8-4407-
> b890-04ab33d1fe8b%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/635c6793-0b=
b8-4407-b890-04ab33d1fe8b%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er>
> .
>

--=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/CA%2BfGSbMS_aR8n6MSaRHNYh6vO%2BWxtb4KiKnWs9t2Avr=
E9otE%3Dw%40mail.gmail.com.

--001a1140c1d6ac68370558141507
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>On Thu, Aug 31, 2017 at 4:32 PM, Bastien Penavayre <s=
pan dir=3D"ltr">&lt;<a href=3D"mailto:swac31@gmail.com" target=3D"_blank">s=
wac31@gmail.com</a>&gt;</span> wrote:<br></div><div><div class=3D"gmail_ext=
ra"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"m=
argin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left=
:1ex"><div dir=3D"ltr">Le jeudi 31 ao=C3=BBt 2017 22:17:41 UTC+2, Ricardo A=
ndrade a =C3=A9crit=C2=A0:<blockquote class=3D"gmail_quote" style=3D"margin=
:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"=
><div dir=3D"ltr">Very interesting proposal. Looking forward to hearing add=
itional feedback from others, I hope it moves forward.</div></blockquote><d=
iv>Thanks.</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0=
px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=
=3D"ltr"><div>Simple syntax question: why not placing constexpr() next to w=
here noexcept() is, at the end of the function declaration/definition?</div=
></div></blockquote><div>That&#39;s a good question. I&#39;m not opposed to=
 the idea but my motivation was the following:</div><div><br></div><div>To =
make as little change as possible to the existing grammar.<br>As of now con=
stexpr is a front specifier for function/members, tail specifier for lambda=
s and syntactically I&#39;m only expending it, i&#39;m not creating somethi=
ng new.<br><div class=3D"gmail-m_5290521880339823116prettyprint" style=3D"b=
ackground-color:rgb(250,250,250);border-color:rgb(187,187,187);border-style=
:solid;border-width:1px;word-wrap:break-word"><code class=3D"gmail-m_529052=
1880339823116prettyprint"><div class=3D"gmail-m_5290521880339823116subprett=
yprint"><span style=3D"color:rgb(0,0,136)" class=3D"gmail-m_529052188033982=
3116styled-by-prettify">auto</span><span style=3D"color:rgb(0,0,0)" class=
=3D"gmail-m_5290521880339823116styled-by-prettify"> func</span><span style=
=3D"color:rgb(102,102,0)" class=3D"gmail-m_5290521880339823116styled-by-pre=
ttify">()</span><span style=3D"color:rgb(0,0,0)" class=3D"gmail-m_529052188=
0339823116styled-by-prettify"> </span><span style=3D"color:rgb(0,0,136)" cl=
ass=3D"gmail-m_5290521880339823116styled-by-prettify">constexpr</span><span=
 style=3D"color:rgb(102,102,0)" class=3D"gmail-m_5290521880339823116styled-=
by-prettify">;</span><span style=3D"color:rgb(0,0,0)" class=3D"gmail-m_5290=
521880339823116styled-by-prettify"> </span><span style=3D"color:rgb(136,0,0=
)" class=3D"gmail-m_5290521880339823116styled-by-prettify">//invalid now</s=
pan></div></code></div><span class=3D"gmail-m_5290521880339823116styled-by-=
prettify" style=3D"background-color:rgb(250,250,250);color:rgb(136,0,0)"><b=
r></span></div><div>=C2=A0| This alternative seems more consistent, even wi=
th lambda functions examples.</div><div>You can notice that it&#39;s the ca=
se with the lambdas in my exemple and I agree,</div><div>but for now lambda=
s and functions/methods don&#39;t have the same syntax to express their con=
stexpr-ness.</div><div>A Proposal to correct this wouldn&#39;t be affected =
by this proposal.</div><div><br></div><div>On a more design oriented front,=
 as constexpr would allow &quot;specialization&quot; I feel like it&#39;s n=
ot a bad idea to put it at the front of the function, to make it more visib=
le.</div><div><br></div><div>I hope I&#39;ve answered your question correct=
ly.</div><div>If you have any other, please, feel free to ask.</div></div><=
/blockquote><div><br></div><div>I was interested in the motivation behind y=
our choice and after the explanation I am more open to it.</div><div>I&#39;=
ll be following the thread.</div><blockquote class=3D"gmail_quote" style=3D=
"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-le=
ft:1ex"><span class=3D"gmail-HOEnZb"><font color=3D"#888888">

<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@<wbr>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/635c6793-0bb8-4407-b890-04ab33d1fe8b%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/635c=
6793-0bb8-4407-<wbr>b890-04ab33d1fe8b%40isocpp.org</a><wbr>.<br>
</font></span></blockquote></div><br></div></div></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/CA%2BfGSbMS_aR8n6MSaRHNYh6vO%2BWxtb4K=
iKnWs9t2AvrE9otE%3Dw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoote=
r">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CA%2BfGSbMS=
_aR8n6MSaRHNYh6vO%2BWxtb4KiKnWs9t2AvrE9otE%3Dw%40mail.gmail.com</a>.<br />

--001a1140c1d6ac68370558141507--

.
