220 14118 <d1d1b52c-2260-4adb-a3d7-171ecb91549d@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: =?UTF-8?Q?Germ=C3=A1n_Diago?= <germandiago@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Again on constexpr stuff
Date: Wed, 22 Oct 2014 04:55:05 -0700 (PDT)
Lines: 93
Approved: news@gmane.org
Message-ID: <d1d1b52c-2260-4adb-a3d7-171ecb91549d@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_3842_1606298177.1413978905985"
X-Trace: ger.gmane.org 1413978915 30312 80.91.229.3 (22 Oct 2014 11:55:15 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 22 Oct 2014 11:55:15 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDC2VXM4YYDRBG5WT2RAKGQEVBLZX2Q@isocpp.org Wed Oct 22 13:55:10 2014
Return-path: <std-proposals+bncBDC2VXM4YYDRBG5WT2RAKGQEVBLZX2Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pa0-f71.google.com ([209.85.220.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDC2VXM4YYDRBG5WT2RAKGQEVBLZX2Q@isocpp.org>)
	id 1XguVS-0008AR-5y
	for gclcip-std-proposals@m.gmane.org; Wed, 22 Oct 2014 13:55:10 +0200
Original-Received: by mail-pa0-f71.google.com with SMTP id rd3sf7663699pab.6
        for <gclcip-std-proposals@m.gmane.org>; Wed, 22 Oct 2014 04:55:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:subject:mime-version:x-original-sender
         :reply-to:precedence:mailing-list:list-id:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe:content-type;
        bh=kKAhUsCEKM44tPFaTL3C7r0BK4zYDft7szpZjEFayZg=;
        b=hxV9oHdtGPntlYmggYF8a2P5ffe0XUWfgoQsQ2fq6yWOxrFnEOsVRXAsla1Q1tDgov
         XB4UKzIRIrpBa73IICz/0/YzIXINlSjvXHv3+vfK4zrCar+D0Hp1sUudRoiB2koxMZQm
         +dKNPkp/EVHLca5iu0VKeWA9GhVxzpyXF8ZJus7CCn/RWD7CIgMavdubeeItGZh8xFar
         XlMLQKP/waOFoxjJD6ZaW3wI3LHXy7YYZxvqJlZvj809CvcP9/r5kf4zxFrgX8Ooz7gm
         jPY5ctqZLTtF4HPqOZczFmtf3cHlNYa/UdQgJWe1/0pgqPPN20hWd77MJ1iMTC13w8Yo
         txzw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=kKAhUsCEKM44tPFaTL3C7r0BK4zYDft7szpZjEFayZg=;
        b=Ux7M6s6shV57uv2Ou8t2EqTLgp4bvjk/OPZGWqypbjIIB7Jq9vDwPrB6ChMMDd1w6p
         GNMz2dMPy9aFggFD3paDOVjvMCZl7YUsMdorA3tG1ipPwJgcrkB01qC9ISoltq9T8FDO
         n465ZXjkut5FgsxAZ0noyjsBMW4ri2BaSC51pkEOkYdbepg7pJYTzfRmKORD/Z/x0NVo
         fNgPNgxQyWJvzrWVMiH4pIwxbP5ImSw74GZolRYAixMObZdDkR/G0of/PvjJgFdkiPoK
         sFJmdOJvJWSEVz67W8eoQ11LbHqIfU9m0j5k/Ozpivirw8B5bnFOkRydaBrvd+C6xgtI
         s+6A==
X-Gm-Message-State: ALoCoQm1CHPfivTk88EX10+adqbHRdPOvHrdmdUkaxiKSok8h00orEt4TFkdEZQacuy+LaqXEBmJ
X-Received: by 10.66.139.167 with SMTP id qz7mr26736080pab.23.1413978908459;
        Wed, 22 Oct 2014 04:55:08 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.165.144 with SMTP id o138ls522621ioe.8.gmail; Wed, 22 Oct
 2014 04:55:07 -0700 (PDT)
X-Received: by 10.50.4.103 with SMTP id j7mr58102igj.11.1413978907690;
        Wed, 22 Oct 2014 04:55:07 -0700 (PDT)
X-Original-Sender: germandiago@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: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://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>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:14118
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/14118>

------=_Part_3842_1606298177.1413978905985
Content-Type: text/plain; charset=UTF-8

Hello, 

Looking at the video from cppcon2014 from Nicolas Josuttis, he mentions 
about constexpr:

https://www.youtube.com/watch?v=tCM4wP-dWic


There are no guidelines for applying constexpr right now.
There is added value in keeping the flexibility of choice about being able 
to use a function as constexpr.

My concern is the following. If there are no rules yet, because they find 
it too difficult,
I don't know why they don't fix the language directly with the following 
proposition:

- Constexpr should be used only when calling a function. Functions should 
not be annotated with constexpr.

1. Is this technically feasible? I see some problems: constexpr functions 
are a subset of the language, the
compiler would have to detect implementation. I don't know if this is a 
showstopper. 

I just know that D language does that. How? They allow to use
a function at compile time:

enum val = myNonAnnotatedWithConstexprFunc();

Maybe one problem is that you must expose potentially "constexpr" functions 
in header files, but once modules
kick in, should this be a problem?

I think there is potential value in fixing this. 

Thanks for your time.

-- 

--- 
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_3842_1606298177.1413978905985
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hello,&nbsp;<div><br></div><div>Looking at the video from =
cppcon2014 from Nicolas Josuttis, he mentions about constexpr:</div><div><b=
r></div><div>https://www.youtube.com/watch?v=3DtCM4wP-dWic<br></div><div><b=
r></div><div><br></div><div>There are no guidelines for applying constexpr =
right now.</div><div>There is added value in keeping the flexibility of cho=
ice about being able to use a function as constexpr.</div><div><br></div><d=
iv>My concern is the following. If there are no rules yet, because they fin=
d it too difficult,</div><div>I don't know why they don't fix the language =
directly with the following proposition:</div><div><br></div><div>- Constex=
pr should be used only when calling a function. Functions should not be ann=
otated with constexpr.</div><div><br></div><div>1. Is this technically feas=
ible? I see some problems: constexpr functions are a subset of the language=
, the</div><div>compiler would have to detect implementation. I don't know =
if this is a showstopper.&nbsp;</div><div><br></div><div>I just know that D=
 language does that. How? They allow to use</div><div>a function at compile=
 time:</div><div><br></div><div>enum val =3D myNonAnnotatedWithConstexprFun=
c();</div><div><br></div><div>Maybe one problem is that you must expose pot=
entially "constexpr" functions in header files, but once modules</div><div>=
kick in, should this be a problem?</div><div><br></div><div>I think there i=
s potential value in fixing this.&nbsp;</div><div><br></div><div>Thanks for=
 your time.</div><div><br></div></div>

<p></p>

-- <br />
<br />
--- <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 />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_3842_1606298177.1413978905985--

.
