From 7b27b9694cd6f91bd7e3b4fc2604f676c118c812 Mon Sep 17 00:00:00 2001 From: Brannon King Date: Wed, 11 Dec 2019 15:11:02 -0700 Subject: [PATCH] fix OSX build --- .../hdr/sqlite_modern_cpp/type_wrapper.h | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/src/sqlite/hdr/sqlite_modern_cpp/type_wrapper.h b/src/sqlite/hdr/sqlite_modern_cpp/type_wrapper.h index ddfd011a7..b93d13a15 100644 --- a/src/sqlite/hdr/sqlite_modern_cpp/type_wrapper.h +++ b/src/sqlite/hdr/sqlite_modern_cpp/type_wrapper.h @@ -12,8 +12,6 @@ #ifdef __has_include #if __cplusplus > 201402 && __has_include() #define MODERN_SQLITE_STD_OPTIONAL_SUPPORT -#elif __has_include() && __apple_build_version__ < 11000000 -#define MODERN_SQLITE_EXPERIMENTAL_OPTIONAL_SUPPORT #endif #endif @@ -27,11 +25,6 @@ #include #endif -#ifdef MODERN_SQLITE_EXPERIMENTAL_OPTIONAL_SUPPORT -#include -#define MODERN_SQLITE_STD_OPTIONAL_SUPPORT -#endif - #ifdef MODERN_SQLITE_STD_VARIANT_SUPPORT #include #endif @@ -310,13 +303,8 @@ namespace sqlite { // std::optional support for NULL values #ifdef MODERN_SQLITE_STD_OPTIONAL_SUPPORT -#ifdef MODERN_SQLITE_EXPERIMENTAL_OPTIONAL_SUPPORT - template - using optional = std::experimental::optional; -#else template using optional = std::optional; -#endif template struct has_sqlite_type, Type, void> : has_sqlite_type {}; @@ -334,30 +322,16 @@ namespace sqlite { } template inline optional get_col_from_db(sqlite3_stmt* stmt, int inx, result_type>) { -#ifdef MODERN_SQLITE_EXPERIMENTAL_OPTIONAL_SUPPORT - if(sqlite3_column_type(stmt, inx) == SQLITE_NULL) { - return std::experimental::nullopt; - } - return std::experimental::make_optional(get_col_from_db(stmt, inx, result_type())); -#else if(sqlite3_column_type(stmt, inx) == SQLITE_NULL) { return std::nullopt; } return std::make_optional(get_col_from_db(stmt, inx, result_type())); -#endif } template inline optional get_val_from_db(sqlite3_value *value, result_type>) { -#ifdef MODERN_SQLITE_EXPERIMENTAL_OPTIONAL_SUPPORT - if(sqlite3_value_type(value) == SQLITE_NULL) { - return std::experimental::nullopt; - } - return std::experimental::make_optional(get_val_from_db(value, result_type())); -#else if(sqlite3_value_type(value) == SQLITE_NULL) { return std::nullopt; } return std::make_optional(get_val_from_db(value, result_type())); -#endif } #endif