From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 67868 invoked by alias); 20 May 2015 15:28:34 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 67853 invoked by uid 89); 20 May 2015 15:28:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 20 May 2015 15:28:29 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id C2AB22932FE; Wed, 20 May 2015 15:28:28 +0000 (UTC) Received: from [10.10.116.38] ([10.10.116.38]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4KFSR4n028275; Wed, 20 May 2015 11:28:28 -0400 Message-ID: <555CA818.7020301@redhat.com> Date: Wed, 20 May 2015 15:29:00 -0000 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Ed Smith-Rowland <3dw4rd@verizon.net>, gcc-patches , Paolo Carlini Subject: Re: [C++17] Implement N3928 - Extending static_assert References: <55453092.5050501@verizon.net> In-Reply-To: <55453092.5050501@verizon.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2015-05/txt/msg01846.txt.bz2 On 05/02/2015 04:16 PM, Ed Smith-Rowland wrote: > This extends' static assert to not require a message string. > I elected to make this work also for C++11 and C++14 and warn only with > -pedantic. > I think many people just write > static_assert(thing, ""); > . > > I took the path of building an empty string in the parser in this case. > I wasn't sure if setting message to NULL_TREE would cause sadness later > on or not. Hmm. Yes, this technically implements the feature, but my impression of the (non-normative) intent was that they wanted leaving out the string to print the argument expression, in about the same way as #define BOOST_STATIC_ASSERT( B ) static_assert(B, #B) So the patch is OK as is, but you might also look into some libcpp magic to insert a second argument that stringizes the first. Jason