220 30842 <24bee7ba-de92-49e5-b5c0-e033f4b86f89@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: rhalbersma@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Detecting compile-time evaluation
Date: Thu, 9 Feb 2017 11:29:26 -0800 (PST)
Lines: 71
Approved: news@gmane.org
Message-ID: <24bee7ba-de92-49e5-b5c0-e033f4b86f89@isocpp.org>
References: <86a47916-27c3-4e29-862f-9b4e1f105c1c@isocpp.org> <CABsSTho9bW015Eo7KNEBoYs2snREYJYzn6SdQGjYMy64zZETnA@mail.gmail.com>
 <12459132.29Ej4iibtf@tjmaciei-mobl1>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_379_666786968.1486668566476"
X-Trace: blaine.gmane.org 1486668569 7443 195.159.176.226 (9 Feb 2017 19:29:29 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 9 Feb 2017 19:29:29 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCMYZKMJV4IRBF4G6PCAKGQEBRURNKY@isocpp.org Thu Feb 09 20:29:23 2017
Return-path: <std-proposals+bncBCMYZKMJV4IRBF4G6PCAKGQEBRURNKY@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+bncBCMYZKMJV4IRBF4G6PCAKGQEBRURNKY@isocpp.org>)
	id 1cbuPC-0001ae-PC
	for gclcip-std-proposals@m.gmane.org; Thu, 09 Feb 2017 20:29:23 +0100
Original-Received: by mail-yb0-f199.google.com with SMTP id w194sf16185708ybe.2
        for <gclcip-std-proposals@m.gmane.org>; Thu, 09 Feb 2017 11:29:28 -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=WIQqMp42nbABlyuQs75bDP0jRRDRZDoHRwQI6KiGeOs=;
        b=VQWQxF8f721XX1/9d6ZFJCg7eWGLvKkze5dsIIVupE5ka23RGCNlg/ZOtQ1dU8s/rV
         U6vcrkf96bOOgGM3GqtzuT8TN2OSEfbKTVYF3NDSLDRbpp6+AFh1IHh6bU6tqK89OBLZ
         I+TuD2sSg5hxGqCmm5VVUdII56o/je3bMAdxzBq4WlsxnT7TM0Mh8MeBab4YM/cYJKmU
         YMjeM9H4RyAns7Ht2oOcaUuKWTbPDRZqv0rnmrWSQptsZXe5fBXCkgVODCJ9TO78dSzT
         nJzzQmxQl1TIuagLTHTSL9pMgudtZZjVkC8S6wTX2NqxxTz2SEoF2cJEV91yuVbfsA32
         uN+w==
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=WIQqMp42nbABlyuQs75bDP0jRRDRZDoHRwQI6KiGeOs=;
        b=Ij4e8T/oPH3tOYTwFxH0Q+QrveaqjVsJtHjcxCClyJStqjadxDsA2OQYLErak7umNv
         +d+c8F7W4tcLMKmToIa/Cqr3Ykfyp346ZCovMtIcJchGFvKD9elMwFfw38aGj6W9OexL
         pEwboi6IYfPaNqns0FKUidA8UMHgeLE+QtKRDTANXumg0Bf5jcwmPodlaBtm2h3t1NvE
         MGDfvUS7gT0KMSbELmQ/SPKvSoDsVfIEPBCaWIPvrMcUeV3ooafr1Td81voTs3WNi85r
         dVnp8H+86XDvVfK99LBYCqqcGGRh9ujRptKnStXo+vyW1tsdrJu9Q8FTKc27X4obu7jm
         RjbQ==
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=WIQqMp42nbABlyuQs75bDP0jRRDRZDoHRwQI6KiGeOs=;
        b=B/nJBTWoL/vTA8fxaCCgnM8mbcQspiX+CPyB+iF01oumqpOjrbys24hBhB33V4ZX5A
         Zu6u8BREylGEjDXRhjnFndHZe4+YqIWcr4SONdDocV0NtueMCeL2SZlui17vx2+rRhDt
         U/lhV61TAdlUcTgFfQyG0/uGzknq34hHLsNjrLUKtDPh72QhuE1aqosezbNMGoOk37T0
         4pgxdKOvqgXOvMu4UPWABgE4/HVTm4ovcU4zab4LOpYBn1qQ8tbQWt5/k2S104br9dk6
         l9QbAhaHQUfJhSdiTZEFvUHqy2TAheIPCiJDhTGANmQibhNZISMpjsQlFtg/k8l36TC5
         ZbXw==
X-Gm-Message-State: AMke39nzevOpDJ9Usp2RpWlHFELQ7Ww3CXXfd9vQFAK621mPvDZKlj9BcdfyApUab4hRiA==
X-Received: by 10.13.224.70 with SMTP id j67mr1653546ywe.44.1486668568222;
        Thu, 09 Feb 2017 11:29:28 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.9.200 with SMTP id 8ls21112180otz.48.gmail; Thu, 09 Feb
 2017 11:29:27 -0800 (PST)
X-Received: by 10.157.56.117 with SMTP id r50mr383830otd.12.1486668567294;
        Thu, 09 Feb 2017 11:29:27 -0800 (PST)
In-Reply-To: <12459132.29Ej4iibtf@tjmaciei-mobl1>
X-Original-Sender: rhalbersma@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:30842
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/30842>

------=_Part_379_666786968.1486668566476
Content-Type: multipart/alternative; 
	boundary="----=_Part_380_391178010.1486668566476"

------=_Part_380_391178010.1486668566476
Content-Type: text/plain; charset=UTF-8

On Thursday, February 9, 2017 at 7:12:40 PM UTC+1, Thiago Macieira wrote:
>
>
> We used to have this problem with Clang: for example, 
> qCountTrailingZeroBits 
> wasn't constexpr with Clang until 3.8, because we couldn't use 
> __builtin_ctz 
> in a constexpr context. 
>

That is inaccurate: builtin bit-twiddling in constexpr contexts has been 
supported since Clang 3.4. 

int main()
{
    static_assert(__builtin_ctz(0x8) == 3, "");
}

http://melpon.org/wandbox/permlink/atER2z2uVzSPxzjA 

-- 
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/24bee7ba-de92-49e5-b5c0-e033f4b86f89%40isocpp.org.

------=_Part_380_391178010.1486668566476
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Thursday, February 9, 2017 at 7:12:40 PM UTC+1, Thiago =
Macieira wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-=
left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><br>We used to =
have this problem with Clang: for example, qCountTrailingZeroBits=20
<br>wasn&#39;t constexpr with Clang until 3.8, because we couldn&#39;t use =
__builtin_ctz=20
<br>in a constexpr context.
<br></blockquote><div><br></div><div>That is inaccurate: builtin bit-twiddl=
ing in constexpr contexts has been supported since Clang 3.4.=C2=A0</div><d=
iv><br></div><div>int main()</div><div>{</div><div>=C2=A0 =C2=A0 static_ass=
ert(__builtin_ctz(0x8) =3D=3D 3, &quot;&quot;);</div><div>}</div><div><br><=
/div><div>http://melpon.org/wandbox/permlink/atER2z2uVzSPxzjA=C2=A0</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/24bee7ba-de92-49e5-b5c0-e033f4b86f89%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/24bee7ba-de92-49e5-b5c0-e033f4b86f89=
%40isocpp.org</a>.<br />

------=_Part_380_391178010.1486668566476--

------=_Part_379_666786968.1486668566476--

.
