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);
template<class traits>
basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>& out, char c);
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);
Constructs a character sequence
seq. If
c has type
char
and the character type of the stream is not
char,
then
seq consists of
out.widen(c);
otherwise
seq consists of
c. 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<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);
Requires:
s shall not be a null pointer
. Creates a character sequence
seq of
n characters
starting at
s, each widened using
out.widen() (
[basic.ios.members]),
where
n is the number that would be computed as if by:
traits::length(s)
for the overload where the first argument is of type
basic_ostream<charT, traits>&
and the second is of type
const charT*,
and also for the overload where the first argument is of type
basic_ostream<char, traits>&
and the second is of type
const char*,
char_traits<char>::length(s)
for the overload where the first argument is of type
basic_ostream<charT, traits>&
and the second is of type
const char*,
traits::length(reinterpret_cast<const char*>(s))
for the other two overloads
.