C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

value of __cplusplus in the ISO Standard from 2003

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated)
View previous topic :: View next topic  
Author Message
brf
Guest





PostPosted: Tue Jun 14, 2005 9:48 am    Post subject: value of __cplusplus in the ISO Standard from 2003 Reply with quote



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





PostPosted: Tue Jun 14, 2005 7:30 pm    Post subject: Re: value of __cplusplus in the ISO Standard from 2003 Reply with quote



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





PostPosted: Tue Jun 14, 2005 7:38 pm    Post subject: Re: value of __cplusplus in the ISO Standard from 2003 Reply with quote



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





PostPosted: Tue Jun 14, 2005 7:39 pm    Post subject: Re: value of __cplusplus in the ISO Standard from 2003 Reply with quote

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





PostPosted: Wed Jun 15, 2005 9:36 am    Post subject: Re: value of __cplusplus in the ISO Standard from 2003 Reply with quote

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





PostPosted: Wed Jun 15, 2005 11:01 pm    Post subject: Re: value of __cplusplus in the ISO Standard from 2003 Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.