Skip to content

Commit

Permalink
Explicitly call fixed_buffer_traits move constructor from iterator_bu…
Browse files Browse the repository at this point in the history
…ffer move constructor to fix deprectaion warning on clang-9
  • Loading branch information
Sunday111 committed Feb 26, 2025
1 parent f37c7b1 commit 39b0b3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/fmt/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -1835,7 +1835,7 @@ class fixed_buffer_traits {

public:
constexpr explicit fixed_buffer_traits(size_t limit) : limit_(limit) {}
FMT_CONSTEXPR20 ~fixed_buffer_traits(){};
FMT_CONSTEXPR20 ~fixed_buffer_traits() = default;
constexpr auto count() const -> size_t { return count_; }
FMT_CONSTEXPR auto limit(size_t size) -> size_t {
size_t n = limit_ > count_ ? limit_ - count_ : 0;
Expand Down Expand Up @@ -1912,7 +1912,7 @@ class iterator_buffer<T*, T, fixed_buffer_traits> : public fixed_buffer_traits,
FMT_CONSTEXPR explicit iterator_buffer(T* out, size_t n = buffer_size)
: fixed_buffer_traits(n), buffer<T>(grow, out, 0, n), out_(out) {}
FMT_CONSTEXPR iterator_buffer(iterator_buffer&& other) noexcept
: fixed_buffer_traits(other),
: fixed_buffer_traits(static_cast<iterator_buffer&&>(other)),
buffer<T>(static_cast<iterator_buffer&&>(other)),
out_(other.out_) {
if (this->data() != out_) {
Expand Down

0 comments on commit 39b0b3a

Please sign in to comment.