Fix nullptr detection with AppleClang

This commit is contained in:
Sébastien Rombauts 2017-12-13 20:33:36 +01:00
parent 48740ac7c4
commit 86985dfd1f
4 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# Copyright (c) 2012-2016 Sebastien Rombauts (sebastien.rombauts@gmail.com)
# Copyright (c) 2012-2017 Sebastien Rombauts (sebastien.rombauts@gmail.com)
# request for Ubuntu 14.04 Trusty VM
sudo: true

View File

@ -125,7 +125,7 @@ set(SQLITECPP_INC
${PROJECT_SOURCE_DIR}/include/SQLiteCpp/Utils.h
${PROJECT_SOURCE_DIR}/include/SQLiteCpp/VariadicBind.h
)
source_group(inc FILES ${SQLITECPP_INC})
source_group(include FILES ${SQLITECPP_INC})
# list of test files of the library
set(SQLITECPP_TESTS

View File

@ -30,6 +30,7 @@
#define nullptr NULL
#endif // nullptr
#endif // _MSC_VER < 1600
#elif defined(__APPLE__) // AppleClang
#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

View File

@ -217,7 +217,7 @@ void Database::loadExtension(const char* apExtensionName, const char *apEntryPoi
throw std::runtime_error("sqlite extensions are disabled");
#else
#ifdef SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION // Since SQLite 3.13 (2017-05-18):
#ifdef SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION // Since SQLite 3.13 (2016-05-18):
// Security warning:
// It is recommended that the SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION method be used to enable only this interface.
// The use of the sqlite3_enable_load_extension() interface should be avoided to keep the SQL load_extension()