Commit e7ab49c9 authored by gabime's avatar gabime

Added extern tempalate declarations

parent 5496491a
......@@ -43,4 +43,6 @@ public:
#ifdef SPDLOG_HEADER_ONLY
#include "backtracer-inl.h"
#else
extern template class spdlog::details::circular_q<spdlog::details::log_msg_buffer>;
#endif
\ No newline at end of file
......@@ -13,6 +13,7 @@
#include "spdlog/details/log_msg.h"
#include "spdlog/sinks/sink.h"
namespace spdlog {
namespace sinks {
template<typename Mutex>
......@@ -43,4 +44,9 @@ protected:
#ifdef SPDLOG_HEADER_ONLY
#include "base_sink-inl.h"
#else
#include "spdlog/details/null_mutex.h"
#include <mutex>
extern template class spdlog::sinks::base_sink<std::mutex>;
extern template class spdlog::sinks::base_sink<spdlog::details::null_mutex>;
#endif
......@@ -6,16 +6,10 @@
#endif
#include <mutex>
#include "spdlog/sinks/base_sink.h"
#include "spdlog/details/null_mutex.h"
#include "spdlog/details/file_helper-inl.h"
#include "spdlog/sinks/base_sink-inl.h"
template class spdlog::sinks::base_sink<std::mutex>;
template class spdlog::sinks::base_sink<spdlog::details::null_mutex>;
#include "spdlog/sinks/basic_file_sink-inl.h"
template class spdlog::sinks::basic_file_sink<std::mutex>;
template class spdlog::sinks::basic_file_sink<spdlog::details::null_mutex>;
......
......@@ -15,8 +15,15 @@
#include "spdlog/details/log_msg_buffer-inl.h"
#include "spdlog/logger-inl.h"
#include "spdlog/sinks/sink-inl.h"
#include "spdlog/sinks/base_sink-inl.h"
#include "spdlog/details/null_mutex.h"
#include <mutex>
// template instantiate logger constructor with sinks init list
template spdlog::logger::logger(std::string name, sinks_init_list::iterator begin, sinks_init_list::iterator end);
template class spdlog::details::circular_q<spdlog::details::log_msg_buffer>;
template class spdlog::sinks::base_sink<std::mutex>;
template class spdlog::sinks::base_sink<spdlog::details::null_mutex>;
template class fmt::basic_string_view<char>;
template class fmt::basic_memory_buffer<char, 250>;
\ No newline at end of file
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