mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 10:29:02 +08:00
Enabled bin_to_hex utest for stdformat, fixed std::formatter (#3315)
* Enabled bin_to_hex utest for stdformat, and fixed std::formatter * fixed usage of \ in macos.yml * explicitly cast diff variable in test_sink * moved from ::iterator to decltype * added fix for custom callbacks --------- Co-authored-by: Jan Koniarik <veverak@Jans-MacBook-Pro.local>
This commit is contained in:
@@ -47,8 +47,9 @@ protected:
|
||||
base_sink<Mutex>::formatter_->format(msg, formatted);
|
||||
// save the line without the eol
|
||||
auto eol_len = strlen(details::os::default_eol);
|
||||
using diff_t = typename std::iterator_traits<decltype(formatted.end())>::difference_type;
|
||||
if (lines_.size() < lines_to_save) {
|
||||
lines_.emplace_back(formatted.begin(), formatted.end() - eol_len);
|
||||
lines_.emplace_back(formatted.begin(), formatted.end() - static_cast<diff_t>(eol_len));
|
||||
}
|
||||
msg_counter_++;
|
||||
std::this_thread::sleep_for(delay_);
|
||||
|
Reference in New Issue
Block a user