Skip to content

Commit 39b0b3a

Browse files
committed
Explicitly call fixed_buffer_traits move constructor from iterator_buffer move constructor to fix deprectaion warning on clang-9
1 parent f37c7b1 commit 39b0b3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/fmt/base.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1835,7 +1835,7 @@ class fixed_buffer_traits {
18351835

18361836
public:
18371837
constexpr explicit fixed_buffer_traits(size_t limit) : limit_(limit) {}
1838-
FMT_CONSTEXPR20 ~fixed_buffer_traits(){};
1838+
FMT_CONSTEXPR20 ~fixed_buffer_traits() = default;
18391839
constexpr auto count() const -> size_t { return count_; }
18401840
FMT_CONSTEXPR auto limit(size_t size) -> size_t {
18411841
size_t n = limit_ > count_ ? limit_ - count_ : 0;
@@ -1912,7 +1912,7 @@ class iterator_buffer<T*, T, fixed_buffer_traits> : public fixed_buffer_traits,
19121912
FMT_CONSTEXPR explicit iterator_buffer(T* out, size_t n = buffer_size)
19131913
: fixed_buffer_traits(n), buffer<T>(grow, out, 0, n), out_(out) {}
19141914
FMT_CONSTEXPR iterator_buffer(iterator_buffer&& other) noexcept
1915-
: fixed_buffer_traits(other),
1915+
: fixed_buffer_traits(static_cast<iterator_buffer&&>(other)),
19161916
buffer<T>(static_cast<iterator_buffer&&>(other)),
19171917
out_(other.out_) {
19181918
if (this->data() != out_) {

0 commit comments

Comments
 (0)