E
er ci
I think I've seen
#ifdef __C99__
before, but is there something similar for C++0x?
Thanks.
#ifdef __C99__
before, but is there something similar for C++0x?
Thanks.
er said:I think I've seen
#ifdef __C99__
before, but is there something similar for C++0x?
Thanks.
I think I've seen
#ifdef __C99__
before, but is there something similar for C++0x?
Bo Persson said:You the symbol __cplusplus which is defined to be 199711L for
compilers following the 1998 standard, supposedly approved in november
1997.
This symbol will get a new value for C++0x. We just don't know yet
what date it will be - perhaps 201111L ?
Actually, what would be ideal would be check whether the compiler flag
-std=c++0x has been set. Can compiler flags be "caught" by a pp macro?
The built-in macro __cplusplus is the standard way of checking the C++
const enable = true;
#else
const enable = false;
#endif
Under GCC 4.4, with -std=c++0x, under OSX 10.6.4,
std::cout << "cpp : " << __cplusplus << std::endl; // outputs 1
#if __cplusplus > 199711L
const bool enable = true;
#else
const bool enable = false;
#endif
assert( enable ); // fails
You have been told already that there IS NOT YET an official value the
So I guess GCC is out for checking C++0x
What does reserved namespace mean, here?
In addition to Pete's comment: You gotta try much harder. For example,
look for "C++0x" on that page I linked to. RTFM!
The answer to that is on the same page you quoted the paragraph from!
RTFM!
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.