diff --git a/include/spdlog/details/registry-inl.h b/include/spdlog/details/registry-inl.h index 562aa06c..95ab706c 100644 --- a/include/spdlog/details/registry-inl.h +++ b/include/spdlog/details/registry-inl.h @@ -184,7 +184,7 @@ SPDLOG_INLINE void registry::flush_on(level::level_enum log_level) SPDLOG_INLINE void registry::flush_every(std::chrono::seconds interval) { std::lock_guard lock(flusher_mutex_); - std::function clbk = std::bind(®istry::flush_all, this); + auto clbk = [this](){this->flush_all();}; periodic_flusher_ = details::make_unique(clbk, interval); }