#include "settings.hpp" #define TOML_ENABLE_FORMATTERS 0 #include auto Settings::from_stream(std::istream & in) -> Settings { auto const config = toml::parse(in); return Settings{ .host = config["host"].value_or(std::string{"*"}), .service = config["service"].value_or(std::string{"*"}), .password = config["password"].value_or(std::string{"*"}), .username = config["username"].value_or(std::string{"*"}), .realname = config["realname"].value_or(std::string{"*"}), .nickname = config["nickname"].value_or(std::string{"*"}) }; }