From 26aa049724cec0e1b8bc96357ccb5d66067eaedf Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Thu, 25 Dec 2014 01:28:02 +0100 Subject: [PATCH] Fix C++11 compat wrapper for clang clang identifies itself as gcc 4.2. The preprocessor macros can be dumped with: clang++ -dM -E -x c /dev/null --- lib/cxx11emu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cxx11emu.h b/lib/cxx11emu.h index f68494371..94e764025 100644 --- a/lib/cxx11emu.h +++ b/lib/cxx11emu.h @@ -24,7 +24,7 @@ /* Emulate certain features of C++11 in a C++98-compatible way. */ #ifdef __cplusplus -#if (__GNUC__ <= 4 && __GNUC_MINOR__ < 6) || __cplusplus < 201103L +#if (__GNUC__ <= 4 && __GNUC_MINOR__ < 6 && !defined(__clang__)) || __cplusplus < 201103L // Null pointer literal // Source: SC22/WG21/N2431 = J16/07-0301