220 30844 <CAGBGO5WBAOZd-L9_sC7GQe8+7H26AxAxYB_87EDTTfGhM=jnvw@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Rein Halbersma <rhalbersma@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Detecting compile-time evaluation
Date: Thu, 9 Feb 2017 21:10:18 +0100
Lines: 95
Approved: news@gmane.org
Message-ID: <CAGBGO5WBAOZd-L9_sC7GQe8+7H26AxAxYB_87EDTTfGhM=jnvw@mail.gmail.com>
References: <86a47916-27c3-4e29-862f-9b4e1f105c1c@isocpp.org>
 <12459132.29Ej4iibtf@tjmaciei-mobl1> <24bee7ba-de92-49e5-b5c0-e033f4b86f89@isocpp.org>
 <1707568.ZBltNqqEby@tjmaciei-mobl1>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a1142a430faf26005481e917e
X-Trace: blaine.gmane.org 1486671028 26736 195.159.176.226 (9 Feb 2017 20:10:28 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 9 Feb 2017 20:10:28 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCMYZKMJV4IRBK4Z6PCAKGQEEFIJYTY@isocpp.org Thu Feb 09 21:10:20 2017
Return-path: <std-proposals+bncBCMYZKMJV4IRBK4Z6PCAKGQEEFIJYTY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f199.google.com ([209.85.161.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCMYZKMJV4IRBK4Z6PCAKGQEEFIJYTY@isocpp.org>)
	id 1cbv2o-0006AP-J0
	for gclcip-std-proposals@m.gmane.org; Thu, 09 Feb 2017 21:10:18 +0100
Original-Received: by mail-yw0-f199.google.com with SMTP id v73sf16520338ywg.2
        for <gclcip-std-proposals@m.gmane.org>; Thu, 09 Feb 2017 12:10:20 -0800 (PST)
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:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=BieiMG6QHhPg2pioIXHK7y3VUcl7b5Jvn9+FBh3GOU4=;
        b=qp9zvxRHFTJy/gppEjLFWSXRTv7yF0dbJCNIbZqqxUNyAlN705ogUc015nVcd5fM06
         z/KbNOyJ0qwzQiAJyaCKbs8C7joHyIaqbylxi1pOPxar1ep5NXQU+dBONwswU2phd0pe
         Meg0kEeqlPM0AcZ6b8QohfKc6ehp7SqdE3cVw2EEH2iYn0AAYCE/xsaIhaCvr60GdzPn
         U3bJZZgXMTq3KJ1cRksPW01PYYclGYB1YuyqByoCje7lZo6dAFewAdatNhYVILAHRHkx
         W+ne7RcXFHyS2sZegH91zPRPRkLXsXYB7/cZEx8B5sXRmOteu483DDNKO61fd8GttLMh
         5N7g==
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=BieiMG6QHhPg2pioIXHK7y3VUcl7b5Jvn9+FBh3GOU4=;
        b=uLtGJoKQro4jvzOY6nGqXHiRDYg3sZfJr6eE3/DNKEVbgoLva4ciLhmInovp5RqhwG
         ByPYngLPldusUA2D/+r6KN/CFKQMpUS/eHzVeBiZeSbsZyA2OYomdUBtgjyRkHEzDR6n
         +x4aVCzTqwRivZtZVOxjN0LjScVHw2sg9x9GFeHImpwDlEBJKCRIkYQbQ5RoyI0sJvn0
         ANe85FkQiN70uAmI0jXDKRdAYtotWKBr4uPz7SsCxZq0491p950qkV9MkbuRUavTZ8ca
         JosfNKAWCFCaj/vIBSrLBEUAEfpHYsdlc8DiKLC4MYUYZNu/hOPIcLEx+OBUByuViAZf
         037A==
X-Gm-Message-State: AMke39mLEgMkcR7dItzyWfYioOUXK4i6Jwoi6l2NUohMTSRngItXS8l1j2Ph8BmrnszWmQ==
X-Received: by 10.13.212.2 with SMTP id w2mr1820086ywd.105.1486671019994;
        Thu, 09 Feb 2017 12:10:19 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.11.115 with SMTP id p48ls20899051otd.19.gmail; Thu, 09 Feb
 2017 12:10:19 -0800 (PST)
X-Received: by 10.55.138.196 with SMTP id m187mr5018045qkd.210.1486671019260;
        Thu, 09 Feb 2017 12:10:19 -0800 (PST)
Original-Received: from mail-qk0-x243.google.com (mail-qk0-x243.google.com. [2607:f8b0:400d:c09::243])
        by mx.google.com with ESMTPS id i130si8826453qki.71.2017.02.09.12.10.19
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 09 Feb 2017 12:10:19 -0800 (PST)
Received-SPF: pass (google.com: domain of rhalbersma@gmail.com designates 2607:f8b0:400d:c09::243 as permitted sender) client-ip=2607:f8b0:400d:c09::243;
Original-Received: by mail-qk0-x243.google.com with SMTP id u25so2223171qki.2
        for <std-proposals@isocpp.org>; Thu, 09 Feb 2017 12:10:19 -0800 (PST)
X-Received: by 10.55.24.76 with SMTP id j73mr4646614qkh.267.1486671018903;
 Thu, 09 Feb 2017 12:10:18 -0800 (PST)
Original-Received: by 10.55.131.4 with HTTP; Thu, 9 Feb 2017 12:10:18 -0800 (PST)
In-Reply-To: <1707568.ZBltNqqEby@tjmaciei-mobl1>
X-Original-Sender: rhalbersma@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of
 rhalbersma@gmail.com designates 2607:f8b0:400d:c09::243 as permitted sender)
 smtp.mailfrom=rhalbersma@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:30844
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/30844>

--001a1142a430faf26005481e917e
Content-Type: text/plain; charset=UTF-8

On Thu, Feb 9, 2017 at 9:04 PM, Thiago Macieira <thiago@macieira.org> wrote:

> On quinta-feira, 9 de fevereiro de 2017 11:29:26 PST rhalbersma@gmail.com
> wrote:
> > 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
>
> Well, experience proves you wrong. This used to fail with Clang that came
> with
> Xcode 6.4, which says:
>
> Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
>
> So unless Apple broke something, then 3.5 didn't work.
>
> (Testing with gcc.godbolt.org shows that it's actually Apple's fault
>

On Linux, this has been working for at least 3 years now, too bad if XCode
didn't work out for you.

-- 
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/CAGBGO5WBAOZd-L9_sC7GQe8%2B7H26AxAxYB_87EDTTfGhM%3Djnvw%40mail.gmail.com.

--001a1142a430faf26005481e917e
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On Thu, Feb 9, 2017 at 9:04 PM, Thiago Macieira <span dir=3D"ltr">&lt;<=
a href=3D"mailto:thiago@macieira.org" target=3D"_blank">thiago@macieira.org=
</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin=
:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On quinta-feira, 9=
 de fevereiro de 2017 11:29:26 PST <a href=3D"mailto:rhalbersma@gmail.com">=
rhalbersma@gmail.com</a><br>
wrote:<br>
<span class=3D"">&gt; That is inaccurate: builtin bit-twiddling in constexp=
r contexts has been<br>
&gt; supported since Clang 3.4.<br>
&gt;<br>
&gt; int main()<br>
&gt; {<br>
&gt;=C2=A0 =C2=A0 =C2=A0static_assert(__builtin_ctz(<wbr>0x8) =3D=3D 3, &qu=
ot;&quot;);<br>
&gt; }<br>
&gt;<br>
&gt; <a href=3D"http://melpon.org/wandbox/permlink/atER2z2uVzSPxzjA" rel=3D=
"noreferrer" target=3D"_blank">http://melpon.org/wandbox/<wbr>permlink/atER=
2z2uVzSPxzjA</a><br>
<br>
</span>Well, experience proves you wrong. This used to fail with Clang that=
 came with<br>
Xcode 6.4, which says:<br>
<br>
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)<br>
<br>
So unless Apple broke something, then 3.5 didn&#39;t work.<br>
<br>
(Testing with <a href=3D"http://gcc.godbolt.org" rel=3D"noreferrer" target=
=3D"_blank">gcc.godbolt.org</a> shows that it&#39;s actually Apple&#39;s fa=
ult<br></blockquote><div><br></div><div>On Linux, this has been working for=
 at least 3 years now, too bad if XCode didn&#39;t work out for you.=C2=A0<=
/div></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/CAGBGO5WBAOZd-L9_sC7GQe8%2B7H26AxAxYB=
_87EDTTfGhM%3Djnvw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAGBGO5WBAOZd=
-L9_sC7GQe8%2B7H26AxAxYB_87EDTTfGhM%3Djnvw%40mail.gmail.com</a>.<br />

--001a1142a430faf26005481e917e--

.
