From 6bdc5620904e7ab073fc84f151814063144984dd Mon Sep 17 00:00:00 2001 From: Stefano Caiazza Date: Fri, 4 Oct 2019 18:03:13 +0200 Subject: [PATCH] Small bug-fix to compile correctly when not in header only The destructor of the registry is defaulted, which is equivalent to inlining but if the default declaration is in the header, when compiling the library, the forward declaration of the formatter is not being resolved yet which doesn't allow a clean compilation --- include/spdlog/details/registry-inl.h | 3 +++ include/spdlog/details/registry.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/spdlog/details/registry-inl.h b/include/spdlog/details/registry-inl.h index c5f3e2f4..93342383 100644 --- a/include/spdlog/details/registry-inl.h +++ b/include/spdlog/details/registry-inl.h @@ -47,6 +47,9 @@ SPDLOG_INLINE registry::registry() #endif // SPDLOG_DISABLE_DEFAULT_LOGGER } + +registry::~registry() = default; + SPDLOG_INLINE void registry::register_logger(std::shared_ptr new_logger) { std::lock_guard lock(logger_map_mutex_); diff --git a/include/spdlog/details/registry.h b/include/spdlog/details/registry.h index 8c277486..a75e3a47 100644 --- a/include/spdlog/details/registry.h +++ b/include/spdlog/details/registry.h @@ -30,7 +30,7 @@ class registry public: // Default constructor registry(); - ~registry() = default; + ~registry(); registry(const registry &) = delete; registry &operator=(const registry &) = delete;