From 9c5a73e2bd08e307d06f59744e52f5214304bd66 Mon Sep 17 00:00:00 2001 From: Andreas Tsouchlos Date: Sun, 13 Feb 2022 17:30:40 +0100 Subject: [PATCH] Removed Logger.h --- const_fmt/Logger.h | 52 ---------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 const_fmt/Logger.h diff --git a/const_fmt/Logger.h b/const_fmt/Logger.h deleted file mode 100644 index f7a43d5..0000000 --- a/const_fmt/Logger.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef LOGGER_LOGGER_H -#define LOGGER_LOGGER_H - - -#include -#include -#include - -#include "format.h" - - -/* - * - * Logger class - * - */ - - -namespace detail { - -template -concept output_policy_c = requires(T t) { - t.write('c'); -}; - -} // namespace detail - - -template -class Logger { - -public: - Logger(output_policy_t output_policy) : m_output_policy(output_policy) { - } - - template - void log(args_t... args) { - const auto formatted_msg = format(args...); - - for (const auto& c : formatted_msg) { - m_output_policy.write(c); - } - - m_output_policy.write('\n'); - } - -private: - output_policy_t& m_output_policy; -}; - - -#endif // LOGGER_LOGGER_H