#pragma once #include #include #include namespace spdlog { namespace details { //template //concept composable = std::same_as || std::integral || std::floating_point || std::convertible_to; struct attr { std::string key; std::string value; public: attr(std::initializer_list l) { if (l.size() != 2) return; // throw exception if not kv pair? key = *l.begin(); value = *(l.begin()+1); } attr(std::string_view k, bool v) : key{k} , value{v ? "true" : "false"} {} attr(std::string_view k, std::string_view v) : key{k} , value{v} {} template attr(std::string_view k, T const &v) : key{k} , value{std::to_string(v)} {} }; } // namespace details } // namespace spdlog