[string.view.io] (original) (raw)

21 Strings library [strings]

21.4 String view classes [string.view]

21.4.6 Inserters and extractors [string.view.io]

template<class charT, class traits> basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>& os, basic_string_view<charT, traits> str);

Forms a character sequenceseq, initially consisting of the elements defined by the range [str.begin(), str.end()).

Then inserts seq as if by callingos.rdbuf()->sputn(​seq, n), where n is the larger of os.width() and str.size(); then calls os.​width(0).