This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Will __GXX_EXPERIMENTAL_CXX0X__ go away?
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: phorgan1 at yahoo dot com
- Cc: GCC-help <gcc-help at gcc dot gnu dot org>
- Date: Wed, 25 May 2011 09:19:57 +0100
- Subject: Re: Will __GXX_EXPERIMENTAL_CXX0X__ go away?
- References: <4DDCA535.6060802@yahoo.com>
On 25 May 2011 07:44, Patrick Horgan wrote:
> I'm using the following in a header that uses typeof and needs to build
> in code that builds with -std=c++0x or the default -std=c++98. ?Can I
> leave it and forget it, or will eventually the compiler's use of c++0x
> features no longer be experimental? ?How do I future proof it?
>
> #ifdef __GXX_EXPERIMENTAL_CXX0X__
> #define typeof decltype
> #endif
Yes it will go away at some point. The portable way to detect C++0x support is:
#if __cplusplus >= 201103L