Skip to content

Commit

Permalink
Remove unnecessary trait specialization
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Jan 11, 2024
1 parent 971f7ae commit 2b05d24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 4 additions & 0 deletions include/fmt/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,11 @@ template <typename T> class basic_appender {
}

public:
using iterator_category = void;
using value_type = T;
using difference_type = ptrdiff_t;
using pointer = T*;
using reference = T&;
FMT_UNCHECKED_ITERATOR(basic_appender);

FMT_CONSTEXPR basic_appender(detail::buffer<T>& buf) : buffer_(&buf) {}
Expand Down
7 changes: 0 additions & 7 deletions include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,13 +271,6 @@ inline auto ctzll(uint64_t x) -> int {
FMT_END_NAMESPACE
#endif

namespace std {
template <typename T> struct iterator_traits<fmt::basic_appender<T>> {
using value_type = void;
using iterator_category = std::output_iterator_tag;
};
} // namespace std

FMT_BEGIN_NAMESPACE

template <typename Char, typename Traits, typename Allocator>
Expand Down

0 comments on commit 2b05d24

Please sign in to comment.