Skip to content

Commit

Permalink
moved from ::iterator to decltype
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Koniarik authored and Jan Koniarik committed Jan 10, 2025
1 parent 0b44c70 commit 13a3ca2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_sink.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class test_sink : public base_sink<Mutex> {
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<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) {
lines_.emplace_back(formatted.begin(), formatted.end() - static_cast<diff_t>(eol_len));
}
Expand Down

0 comments on commit 13a3ca2

Please sign in to comment.