mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 02:21:34 +08:00
Fix usage of std::forward
This commit is contained in:
parent
4008f31add
commit
6ff1b83038
@ -364,10 +364,10 @@ protected:
|
||||
SPDLOG_TRY
|
||||
{
|
||||
#ifdef SPDLOG_USE_STD_FORMAT
|
||||
memory_buf_t buf = std::vformat(fmt, std::make_format_args(std::forward<Args...>(args)...));
|
||||
memory_buf_t buf = std::vformat(fmt, std::make_format_args(std::forward<Args>(args)...));
|
||||
#else
|
||||
memory_buf_t buf;
|
||||
fmt::detail::vformat_to(buf, fmt, fmt::make_format_args(std::forward<Args...>(args)...));
|
||||
fmt::detail::vformat_to(buf, fmt, fmt::make_format_args(std::forward<Args>(args)...));
|
||||
#endif
|
||||
details::log_msg log_msg(loc, name_, lvl, string_view_t(buf.data(), buf.size()));
|
||||
log_it_(log_msg, log_enabled, traceback_enabled);
|
||||
@ -390,10 +390,10 @@ protected:
|
||||
// format to wmemory_buffer and convert to utf8
|
||||
;
|
||||
#ifdef SPDLOG_USE_STD_FORMAT
|
||||
wmemory_buf_t wbuf = std::vformat(fmt, std::make_wformat_args(std::forward<Args...>(args)...));
|
||||
wmemory_buf_t wbuf = std::vformat(fmt, std::make_wformat_args(std::forward<Args>(args)...));
|
||||
#else
|
||||
wmemory_buf_t wbuf;
|
||||
fmt::detail::vformat_to(wbuf, fmt, fmt::make_format_args<fmt::wformat_context>(std::forward<Args...>(args)...));
|
||||
fmt::detail::vformat_to(wbuf, fmt, fmt::make_format_args<fmt::wformat_context>(std::forward<Args>(args)...));
|
||||
#endif
|
||||
memory_buf_t buf;
|
||||
details::os::wstr_to_utf8buf(wstring_view_t(wbuf.data(), wbuf.size()), buf);
|
||||
|
Loading…
Reference in New Issue
Block a user