Skip to content

Commit fc99d0c

Browse files
committed
Fixed the ifdef checks
1 parent 7eaf518 commit fc99d0c

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

hdr/sqlite_modern_cpp.h

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,20 @@
3030
template<class T>
3131
using optional = std::optional<T>;
3232
#define MODERN_SQLITE_OPTIONAL_SUPPORT
33-
#elif _MODERN_SQLITE_EXPERIMENTAL_OPTIONAL_SUPPORT && __has_include(<experimental/optional>)
34-
#include <experimental/optional>
35-
template<class T>
36-
using optional = std::experimental::optional<T>;
37-
#define MODERN_SQLITE_OPTIONAL_SUPPORT
38-
#elif _MODERN_SQLITE_BOOST_OPTIONAL_SUPPORT
39-
#include <boost/optional.hpp>
40-
template<class T>
41-
using optional = boost::optional<T>;
42-
#define MODERN_SQLITE_OPTIONAL_SUPPORT
33+
#elif __has_include(<experimental/optional>)
34+
#ifdef _MODERN_SQLITE_EXPERIMENTAL_OPTIONAL_SUPPORT
35+
#include <experimental/optional>
36+
template<class T>
37+
using optional = std::experimental::optional<T>;
38+
#define MODERN_SQLITE_OPTIONAL_SUPPORT
39+
#endif
40+
#else
41+
#ifdef _MODERN_SQLITE_BOOST_OPTIONAL_SUPPORT
42+
#include <boost/optional.hpp>
43+
template<class T>
44+
using optional = boost::optional<T>;
45+
#define MODERN_SQLITE_OPTIONAL_SUPPORT
46+
#endif
4347
#endif
4448

4549
#include <sqlite3.h>

0 commit comments

Comments
 (0)