This header file includes <strf/destination.hpp>
namespace strf {

template <typename T>
class output_buffer_iterator;

template <typename T>
constexpr output_buffer_iterator<T> make_iterator(strf::output_buffer<T, 0>& dest) noexcept;

} // namespace strf

1. Class template output_buffer_iterator

output_buffer_iterator is a single-pass OutputIterator that writes into the std::output_buffer object that it references to.

1.1. Synopsis

namespace strf {

template <typename T>
class output_buffer_iterator {
public:
    using iterator_category = std::output_iterator_tag;
    using value_type = void;
    using difference_type = std::ptrdiff_t;
    using pointer = void;
    using reference = void;

    constexpr explicit output_buffer_iterator(strf::output_buffer<T, 0>& dest) noexcept;
    constexpr output_buffer_iterator(const output_buffer_iterator&) noexcept = default;
    constexpr output_buffer_iterator() = delete;

    constexpr output_buffer_iterator& operator() noexcept;    // no-op
    constexpr output_buffer_iterator& operator(int) noexcept; // no-op
    constexpr output_buffer_iterator& operator*() noexcept;     // no-op

    constexpr output_buffer_iterator& operator=(T value);
    constexpr bool failed() const noexcept;

private:
    strf::output_buffer<T, 0>* dest_ptr; // exposition-only
};

} // namespace strf

1.2. Member functions

constexpr explicit output_buffer_iterator(strf::output_buffer<T, 0>& dest) noexcept;

Initializes dest_ptr with &dest

constexpr output_buffer_iterator& operator=(T value);
Effect

strf::put(*dest_ptr, value)

Return value

*this

constexpr bool failed() const noexcept;
Return value

! dest_ptr→good()

constexpr output_buffer_iterator& operator++() noexcept;
constexpr output_buffer_iterator& operator++(int) noexcept;
constexpr output_buffer_iterator& operator*() noexcept;
Effect

none

Return value

*this

2. Function template make_iterator

namespace strf {

template <typename T>
constexpr output_buffer_iterator<T> make_iterator(strf::output_buffer<T, 0>& dest) noexcept;

} // namespace strf