Revert "Use std::optional<bool> instead of OptionalBool"

This reverts commit ba879a882e.
This commit is contained in:
louiz’
2018-03-17 17:28:47 +01:00
parent d0e3c71b91
commit 03714c6ceb
8 changed files with 58 additions and 41 deletions
+5 -4
View File
@@ -29,15 +29,16 @@ extract_row_value(Statement& statement, const int i)
}
template <typename T>
typename std::enable_if<std::is_same<std::optional<bool>, T>::value, T>::type
typename std::enable_if<std::is_same<OptionalBool, T>::value, T>::type
extract_row_value(Statement& statement, const int i)
{
const auto integer = statement.get_column_int(i);
OptionalBool result;
if (integer > 0)
return true;
result.set_value(true);
else if (integer < 0)
return false;
return std::nullopt;
result.set_value(false);
return result;
}
template <std::size_t N=0, typename... T>