Go Back   Rhinocerus > Newsgroup > Newsgroup comp.language.c++

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 07-24-2010, 04:31 PM
er ci
Guest
 
Posts: n/a
Default Checking for whether compiler supports C99 or C++0x

I think I've seen

#ifdef __C99__

before, but is there something similar for C++0x?

Thanks.
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 07-24-2010, 04:46 PM
Bo Persson
Guest
 
Posts: n/a
Default Re: Checking for whether compiler supports C99 or C++0x

er ci wrote:
> I think I've seen
>
> #ifdef __C99__
>
> before, but is there something similar for C++0x?
>
> Thanks.


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 ?


Bo Persson


Reply With Quote
  #3 (permalink)  
Old 07-24-2010, 04:51 PM
Öö Tiib
Guest
 
Posts: n/a
Default Re: Checking for whether compiler supports C99 or C++0x

On 24 juuli, 19:31, er ci <er.ci.2...@gmail.com> wrote:
> I think I've seen
>
> #ifdef __C99__
>
> before, but is there something similar for C++0x?


No compiler supports fully next standard. If you want to write
portable code then avoid all that C++0x for 3-4 years *after* (if it
ever) becomes standard. You will have lot of portability-related fun
without it, that is guaranteed.
Reply With Quote
  #4 (permalink)  
Old 07-27-2010, 08:06 AM
Juha Nieminen
Guest
 
Posts: n/a
Default Re: Checking for whether compiler supports C99 or C++0x

Bo Persson <bop@gmb.dk> wrote:
> 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 ?


You could always do an #if (__cplusplus > 199711)
Reply With Quote
 
Reply

Popular Tags in the Forum
c99, checking, compiler, supports

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
vpython installation problem rudra Newsgroup comp.lang.python 1 11-26-2009 12:33 PM
Tutorial, Compiler and Graphic/Diagram Library Florian Xaver Newsgroup comp.lang.fortran 7 11-17-2009 07:52 AM
New release of the Dynace OO extension to C Blake McBride Newsgroup comp.lang.c 282 08-10-2009 04:51 AM
New release of the Dynace OO extension to C Blake McBride Newsgroup comp.language.c++ 269 08-10-2009 04:51 AM
BLT compilation vinayak.mdesai@gmail.com Newsgroup comp.lang.tcl 4 04-03-2009 12:09 PM



All times are GMT. The time now is 03:13 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.