File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -825,7 +825,11 @@ namespace sqlite {
825
825
826
826
template <typename OptionalT> inline void get_col_from_db (database_binder& db, int inx, optional<OptionalT>& o) {
827
827
if (sqlite3_column_type (db._stmt .get (), inx) == SQLITE_NULL) {
828
+ #ifdef MODERN_SQLITE_EXPERIMENTAL_OPTIONAL_SUPPORT
829
+ o = std::experimental::nullopt;
830
+ #else
828
831
o.reset ();
832
+ #endif
829
833
} else {
830
834
OptionalT v;
831
835
get_col_from_db (db, inx, v);
@@ -834,7 +838,11 @@ namespace sqlite {
834
838
}
835
839
template <typename OptionalT> inline void get_val_from_db (sqlite3_value *value, optional<OptionalT>& o) {
836
840
if (sqlite3_value_type (value) == SQLITE_NULL) {
841
+ #ifdef MODERN_SQLITE_EXPERIMENTAL_OPTIONAL_SUPPORT
842
+ o = std::experimental::nullopt;
843
+ #else
837
844
o.reset ();
845
+ #endif
838
846
} else {
839
847
OptionalT v;
840
848
get_val_from_db (value, v);
You can’t perform that action at this time.
0 commit comments