[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Can enumerator values be used in a #if preprocessordi

From: Bob Paddock
Subject: Re: [avr-gcc-list] Can enumerator values be used in a #if preprocessordirective?
Date: Tue, 30 Aug 2011 10:22:43 -0400

> You can't get very meaningful errors here - I have not found any way to get
> a user-defined error message in conjunction with static asserts.

I added ##_##message, to NAME2_ and updated everything else as needed,
so now I get
static_assert( 1 == 2, One_Not_Equal_To_Two ); that looks like:
Closer to a meaningful message at least.

> AFAIK, an effort to get standardised static assertions into both C and C++
> with useful messages.  But in a fine example of mind-blowing stupidity,
> C++0x uses  static_assert(expression, message)
> while C1x calls it _Static_assert.

Standards are great thing, everyone can have one. :-(

Thank you and everyone else for the help.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]