Topic: Macros for determining std version.


Author: archimed7592 <archimed7592@gmail.com>
Date: Mon, 18 Jun 2007 09:05:40 CST
Raw View
Will there any macros in c++09, that would help determine "is
implementation c++09 conformant or not"?

I think it will be useful in portable libraries' code.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: Anders Dalvander <google@dalvander.com>
Date: Mon, 18 Jun 2007 15:32:01 CST
Raw View
On Jun 18, 5:05 pm, archimed7592 <archimed7...@gmail.com> wrote:
> Will there any macros in c++09, that would help determine "is
> implementation c++09 conformant or not"?

C++97 conformant compilers shall define __cplusplus to 199711L. I
assume that C++09 conformant compilers should define __cplusplus to
2009xxL (where xx is the month or another two digit number).

#if __cplusplus >= 2009xxL
.
#endif

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]