| View previous topic :: View next topic |
| Author |
Message |
brf Guest
|
Posted: Tue Jun 14, 2005 9:48 am Post subject: value of __cplusplus in the ISO Standard from 2003 |
|
|
Which value has the preprocessor variable
__cplusplus
in the current ISO standard od C++ (the old value was 199711L)?
brf
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Daniel Krügler (ne Spange Guest
|
Posted: Tue Jun 14, 2005 7:30 pm Post subject: Re: value of __cplusplus in the ISO Standard from 2003 |
|
|
Hello brf,
brf schrieb:
| Quote: | Which value has the preprocessor variable
__cplusplus
in the current ISO standard od C++ (the old value was 199711L)?
The current version's value of ISO/IEC 14882:2003(E) is still 199711L. |
This revision is classified as "second edition". Probably the standard
should be more precise
in defining what a version change should be?
Greetings from Bremen,
Daniel Krügler
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Stanimir Kabaivanov Guest
|
Posted: Tue Jun 14, 2005 7:38 pm Post subject: Re: value of __cplusplus in the ISO Standard from 2003 |
|
|
brf wrote:
| Quote: | Which value has the preprocessor variable
__cplusplus
in the current ISO standard od C++ (the old value was 199711L)?
brf
|
As far as I know this variable obtains its value from the year and month
of the standard expressed as a long constant (this is ISO C++). For
example ARM C++ has this set to 1.
So I believe you can deduce the value taking into account which ISO
standard release you are interested in.
Best regards,
Stanimir Kabaivanov
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Pete Becker Guest
|
Posted: Tue Jun 14, 2005 7:39 pm Post subject: Re: value of __cplusplus in the ISO Standard from 2003 |
|
|
brf wrote:
| Quote: | Which value has the preprocessor variable
__cplusplus
in the current ISO standard od C++ (the old value was 199711L)?
|
Unfortunately, through an oversight, it's still 199711L.
--
Pete Becker
Dinkumware, Ltd. (http://www.dinkumware.com)
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Ismail Pazarbasi Guest
|
Posted: Wed Jun 15, 2005 9:36 am Post subject: Re: value of __cplusplus in the ISO Standard from 2003 |
|
|
ISO/IEC 14882:2003 Second Edition, page 315: 16.8.1 Predefined macro
names
_ _cplusplus The name _ _cplusplus is defined to the value 199711L when
compiling a C + +
translation unit.143)
Ismail
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
brf Guest
|
Posted: Wed Jun 15, 2005 11:01 pm Post subject: Re: value of __cplusplus in the ISO Standard from 2003 |
|
|
Thank you all! Weird that they didn't adapt the value of the
pp-variable.
brf
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
|