diff --git a/CMakeLists.txt b/CMakeLists.txt index a121369..f8b58e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,7 @@ else (MSVC) set(CPPLINT_ARG_OUTPUT "--output=eclipse") set(CPPCHECK_ARG_TEMPLATE "--template=gcc") # Useful compile flags and extra warnings - add_compile_options(-fstack-protector -Wall -Wextra -Wpedantic -Wno-long-long -Wswitch-enum -Wshadow -Winline) + add_compile_options(-fstack-protector -Wall -Wextra -Wpedantic -Wno-long-long -Wswitch-enum -Wshadow -Winline -Wno-c++0x-compat) if (CMAKE_COMPILER_IS_GNUCXX) # GCC flags if (SQLITECPP_USE_GCOV AND CMAKE_COMPILER_IS_GNUCXX) diff --git a/include/SQLiteCpp/Utils.h b/include/SQLiteCpp/Utils.h index fb8d2ea..83fffaa 100644 --- a/include/SQLiteCpp/Utils.h +++ b/include/SQLiteCpp/Utils.h @@ -30,7 +30,8 @@ #define nullptr NULL #endif // nullptr #endif // _MSC_VER < 1600 -#else // _MSC_VER +#elif defined(__clang__) && __has_feature(cxx_nullptr) // Clang 3.0+ +#else // GCC or older Clang #if (__cplusplus < 201103L) && !defined(__GXX_EXPERIMENTAL_CXX0X__) // before C++11 on GCC4.7 and Visual Studio 2010 #ifndef HAVE_NULLPTR #define HAVE_NULLPTR ///< A macro to avoid double definition of nullptr