From f3308ed7c48c7989464817d5b1f07c66122c1d85 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Mon, 27 Jul 2015 18:34:21 +0100 Subject: [PATCH] Let gcc use __cplusplus identifier to decide if nullptr supported - or, for 4.6, continue to check __GX_EXPERIMENTAL_CXX0X__ See GitHb issue #445 and PR #471 --- include/internal/catch_compiler_capabilities.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/internal/catch_compiler_capabilities.h b/include/internal/catch_compiler_capabilities.h index a5847545..fb6350db 100644 --- a/include/internal/catch_compiler_capabilities.h +++ b/include/internal/catch_compiler_capabilities.h @@ -67,10 +67,13 @@ // GCC #ifdef __GNUC__ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6 && defined(__GXX_EXPERIMENTAL_CXX0X__) ) +#if __GNUC__ == 4 && __GNUC_MINOR__ >= 6 && defined(__GXX_EXPERIMENTAL_CXX0X__) # define CATCH_INTERNAL_CONFIG_CPP11_NULLPTR #endif +// - otherwise more recent versions define __cplusplus >= 201103L +// and will get picked up below + #endif // __GNUC__