Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| Message-ID | <invi4u$fak$1@dont-email.me> (permalink) |
|---|---|
| Newsgroups | comp.std.c++ |
| From | =3D?UTF-8?B?RGFuaWVsIEtyw7xnbGVy?=3D <daniel.kruegler@googlemail.com> |
| Subject | Re: Checking C++0X support |
| Organization | A noiseless patient Spider |
| References | <90g37sF3a6U1@mid.dfncis.de> |
| Date | 2011-04-12 13:10 -0600 |
Am 11.04.2011 21:28, schrieb Helmut Jarausch: > > Hi, > > for some time, some compilers won't support the (full) C++0X standard. > For an even longer time, software won't require the usage of such a > compiler, but also don't want to preclude taking advantage of the new > features if such a compiler is used. > So, there is need for a portable compile time check for C++0X support. > Is there something like this? > The standard provides a solution for this: As of [cpp.predefined] it define= s the predefined macro name __cplusplus (with two leading underscores) and describes: "The name __cplusplus is defined to the value 201103L when compiling a C++ translation unit. (footnote 157)" where the (non-normative) footnote 157 says: "It is intended that future versions of this standard will replace the valu= e of this macro with a greater value. Non-conforming compilers should use a value with at most five decimal digits." This is a recommendation, so some compiler might (do) not follow this advice, so. But I think, that q.o.i will ensure that serious compiler will try to conform, if they currently don't do. HTH & Greetings from Bremen, Daniel Kr=FCgler -- [ comp.std.c++ is moderated. To submit articles, try posting with your ] [ newsreader. If that fails, use mailto:std-cpp-submit@vandevoorde.com ] [ --- Please see the FAQ before posting. --- ] [ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Back to comp.std.c++ | Previous | Next — Previous in thread | Next in thread | Find similar
Checking C++0X support Helmut Jarausch <jarausch@igpm.rwth-aachen.de> - 2011-04-11 13:28 -0600 Re: Checking C++0X support Pete Becker <pete@versatilecoding.com> - 2011-04-12 13:09 -0600 Re: Checking C++0X support =3D?UTF-8?B?RGFuaWVsIEtyw7xnbGVy?=3D <daniel.kruegler@googlemail.com> - 2011-04-12 13:10 -0600 Re: Checking C++0X support CornedBee <wasti.redl@gmx.net> - 2011-04-12 13:11 -0600
csiph-web