aboutsummaryrefslogtreecommitdiff
path: root/odb/details
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-12-20 05:39:39 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-12-20 05:39:39 +0200
commitdb3f10e93b5c4c804d9f2127ab7697fb0638cc2f (patch)
tree8f5f265e3ee3c8eb5a54f2328cd97a18797f836a /odb/details
parent382101ae725a0f6b97f0ecdba1023d7b63cd3157 (diff)
Detect Clang that pretends to be very old GCC
On FreeBSD, Clang 3.7 says it is GCC 4.2. Go figure.
Diffstat (limited to 'odb/details')
-rw-r--r--odb/details/config.hxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/odb/details/config.hxx b/odb/details/config.hxx
index c8f6239..c36b163 100644
--- a/odb/details/config.hxx
+++ b/odb/details/config.hxx
@@ -27,7 +27,9 @@
# include <odb/details/config.h>
# if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
# define ODB_CXX11
-# ifdef __GNUC__
+# ifdef __clang__ // Pretends to be a really old __GNUC__ on some platforms.
+# define ODB_CXX11_NULLPTR
+# elif defined(__GNUC__)
# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4
# define ODB_CXX11_NULLPTR
# endif