On 06/15/2015 12:05 PM, Jason Merrill wrote:
On 05/20/2015 11:28 AM, Jason Merrill wrote:
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.

Are you planning to check this in?

Jason




Jason,

I wanted to fix it up as per your suggestion. If someone wants it now I can retest and commit. Otherwise give me a bit more time.

Also, if you or someone else really has the whole enchilada then by all means just commit that.

Ed

Reply via email to