22#include "util/UnsupportedType.hpp"
32namespace util::config {
35enum class ConfigType { Integer, String, Double, Boolean, Null };
61operator<<(std::ostream& stream, ConfigType type);
64using Value = std::variant<int64_t, std::string, bool, double, NullType>;
82template <
typename Type>
86 if constexpr (std::is_same_v<Type, int64_t>) {
87 return ConfigType::Integer;
88 }
else if constexpr (std::is_same_v<Type, std::string>) {
89 return ConfigType::String;
90 }
else if constexpr (std::is_same_v<Type, double>) {
91 return ConfigType::Double;
92 }
else if constexpr (std::is_same_v<Type, bool>) {
93 return ConfigType::Boolean;
94 }
else if constexpr (std::is_same_v<Type, NullType>) {
95 return ConfigType::Null;
106struct fmt::formatter<
util::config::NullType> : fmt::formatter<char const*> {
111 return fmt::formatter<char const*>::format(
"null", ctx);
This namespace contains various utilities.
Definition AccountUtils.hpp:30
static constexpr bool Unsupported
used for compile time checking of unsupported types
Definition UnsupportedType.hpp:26
std::ostream & operator<<(std::ostream &stream, Severity sev)
Custom labels for Severity in log output.
Definition Logger.cpp:73
A type that represents a null value.
Definition Types.hpp:40
bool operator==(NullType const &) const
Compare two NullType objects.
Definition Types.hpp:47