Skip to content

Commit 7e9dd24

Browse files
committed
Disable test if <optional> is missing.
1 parent 48757b5 commit 7e9dd24

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/std_optional.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using namespace sqlite;
77
using namespace std;
88

9+
#if __has_include(<optional>)
910
void insert(database& db, bool is_null) {
1011
int id = 1;
1112
std::optional<int> val;
@@ -66,3 +67,9 @@ int main() {
6667
}
6768
exit(EXIT_SUCCESS);
6869
}
70+
#else
71+
#pragma message "<optional> not found, test disabled."
72+
int main() {
73+
exit(EXIT_SUCCESS);
74+
}
75+
#endif

0 commit comments

Comments
 (0)