Skip to content

Commit

Permalink
Disable test if <optional> is missing.
Browse files Browse the repository at this point in the history
  • Loading branch information
zauguin committed Jan 31, 2017
1 parent 48757b5 commit 7e9dd24
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/std_optional.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using namespace sqlite;
using namespace std;

#if __has_include(<optional>)
void insert(database& db, bool is_null) {
int id = 1;
std::optional<int> val;
Expand Down Expand Up @@ -66,3 +67,9 @@ int main() {
}
exit(EXIT_SUCCESS);
}
#else
#pragma message "<optional> not found, test disabled."
int main() {
exit(EXIT_SUCCESS);
}
#endif

0 comments on commit 7e9dd24

Please sign in to comment.