220 30843 <1707568.ZBltNqqEby@tjmaciei-mobl1> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Detecting compile-time evaluation
Date: Thu, 09 Feb 2017 12:04:08 -0800
Lines: 31
Approved: news@gmane.org
Message-ID: <1707568.ZBltNqqEby@tjmaciei-mobl1>
References: <86a47916-27c3-4e29-862f-9b4e1f105c1c@isocpp.org> <12459132.29Ej4iibtf@tjmaciei-mobl1> <24bee7ba-de92-49e5-b5c0-e033f4b86f89@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: blaine.gmane.org 1486670662 17968 195.159.176.226 (9 Feb 2017 20:04:22 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 9 Feb 2017 20:04:22 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBQUW6PCAKGQEWQPDBUA@isocpp.org Thu Feb 09 21:04:13 2017
Return-path: <std-proposals+bncBCB4TK757YBRBQUW6PCAKGQEWQPDBUA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f72.google.com ([209.85.215.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCB4TK757YBRBQUW6PCAKGQEWQPDBUA@isocpp.org>)
	id 1cbuwv-00048O-7L
	for gclcip-std-proposals@m.gmane.org; Thu, 09 Feb 2017 21:04:13 +0100
Original-Received: by mail-lf0-f72.google.com with SMTP id x1sf5600995lff.6
        for <gclcip-std-proposals@m.gmane.org>; Thu, 09 Feb 2017 12:04:19 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=from:to:subject:date:message-id:in-reply-to:references:mime-version
         :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=X90/Vfv8TxpqUtmrbI7MJclNcnJEJTwD4GwX463WLq4=;
        b=yS8uoTtF5IwpCV4wmyiCxyQY+5zpriuqaYGUzdu160/SJckQV5V6z+hamGVxJDpp91
         W7cg1sHmmZQtZxmnWgm3h0yQXj9K3mN3SSw07XHadPz+i+3q4nTOWQUXRCbBpZtdLbM0
         Rr/5XFH/pERywZgCr8m5a9n/3UiQ/nIgfd/VBtiwD44pcVQdIU2tBkS3uIKMU9xGS939
         MiCLbOuncOAbu4921kPBeCrJK82QaQBNqsVLXyPOMzhBwh/+429T05RBtjs6oP7CNl18
         Sag+s69uVNQYWvnrPj9CNuQ0l3vKcZAjhSfSblzTx4PyZ4c5yJ7RbFD54BHTSM00JyWc
         0RvA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to
         :references:mime-version: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=X90/Vfv8TxpqUtmrbI7MJclNcnJEJTwD4GwX463WLq4=;
        b=rAl/LAl2Psn/SvMDnY+dGihPqMoLfX084iTBVCaMLx01aIYBfik5JyhOrpEdBZB47V
         BnSgnhEiyxf30r/QCnVgsspau4w1quTGkjDUFWQNL+X9LyP6pX+SDnA8aSB0NzK374a3
         /35iJxv0wBZtio0S7XyhdmN7xUxa+AmhjgWA4F2tRSWG0xDq3b1zb4OiHvdqCrlIFS+5
         BvKn4pQuiFhbc98Y+ZL6oF9YJKuLtWD1/TlS4tUidThXnMZEf4IO3DMQSt5PzjtUVUya
         ghO3evt1Bvzy9fg8gEbNlrzfSowpZoV+GWJNSr1MT5lMU74KAgs2mFyrn8sdI6wb056m
         Ql3g==
X-Gm-Message-State: AMke39lsHFFD7R00w9u/Xi1TcMhIWMbLFghV19huCMH9BAIky8pHM+umr5N2RjxCv66Upg==
X-Received: by 10.25.195.17 with SMTP id t17mr478247lff.28.1486670658964;
        Thu, 09 Feb 2017 12:04:18 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.187.5 with SMTP id l5ls397674wmf.13.gmail; Thu, 09 Feb 2017
 12:04:17 -0800 (PST)
X-Received: by 10.223.134.218 with SMTP id 26mr4373940wry.104.1486670657647;
        Thu, 09 Feb 2017 12:04:17 -0800 (PST)
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [2a01:4f8:d13:f81:21c:14ff:fe01:12a3])
        by mx.google.com with ESMTP id 10si14127798wry.3.2017.02.09.12.04.17
        for <std-proposals@isocpp.org>;
        Thu, 09 Feb 2017 12:04:17 -0800 (PST)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3 as permitted sender) client-ip=2a01:4f8:d13:f81:21c:14ff:fe01:12a3;
Original-Received: from tjmaciei-mobl1.localnet (jfdmzpr01-ext.jf.intel.com [134.134.139.70])
	by gondolin.macieira.info (Postfix) with ESMTPSA id BC8CA11B59B
	for <std-proposals@isocpp.org>; Thu,  9 Feb 2017 12:04:16 -0800 (PST)
In-Reply-To: <24bee7ba-de92-49e5-b5c0-e033f4b86f89@isocpp.org>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3
 as permitted sender) smtp.mailfrom=thiago@macieira.org
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:30843
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/30843>

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)

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

-- 
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/1707568.ZBltNqqEby%40tjmaciei-mobl1.

.
