220 30863 <a461e0af-67a6-491e-896f-c5d23826d407@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Nicol Bolas <jmckesson@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Detecting compile-time evaluation
Date: Fri, 10 Feb 2017 07:28:08 -0800 (PST)
Lines: 65
Approved: news@gmane.org
Message-ID: <a461e0af-67a6-491e-896f-c5d23826d407@isocpp.org>
References: <86a47916-27c3-4e29-862f-9b4e1f105c1c@isocpp.org>
 <5b081db0-cc7b-4a5f-b9fe-b9f8ae7ab9f7@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_799_139306248.1486740488864"
X-Trace: blaine.gmane.org 1486740499 15258 195.159.176.226 (10 Feb 2017 15:28:19 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 10 Feb 2017 15:28:19 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCEKFTV6ZUMBBDVY67CAKGQEOSN2AVA@isocpp.org Fri Feb 10 16:28:14 2017
Return-path: <std-proposals+bncBCEKFTV6ZUMBBDVY67CAKGQEOSN2AVA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vk0-f71.google.com ([209.85.213.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCEKFTV6ZUMBBDVY67CAKGQEOSN2AVA@isocpp.org>)
	id 1ccD7K-0003O9-2X
	for gclcip-std-proposals@m.gmane.org; Fri, 10 Feb 2017 16:28:10 +0100
Original-Received: by mail-vk0-f71.google.com with SMTP id n125sf21858760vke.0
        for <gclcip-std-proposals@m.gmane.org>; Fri, 10 Feb 2017 07:28:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to: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=Og4f86ex0w74XCzl0b3FEaKZ9Q3I+ni+jp8Zstolw9Q=;
        b=zJpjA/Bp+oi4GYuAJElr1HO/VrGE79H0pKMloJAgYT9dtWrke2RW0zbSBKRyCT/sFc
         U393++aWH8dEUuI0yE8/8VacgelAeOGn66dcsgeaxT6I9YAWl10W/u1VdDzYLL2S/elu
         0h12vgAJmJ+mWc9l1OsHohWpMI/n4H128PBS9bYzYDSl51FQJuB8W+/X6n38crH5AXWU
         DyVe0CuLEjP7nDQyH/sPyDWZ9kOdwlhNE4DFSbVKzWmkpY73+Wuo5vgLJsFO05yWdOMh
         T0Yhtniyk/QQ1IRJXsXUntOp+0UkEE3riqKBDIauszmZ8Hniv7xWlG4ynM9Jn5NseLm0
         9mHA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to: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=Og4f86ex0w74XCzl0b3FEaKZ9Q3I+ni+jp8Zstolw9Q=;
        b=oBnX3L8/SHlUlzkfkEExWZH67DGjH29VAE/sJKtcQHC0tVMlwcYNxX52/PMWJgZ9pP
         MQ1N34khgzVBPsV3SXKnhSl7HmrbToM+fqck+j1qFzP+gurtFMIRw43ScD3LJ8I5aiFz
         AY279btUcMIMuMXuliEJsvIeScxYtxRPwdBSjAOW1kGD1y3cGn633HHIXlyFNcOVCOLR
         uDCADygsfMcAWBQcmhsRKDXGOaO/77FzuaOnK89YmHK38OfD8YzDwBDIFbAa75gFmH2W
         2SRdZe0RXYFTuE8hnTIl5523bSHWBBH4ep4d3Ssk+LTPhqcj17aXyqglI2XTYjgZkRie
         p6Dg==
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: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=Og4f86ex0w74XCzl0b3FEaKZ9Q3I+ni+jp8Zstolw9Q=;
        b=M3a6t/XhBU3AciBitXCVUhqFfuAMSYjTd8SmRW5epu6UYJY4ai++HNUrU8yFBUkkeM
         XHqMhA0dPLcsOe++ZhU8gWcqxB4uq2kncv4y366qMzoqV6MazFq2gRgUXJ3wqVcLH2zg
         D70tWEnpa0qMWWv7yBl8X+C8g/GhLUiI2NEae1hxsN9rawS8bayYuZVcQQ4Q9BspseUl
         nLXJTxssaIJqtzSIpCuUHHJU2DPtW7bj3McNpskdY8nSR58qn6j+cyrmuIWTOmMM68yO
         KUQrxNozArRalcS5+Tf0BVdmBFkOiRURJiNbywOoMcmKdSgltyzrGaI8Z8vGlu9sJMtB
         D+LA==
X-Gm-Message-State: AMke39mLrPNNRkmFFZQFUby9tSWo+/7TAIv/ohrCxUKdC/du7xa9Dd0YG/8fLw4bAbCcqw==
X-Received: by 10.176.85.94 with SMTP id u30mr2484651uaa.1.1486740495548;
        Fri, 10 Feb 2017 07:28:15 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.17.23 with SMTP id g23ls17937486ote.24.gmail; Fri, 10 Feb
 2017 07:28:14 -0800 (PST)
X-Received: by 10.157.4.105 with SMTP id 96mr712848otc.17.1486740494856;
        Fri, 10 Feb 2017 07:28:14 -0800 (PST)
In-Reply-To: <5b081db0-cc7b-4a5f-b9fe-b9f8ae7ab9f7@isocpp.org>
X-Original-Sender: jmckesson@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:30863
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/30863>

------=_Part_799_139306248.1486740488864
Content-Type: multipart/alternative; 
	boundary="----=_Part_800_1015040977.1486740488864"

------=_Part_800_1015040977.1486740488864
Content-Type: text/plain; charset=UTF-8

On Friday, February 10, 2017 at 7:35:38 AM UTC-5, Gonzalo BG wrote:
>
> A peril of "if constexpr()"-like solutions is that the compiler might want 
> to evaluate a block of a non constexpr function at compile-time, in which 
> case it could make sense to make "if constexpr()" also work in 
> non-constexpr functions, and to return true if the current 
> context/scope/block is being evaluated at compile-time, independently of 
> whether the outer function is or isn't being evaluated at compile-time.
>

I'm not sure what would keep `if constexpr()` from working under those 
circumstances. You would simply define it to work if the compiler chooses 
to execute the function at compile 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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/a461e0af-67a6-491e-896f-c5d23826d407%40isocpp.org.

------=_Part_800_1015040977.1486740488864
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Friday, February 10, 2017 at 7:35:38 AM UTC-5, Gonzalo =
BG 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=
>A peril of &quot;if constexpr()&quot;-like solutions is that the compiler =
might want to evaluate a block of a non constexpr function at compile-time,=
 in which case it could make sense to make &quot;if constexpr()&quot; also =
work in non-constexpr functions, and to return true if the current context/=
scope/block is being evaluated at compile-time, independently of whether th=
e outer function is or isn&#39;t being evaluated at compile-time.</div></di=
v></blockquote><div><br>I&#39;m not sure what would keep `if constexpr()` f=
rom working under those circumstances. You would simply define it to work i=
f the compiler chooses to execute the function at compile time.<br></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/a461e0af-67a6-491e-896f-c5d23826d407%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/a461e0af-67a6-491e-896f-c5d23826d407=
%40isocpp.org</a>.<br />

------=_Part_800_1015040977.1486740488864--

------=_Part_799_139306248.1486740488864--

.
