Skip to content

Commit f4c9052

Browse files
committed
Fixed bindable unit tests for C++17 and later
1 parent 776bc0a commit f4c9052

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/statement_serializer_tests/bindables.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,18 @@ constexpr auto get_default<internal::literal_holder<const wchar_t*>>() -> intern
4545
return {L""};
4646
}
4747

48+
#ifdef SQLITE_ORM_OPTIONAL_SUPPORTED
49+
template<>
50+
constexpr auto get_default<std::nullopt_t>() -> std::nullopt_t {
51+
return std::nullopt;
52+
}
53+
54+
template<>
55+
constexpr auto get_default<internal::literal_holder<std::nullopt_t>>() -> internal::literal_holder<std::nullopt_t> {
56+
return {std::nullopt};
57+
}
58+
#endif
59+
4860
template<class Tpl, size_t... Idx>
4961
constexpr Tpl make_default_tuple(index_sequence<Idx...>) {
5062
return {get_default<tuple_element_t<Idx, Tpl>>()...};

0 commit comments

Comments
 (0)