diff --git a/include/spdlog/fmt/fmt.h b/include/spdlog/fmt/fmt.h index 616af0cc..bb644839 100644 --- a/include/spdlog/fmt/fmt.h +++ b/include/spdlog/fmt/fmt.h @@ -11,15 +11,17 @@ // #if !defined(SPDLOG_FMT_EXTERNAL) +#ifndef SPDLOG_STATIC_LIB #ifndef FMT_HEADER_ONLY #define FMT_HEADER_ONLY #endif +#endif #ifndef FMT_USE_WINDOWS_H #define FMT_USE_WINDOWS_H 0 #endif #include "bundled/core.h" #include "bundled/format.h" -#else // external fmtlib +#else // SPDLOG_FMT_EXTERNAL is defined - use external fmtlib #include #include #endif diff --git a/include/spdlog/impl/fmt-format.cpp b/include/spdlog/impl/fmt-format.cpp new file mode 100644 index 00000000..dadfc8dd --- /dev/null +++ b/include/spdlog/impl/fmt-format.cpp @@ -0,0 +1,59 @@ +// Formatting library for C++ +// +// Copyright (c) 2012 - 2016, Victor Zverovich +// All rights reserved. +// +// For the license information refer to format.h. + +#include "fmt/format-inl.h" + +FMT_BEGIN_NAMESPACE +template struct internal::basic_data; +template FMT_API internal::locale_ref::locale_ref(const std::locale &loc); +template FMT_API std::locale internal::locale_ref::get() const; + +// Explicit instantiations for char. + +template FMT_API char internal::thousands_sep_impl(locale_ref); + +template FMT_API void internal::basic_buffer::append(const char *, const char *); + +template FMT_API void internal::arg_map::init( + const basic_format_args &args); + +template FMT_API int internal::char_traits::format_float( + char *, std::size_t, const char *, int, double); + +template FMT_API int internal::char_traits::format_float( + char *, std::size_t, const char *, int, long double); + +template FMT_API std::string internal::vformat( + string_view, basic_format_args); + +template FMT_API format_context::iterator internal::vformat_to( + internal::buffer &, string_view, basic_format_args); + +template FMT_API void internal::sprintf_format( + double, internal::buffer &, core_format_specs); +template FMT_API void internal::sprintf_format( + long double, internal::buffer &, core_format_specs); + +// Explicit instantiations for wchar_t. + +template FMT_API wchar_t internal::thousands_sep_impl(locale_ref); + +template FMT_API void internal::basic_buffer::append( + const wchar_t *, const wchar_t *); + +template FMT_API void internal::arg_map::init( + const basic_format_args &); + +template FMT_API int internal::char_traits::format_float( + wchar_t *, std::size_t, const wchar_t *, int, double); + +template FMT_API int internal::char_traits::format_float( + wchar_t *, std::size_t, const wchar_t *, int, long double); + +template FMT_API std::wstring internal::vformat( + wstring_view, basic_format_args); +FMT_END_NAMESPACE