small changes in log_manager.cpp and add is_database_primitive type traits and test
This commit is contained in:
@@ -46,6 +46,23 @@ struct time_type_t {
|
||||
uint32_t microsecond{};
|
||||
};
|
||||
|
||||
namespace detail {
|
||||
template <typename T, typename Variant>
|
||||
struct is_in_variant;
|
||||
|
||||
template <typename T, typename... Alts>
|
||||
struct is_in_variant<T, std::variant<Alts...>>
|
||||
: std::bool_constant<(std::is_same_v<T, Alts> || ...)> {
|
||||
};
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
struct is_database_primitive : detail::is_in_variant<std::remove_cv_t<std::remove_reference_t<T>>, database_type> {
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
inline constexpr bool is_database_primitive_v = is_database_primitive<T>::value;
|
||||
|
||||
void initialize_by_basic_type(basic_type type, database_type &val);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user