Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorPhil Nash2013-12-14 14:32:26 +0000
committerPhil Nash2013-12-14 14:32:26 +0000
commit563429d9a34b6a10ea0484a1eeda6595d66b54ef (patch)
treeb1d67285d0ba437216995635a7efa61a553174af /include
parentb4625208d01f881258e4090e465e44eb85fda9b6 (diff)
downloadcatch3-563429d9a34b6a10ea0484a1eeda6595d66b54ef.tar.gz
Compile in CATCH_CONFIG_CPP11_NULLPTR for some compilers
Diffstat (limited to 'include')
-rw-r--r--include/internal/catch_compiler_capabilities.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/internal/catch_compiler_capabilities.h b/include/internal/catch_compiler_capabilities.h
index 8191e967..0644f9c0 100644
--- a/include/internal/catch_compiler_capabilities.h
+++ b/include/internal/catch_compiler_capabilities.h
@@ -10,6 +10,17 @@
// Much of the following code is based on Boost (1.53)
+#ifdef __clang__
+#define CATCH_CONFIG_CPP11_NULLPTR
+
+#if __has_feature(cxx_nullptr)
+
+#define CATCH_CONFIG_CPP11_NULLPTR
+
+#endif
+
+#endif // __clang__
+
////////////////////////////////////////////////////////////////////////////////
// Borland
#ifdef __BORLANDC__
@@ -56,6 +67,11 @@
#endif // __GNUC__ < 3
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || defined(__GXX_EXPERIMENTAL_CXX0X__)
+
+#define CATCH_CONFIG_CPP11_NULLPTR
+#endif
+
#endif // __GNUC__