operator<<(std::basic_string_view) (3) - Linux Manuals
operator<<(std::basic_string_view): operator<<(std::basic_string_view)
NAME
operator<<(std::basic_string_view) - operator<<(std::basic_string_view)
Synopsis
Defined in header <string_view>
template <class CharT, class Traits>
std::basic_ostream<CharT, Traits>& (since C++17)
operator<<(std::basic_ostream<CharT, Traits>& os,
std::basic_string_view <CharT, Traits> v);
Behaves as a FormattedOutputFunction. After constructing and checking the sentry object, determines the output format padding as follows:
Then stores each character from the resulting sequence (the contents of v plus padding) to the output stream os as if by calling os.rdbuf()->sputn(seq, n), where n=std::max(os.width(), str.size())
Finally, calls os.width(0) to cancel the effects of std::setw, if any.
Exceptions
May throw std::ios_base::failure if an exception is thrown during output.
Parameters
os - a character output stream
v - the view to be inserted
Return value
os
See also
operator<< (function template)
operator>>