Modify 31.7.6.3.4 [ostream.inserters.character] as indicated: [Drafting note: The replacement of os
by out
in p1 and the insertion of "out.
" in p4 just fix two obvious typos — end drafting note]
template<class charT, class traits> basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>& out, charT c); template<class charT, class traits> basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>& out, char c); // specialization template<class traits> basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>& out, char c); template<class traits> basic_ostream<wchar_t,traits>& operator<<(basic_ostream<wchar_t,traits>& out, wchar_t c); // signed and unsigned template<class traits> basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>& out, signed char c); template<class traits> basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>& out, unsigned char c);
-1- Effects: Behaves as a formatted output function (31.7.6.3.1 [ostream.formatted.reqmts]) of
-2- Returns:out
. Constructs a character sequenceseq
. Ifc
has typechar
and the character type of the stream is notchar
, thenseq
consists ofout.widen(c)
; otherwiseseq
consists ofc
. Determines padding forseq
as described in 31.7.6.3.1 [ostream.formatted.reqmts]. Insertsseq
intoout
. Callsos out.width(0)
.out
.
template<class charT, class traits> basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>& out, const charT* s); template<class charT, class traits> basic_ostream<charT,traits>& operator<<(basic_ostream<charT,traits>& out, const char* s); template<class traits> basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>& out, const char* s); template<class traits> basic_ostream<wchar_t,traits>& operator<<(basic_ostream<wchar_t,traits>& out, const wchar_t* s); template<class traits> basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>& out, const signed char* s); template<class traits> basic_ostream<char,traits>& operator<<(basic_ostream<char,traits>& out, const unsigned char* s);
-3- Requires:
-4- Effects: Behaves like a formatted inserter (as described in 31.7.6.3.1 [ostream.formatted.reqmts]) ofs
shall not be a null pointer.out
. Creates a character sequenceseq
ofn
characters starting ats
, each widened usingout.widen()
(27.5.5.3), wheren
is the number that would be computed as if by:
traits::length(s)
for the following overload s:
where the first argument is of type
basic_ostream<charT, traits>&
and the second is of typeconst charT*
,and also for the overload where the first argument is of type
basic_ostream<char, traits>&
and the second is of typeconst char*
,where the first argument is of type
basic_ostream<wchar_t, traits>&
and the second is of typeconst wchar_t*
,
std::char_traits<char>::length(s)
for the overload where the first argument is of typebasic_ostream<charT, traits>&
and the second is of typeconst char*
,
traits::length(reinterpret_cast<const char*>(s))
for the other two overloads.Determines padding for
-5- Returns:seq
as described in 31.7.6.3.1 [ostream.formatted.reqmts]. Insertsseq
intoout
. Callsout.width(0)
.out
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4