File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 88#include < memory>
99#include < vector>
1010
11+ #ifdef __has_include
1112#if __has_include(<optional>)
13+ #define _MODERN_SQLITE_STD_OPTIONAL_SUPPORT
14+ #endif
15+ #endif
16+
17+ #ifdef _MODERN_SQLITE_STD_OPTIONAL_SUPPORT
1218#include < optional>
1319#endif
1420
@@ -241,7 +247,7 @@ namespace sqlite {
241247 friend database_binder& operator <<(database_binder& db, const std::u16string& txt);
242248
243249
244- #if __has_include(<optional>)
250+ #ifdef _MODERN_SQLITE_STD_OPTIONAL_SUPPORT
245251 template <typename OptionalT> friend database_binder& operator <<(database_binder& db, const std::optional<OptionalT>& val);
246252 template <typename OptionalT> friend void get_col_from_db (database_binder& db, int inx, std::optional<OptionalT>& o);
247253#endif
@@ -555,7 +561,7 @@ namespace sqlite {
555561 return db;
556562 }
557563 // std::optional support for NULL values
558- #if __has_include(<optional>)
564+ #ifdef _MODERN_SQLITE_STD_OPTIONAL_SUPPORT
559565 template <typename OptionalT> inline database_binder& operator <<(database_binder& db, const std::optional<OptionalT>& val) {
560566 if (val) {
561567 return operator << (std::move (db), std::move (*val));
You can’t perform that action at this time.
0 commit comments