moved from ::iterator to decltype

pull/3315/head
Jan Koniarik 8 months ago
parent 0b44c706f3
commit 13a3ca27e5

@ -47,7 +47,7 @@ protected:
base_sink<Mutex>::formatter_->format(msg, formatted); base_sink<Mutex>::formatter_->format(msg, formatted);
// save the line without the eol // save the line without the eol
auto eol_len = strlen(details::os::default_eol); auto eol_len = strlen(details::os::default_eol);
using diff_t = typename std::iterator_traits<typename memory_buf_t::iterator>::difference_type; using diff_t = typename std::iterator_traits<decltype(formatted.end())>::difference_type;
if (lines_.size() < lines_to_save) { if (lines_.size() < lines_to_save) {
lines_.emplace_back(formatted.begin(), formatted.end() - static_cast<diff_t>(eol_len)); lines_.emplace_back(formatted.begin(), formatted.end() - static_cast<diff_t>(eol_len));
} }

Loading…
Cancel
Save