220 19298 <1646231.xfnxM1QXYz@tjmaciei-mobl4> article
Path: news.gmane.org!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Testing for supported features: Per-feature
 macros? Sentinel compilation?
Date: Sun, 26 Jul 2015 20:21:19 -0700
Lines: 29
Approved: news@gmane.org
Message-ID: <1646231.xfnxM1QXYz@tjmaciei-mobl4>
References: <e5919c40-d35e-4309-b5b8-6525a4eb443c@isocpp.org> <47831edb-dbc1-413e-9886-95e357c3bf20@isocpp.org> <255fd5fb-cf04-431f-a576-d30926b86674@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: ger.gmane.org 1437967300 15559 80.91.229.3 (27 Jul 2015 03:21:40 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 27 Jul 2015 03:21:40 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBMWH22WQKGQE2I6T3VQ@isocpp.org Mon Jul 27 05:21:25 2015
Return-path: <std-proposals+bncBCB4TK757YBRBMWH22WQKGQE2I6T3VQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-la0-f72.google.com ([209.85.215.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCB4TK757YBRBMWH22WQKGQE2I6T3VQ@isocpp.org>)
	id 1ZJYyh-0005nh-Q1
	for gclcip-std-proposals@m.gmane.org; Mon, 27 Jul 2015 05:21:23 +0200
Original-Received: by laef2 with SMTP id f2sf23096775lae.0
        for <gclcip-std-proposals@m.gmane.org>; Sun, 26 Jul 2015 20:21:23 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:to:subject:date:message-id:user-agent
         :in-reply-to:references:mime-version:content-type: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=0zJNUJMibhqhKi2zCnPCPn0zuhGvgGfEF3907zbGMW8=;
        b=djroFxQIbzsb7O5R/M/bvjY3ZsEQusS2lOWVTv7E1ssNMlw9WDC9BzOeDPXBDTFvh7
         FBq09jVOxMgwH6srWmXhnYz1VwUi8vBX2lareNL+uB2e3JHzeBE9mGbINWR0B4lDct9s
         PPLmaPZyno2HVTjp6MyyA3vyXXaCA/sPkuJWOn2clfHWOrQwYpcRHLIlnaDHk9RaKWac
         SVQezmL2UiTlqTQ3h7vaJdTfjWwrck/J2F2df51jEOfRUZ2f/21bsyfBZe0rs8PSgDoi
         1pHitPWF2+LACBrSkMsX5SWY5UbKAZHRprP6jBrF38hr4HHXUTCyutRBk4QKFKVrPuil
         ts+A= 
X-Gm-Message-State: ALoCoQmzW78IGN/6XhU6/NWt/QZXT2a5QTDysraEo/zkyePTPStgG9jcsk5EOSPs4i7cKGem2ze8
X-Received: by 10.180.90.106 with SMTP id bv10mr4430944wib.6.1437967283047;
        Sun, 26 Jul 2015 20:21:23 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.8.129 with SMTP id r1ls538825wia.22.gmail; Sun, 26 Jul
 2015 20:21:22 -0700 (PDT)
X-Received: by 10.180.77.115 with SMTP id r19mr20170239wiw.9.1437967282208;
        Sun, 26 Jul 2015 20:21:22 -0700 (PDT)
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [2a01:4f8:d13:f81:21c:14ff:fe01:12a3])
        by mx.google.com with ESMTP id sb12si13855769wjb.77.2015.07.26.20.21.22
        for <std-proposals@isocpp.org>;
        Sun, 26 Jul 2015 20:21:22 -0700 (PDT)
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-mobl4.localnet (unknown [IPv6:2601:1c0:5803:81c9:a88d:786e:676b:dda3])
	by gondolin.macieira.info (Postfix) with ESMTPSA id 51B6911B526
	for <std-proposals@isocpp.org>; Sun, 26 Jul 2015 20:21:21 -0700 (PDT)
User-Agent: KMail/4.14.9 (Linux/4.0.5-3-desktop; KDE/4.14.9; x86_64; ; )
In-Reply-To: <255fd5fb-cf04-431f-a576-d30926b86674@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.mail=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-Spam-Checked-In-Group: 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:19298
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/19298>

On Sunday 26 July 2015 19:51:16 denis bider wrote:
> > > And besides, you can't test for all compiler bugs this way.
> > 
> > Not all, but one can test for most everything that has to do with syntax.
> 
> You can put a *static_assert* in the test block, too, and thereby test for 
> anything that the compiler can evaluate at compile time; *including* 
> whether the compiler can evaluate what you're testing, in the first place.

Correct, but there's no static_if and in any case everything must still be 
parsed properly. You can't use either feature to test for syntax the compiler 
does not support.

I'm skeptical how much the compiler could recover in case of a syntax it does 
not understand with your proposal.
-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

-- 

--- 
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/.

.
