Add postgresql support
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
template <typename...>
|
||||
struct is_one_of_implem {
|
||||
static constexpr bool value = false;
|
||||
};
|
||||
|
||||
template <typename F, typename S, typename... T>
|
||||
struct is_one_of_implem<F, S, T...> {
|
||||
static constexpr bool value =
|
||||
std::is_same<F, S>::value || is_one_of_implem<F, T...>::value;
|
||||
};
|
||||
|
||||
template<typename... T>
|
||||
constexpr bool is_one_of = is_one_of_implem<T...>::value;
|
||||
@@ -0,0 +1,8 @@
|
||||
#include <utils/optional_bool.hpp>
|
||||
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const OptionalBool& o)
|
||||
{
|
||||
os << o.to_string();
|
||||
return os;
|
||||
}
|
||||
@@ -20,7 +20,7 @@ struct OptionalBool
|
||||
this->is_set = false;
|
||||
}
|
||||
|
||||
std::string to_string()
|
||||
std::string to_string() const
|
||||
{
|
||||
if (this->is_set == false)
|
||||
return "unset";
|
||||
@@ -33,3 +33,5 @@ struct OptionalBool
|
||||
bool is_set{false};
|
||||
bool value{false};
|
||||
};
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const OptionalBool& o);
|
||||
|
||||
Reference in New Issue
Block a user