From b45a9233b743a2a4ffcb66982e70b3ed604cfe89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Fri, 12 Sep 2014 07:53:27 +0000 Subject: [PATCH] gcc 4.2 on MacOSX 10.8 defines __cplusplus==1, but does not support C++11; refs #11 --- src/mrw/checkcxx11.hxx | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/src/mrw/checkcxx11.hxx b/src/mrw/checkcxx11.hxx index d98c03a..63e0dd2 100644 --- a/src/mrw/checkcxx11.hxx +++ b/src/mrw/checkcxx11.hxx @@ -12,21 +12,26 @@ // otherwise there is a fallback wich makes everything much more compliacted # ifndef MRW__OLD_PRE11_COMPILER # if __cplusplus < 201103L -// # if __APPLE__ -// /// Code is compiled with an old non C++11 standard compliant compiler -// /** There are workarounds for old non C++11 compatible -// compilers. These workarounds are deprecated, but will remain until -// most compilers fully support C++11. So this workaround will be -// removed in future releases, when support for C++11 is more -// common. Only rely on this workaround, if you really have to. */ -// # warning you need a C++11 compliant compiler, on gcc: add -std=c++11 -// # warning to emulate C++11, on gcc: add -DMRW__OLD_PRE11_COMPILER -// # warning refere to the library documentation for more details -// # elif __cplusplus==1 # if __cplusplus==1 - // __cplusplus==1 is a known bug in gcc 4.6.3 -# warning your compiler has a know bug, please upgrade to gcc >= 4.7 -# warning see __cplusplus in http://gcc.gnu.org/gcc-4.7/changes.html +# if __APPLE__ + /// Code is compiled with old non C++11 standard compliant compiler + /** There are workarounds for old non C++11 compatible + compilers. These workarounds are deprecated, but will + remain until most compilers fully support C++11. So + this workaround will be removed in future releases, + when support for C++11 is more common. Only rely on + this workaround, if you really have to. + Mac gcc is even worse than on other systems. */ +# define MRW__OLD_PRE11_COMPILER +# warning you need a C++11 compliant compiler, on gcc: add -std=c++11 +# warning emulating C++11 - this changes the way you use the library +# warning this is deprecated and will be removed in future releases +# warning refere to the library documentation for more details +# else + // __cplusplus==1 is a known bug in gcc 4.6.3 +# warning your compiler has a know bug, please upgrade to gcc >= 4.7 +# warning see __cplusplus in http://gcc.gnu.org/gcc-4.7/changes.html +# fi # else /// Code is compiled with an old non C++11 standard compliant compiler /** There are workarounds for old non C++11 compatible