std::basic_stringbuf<CharT,Traits,Allocator>::view

Creates and returns a std::basic_string_view over the underlying character sequence.

# Declarations

std::basic_string_view<CharT, Traits> view() const noexcept;

(since C++20)

# Return value

A view over the underlying character sequence.

# Notes

Using of the return value is undefined behavior if the underlying character sequence is destroyed or invalidated, unless the return value is empty.

This function is typically accessed through std::basic_istringstream::view(), std::basic_ostringstream::view(), or std::basic_stringstream::view().

# See also