This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 7/27/2015 10:57 AM, Jonathan Wakely wrote:
On 27 July 2015 at 14:48, Edward Diener wrote:On 7/27/2015 4:34 AM, Jonathan Wakely wrote:On 27 July 2015 at 05:17, Edward Diener wrote:Try #if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) // C++11 is in effect #endifGCC 4.8 defines __cplusplus to the correct YYYYMMDD value so this is not necessary.I meant it as a general solution for any version of gcc. It is what Boost config uses.But it doesn't help if you run the preprocessor in C mode not C++, since neither will be defined :-)
How is it possible to be compiling for C++11 when running in C mode ?In other words it does work since a C++11 compile will never be defined when running in C mode, which is certainly what is wanted.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |