Commit 102c31a0 authored by gabime's avatar gabime

Accecpt iterators by value in logger ctor insted of ref

parent 10000c38
......@@ -46,7 +46,7 @@ class async_logger final : public std::enable_shared_from_this<async_logger>, pu
public:
template<typename It>
async_logger(std::string logger_name, const It &begin, const It &end, std::weak_ptr<details::thread_pool> tp,
async_logger(std::string logger_name, It begin, It end, std::weak_ptr<details::thread_pool> tp,
async_overflow_policy overflow_policy = async_overflow_policy::block);
async_logger(std::string logger_name, sinks_init_list sinks_list, std::weak_ptr<details::thread_pool> tp,
......
......@@ -16,7 +16,7 @@
template<typename It>
inline spdlog::async_logger::async_logger(
std::string logger_name, const It &begin, const It &end, std::weak_ptr<details::thread_pool> tp, async_overflow_policy overflow_policy)
std::string logger_name, It begin, It end, std::weak_ptr<details::thread_pool> tp, async_overflow_policy overflow_policy)
: logger(std::move(logger_name), begin, end)
, thread_pool_(tp)
, overflow_policy_(overflow_policy)
......
......@@ -13,7 +13,7 @@
// create logger with given name, sinks and the default pattern formatter
// all other ctors will call this one
template<typename It>
inline spdlog::logger::logger(std::string logger_name, const It &begin, const It &end)
inline spdlog::logger::logger(std::string logger_name, It begin, It end)
: name_(std::move(logger_name))
, sinks_(begin, end)
, level_(level::info)
......
......@@ -36,7 +36,7 @@ public:
logger(std::string name, sinks_init_list sinks);
template<typename It>
logger(std::string name, const It &begin, const It &end);
logger(std::string name, It begin, It end);
virtual ~logger();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment