@@ -134,7 +134,7 @@ constexpr const char* file_name(const char* const str) { return str_slant(str) ?
134
134
fmt::memory_buffer _log_buf{}; \
135
135
const auto & cb{formatter}; \
136
136
[[likely]] if (cb (_log_buf, msg __VA_OPT__ (, ) __VA_ARGS__)) { \
137
- fmt::vformat_to (fmt::appender{_log_buf}, fmt::string_view{" {} " }, fmt::make_format_args ( ' \0 ' )); \
137
+ fmt::format_to (fmt::appender{_log_buf}, fmt::string_view{" \0 " }); \
138
138
_l->method (_log_buf.data ()); \
139
139
if (is_flush) { _l->flush (); } \
140
140
} \
@@ -145,7 +145,7 @@ constexpr const char* file_name(const char* const str) { return str_slant(str) ?
145
145
fmt::memory_buffer _log_buf{}; \
146
146
const auto & cb{formatter}; \
147
147
if (LOGGING_PREDICT_TRUE (cb (_log_buf, msg __VA_OPT__ (, ) __VA_ARGS__))) { \
148
- fmt::vformat_to (fmt::appender{_log_buf}, fmt::string_view{" {} " }, fmt::make_format_args ( ' \0 ' )); \
148
+ fmt::format_to (fmt::appender{_log_buf}, fmt::string_view{" \0 " }); \
149
149
_l->method (_log_buf.data ()); \
150
150
if (is_flush) { _l->flush (); } \
151
151
} \
@@ -495,9 +495,11 @@ template < typename T1, typename T2, typename T3, typename... Args >
495
495
void _cmp_assert_with_msg (fmt::memory_buffer& buf, const char * const msg, T1&& val1, T2&& op, T3&& val2,
496
496
Args&&... args) {
497
497
498
+ auto val_1_cp = val1;
499
+ auto val_2_cp = val2;
498
500
fmt::vformat_to (fmt::appender{buf},
499
501
fmt::string_view{" ******************** Assertion failure: =====> Expected '{}' to be {} to '{}' " },
500
- fmt::make_format_args (std::forward< T1 >(val1) , std::forward< T2 >(op), std::forward< T3 >(val2) ));
502
+ fmt::make_format_args (val_1_cp , std::forward< T2 >(op), val_2_cp ));
501
503
fmt::vformat_to (fmt::appender{buf}, fmt::string_view{msg}, fmt::make_format_args (std::forward< Args >(args)...));
502
504
}
503
505
0 commit comments