Commit 8b4eedb5 authored by gabime's avatar gabime

More template instantiations for static lib

parent 01f5efa1
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
#include "spdlog/logger.h"
#include "spdlog/common.h"
namespace spdlog {
template<typename Factory>
SPDLOG_INLINE std::shared_ptr<logger> stdout_color_mt(const std::string &logger_name)
{
return Factory::template create<sinks::stdout_color_sink_mt>(logger_name);
}
template<typename Factory>
SPDLOG_INLINE std::shared_ptr<logger> stdout_color_st(const std::string &logger_name)
{
return Factory::template create<sinks::stdout_color_sink_st>(logger_name);
}
template<typename Factory>
SPDLOG_INLINE std::shared_ptr<logger> stderr_color_mt(const std::string &logger_name)
{
return Factory::template create<sinks::stderr_color_sink_mt>(logger_name);
}
template<typename Factory>
SPDLOG_INLINE std::shared_ptr<logger> stderr_color_st(const std::string &logger_name)
{
return Factory::template create<sinks::stderr_color_sink_st>(logger_name);
}
} // namespace spdlog
\ No newline at end of file
......@@ -29,26 +29,19 @@ using stderr_color_sink_st = ansicolor_stderr_sink_st;
} // namespace sinks
template<typename Factory = default_factory>
inline std::shared_ptr<logger> stdout_color_mt(const std::string &logger_name)
{
return Factory::template create<sinks::stdout_color_sink_mt>(logger_name);
}
std::shared_ptr<logger> stdout_color_mt(const std::string &logger_name);
template<typename Factory = default_factory>
inline std::shared_ptr<logger> stdout_color_st(const std::string &logger_name)
{
return Factory::template create<sinks::stdout_color_sink_st>(logger_name);
}
std::shared_ptr<logger> stdout_color_st(const std::string &logger_name);
template<typename Factory = default_factory>
inline std::shared_ptr<logger> stderr_color_mt(const std::string &logger_name)
{
return Factory::template create<sinks::stderr_color_sink_mt>(logger_name);
}
std::shared_ptr<logger> stderr_color_mt(const std::string &logger_name);
template<typename Factory = default_factory>
inline std::shared_ptr<logger> stderr_color_st(const std::string &logger_name)
{
return Factory::template create<sinks::stderr_color_sink_st>(logger_name);
}
std::shared_ptr<logger> stderr_color_st(const std::string &logger_name);
} // namespace spdlog
#ifdef SPDLOG_HEADER_ONLY
#include "stdout_color_sinks-inl.h"
#endif
\ No newline at end of file
#pragma once
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
namespace spdlog {
namespace sinks {
......@@ -18,7 +20,7 @@ SPDLOG_INLINE wincolor_sink<TargetStream, ConsoleMutex>::wincolor_sink()
}
template<typename TargetStream, typename ConsoleMutex>
SPDLOG_INLINE SPDLOG_INLINE wincolor_sink<TargetStream, ConsoleMutex>::~wincolor_sink()
SPDLOG_INLINE wincolor_sink<TargetStream, ConsoleMutex>::~wincolor_sink()
{
this->flush();
}
......
......@@ -69,3 +69,7 @@ using wincolor_stderr_sink_st = wincolor_sink<details::console_stderr, details::
} // namespace sinks
} // namespace spdlog
#ifdef SPDLOG_HEADER_ONLY
#include "wincolor_sink-inl.h"
#endif
\ 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