namespace std { template<class charT, class traits = char_traits<charT>> class basic_istream; using istream = basic_istream<char>; using wistream = basic_istream<wchar_t>; template<class charT, class traits = char_traits<charT>> class basic_iostream; using iostream = basic_iostream<char>; using wiostream = basic_iostream<wchar_t>; template<class charT, class traits> basic_istream<charT, traits>& ws(basic_istream<charT, traits>& is); template<class charT, class traits, class T> basic_istream<charT, traits>& operator>>(basic_istream<charT, traits>&& is, T&& x); }
namespace std { template<class charT, class traits = char_traits<charT>> class basic_ostream; using ostream = basic_ostream<char>; using wostream = basic_ostream<wchar_t>; template<class charT, class traits> basic_ostream<charT, traits>& endl(basic_ostream<charT, traits>& os); template<class charT, class traits> basic_ostream<charT, traits>& ends(basic_ostream<charT, traits>& os); template<class charT, class traits> basic_ostream<charT, traits>& flush(basic_ostream<charT, traits>& os); template<class charT, class traits> basic_ostream<charT, traits>& emit_on_flush(basic_ostream<charT, traits>& os); template<class charT, class traits> basic_ostream<charT, traits>& noemit_on_flush(basic_ostream<charT, traits>& os); template<class charT, class traits> basic_ostream<charT, traits>& flush_emit(basic_ostream<charT, traits>& os); template<class charT, class traits, class T> basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>&& os, const T& x); }
namespace std { // types T1, T2, ... are unspecified implementation types T1 resetiosflags(ios_base::fmtflags mask); T2 setiosflags (ios_base::fmtflags mask); T3 setbase(int base); template<class charT> T4 setfill(charT c); T5 setprecision(int n); T6 setw(int n); template<class moneyT> T7 get_money(moneyT& mon, bool intl = false); template<class moneyT> T8 put_money(const moneyT& mon, bool intl = false); template<class charT> T9 get_time(struct tm* tmb, const charT* fmt); template<class charT> T10 put_time(const struct tm* tmb, const charT* fmt); template<class charT> T11 quoted(const charT* s, charT delim = charT('"'), charT escape = charT('\\')); template<class charT, class traits, class Allocator> T12 quoted(const basic_string<charT, traits, Allocator>& s, charT delim = charT('"'), charT escape = charT('\\')); template<class charT, class traits, class Allocator> T13 quoted(basic_string<charT, traits, Allocator>& s, charT delim = charT('"'), charT escape = charT('\\')); template<class charT, class traits> T14 quoted(basic_string_view<charT, traits> s, charT delim = charT('"'), charT escape = charT('\\')); }
namespace std { template<class charT, class traits = char_traits<charT>> class basic_istream : virtual public basic_ios<charT, traits> { public: // types (inherited from basic_ios) using char_type = charT; using int_type = typename traits::int_type; using pos_type = typename traits::pos_type; using off_type = typename traits::off_type; using traits_type = traits; // [istream.cons], constructor/destructor explicit basic_istream(basic_streambuf<charT, traits>* sb); virtual ~basic_istream(); // [istream.sentry], prefix/suffix class sentry; // [istream.formatted], formatted input basic_istream<charT, traits>& operator>>(basic_istream<charT, traits>& (*pf)(basic_istream<charT, traits>&)); basic_istream<charT, traits>& operator>>(basic_ios<charT, traits>& (*pf)(basic_ios<charT, traits>&)); basic_istream<charT, traits>& operator>>(ios_base& (*pf)(ios_base&)); basic_istream<charT, traits>& operator>>(bool& n); basic_istream<charT, traits>& operator>>(short& n); basic_istream<charT, traits>& operator>>(unsigned short& n); basic_istream<charT, traits>& operator>>(int& n); basic_istream<charT, traits>& operator>>(unsigned int& n); basic_istream<charT, traits>& operator>>(long& n); basic_istream<charT, traits>& operator>>(unsigned long& n); basic_istream<charT, traits>& operator>>(long long& n); basic_istream<charT, traits>& operator>>(unsigned long long& n); basic_istream<charT, traits>& operator>>(float& f); basic_istream<charT, traits>& operator>>(double& f); basic_istream<charT, traits>& operator>>(long double& f); basic_istream<charT, traits>& operator>>(void*& p); basic_istream<charT, traits>& operator>>(basic_streambuf<char_type, traits>* sb); // [istream.unformatted], unformatted input streamsize gcount() const; int_type get(); basic_istream<charT, traits>& get(char_type& c); basic_istream<charT, traits>& get(char_type* s, streamsize n); basic_istream<charT, traits>& get(char_type* s, streamsize n, char_type delim); basic_istream<charT, traits>& get(basic_streambuf<char_type, traits>& sb); basic_istream<charT, traits>& get(basic_streambuf<char_type, traits>& sb, char_type delim); basic_istream<charT, traits>& getline(char_type* s, streamsize n); basic_istream<charT, traits>& getline(char_type* s, streamsize n, char_type delim); basic_istream<charT, traits>& ignore(streamsize n = 1, int_type delim = traits::eof()); int_type peek(); basic_istream<charT, traits>& read (char_type* s, streamsize n); streamsize readsome(char_type* s, streamsize n); basic_istream<charT, traits>& putback(char_type c); basic_istream<charT, traits>& unget(); int sync(); pos_type tellg(); basic_istream<charT, traits>& seekg(pos_type); basic_istream<charT, traits>& seekg(off_type, ios_base::seekdir); protected: // [istream.cons], copy/move constructor basic_istream(const basic_istream&) = delete; basic_istream(basic_istream&& rhs); // [istream.assign], assign and swap basic_istream& operator=(const basic_istream&) = delete; basic_istream& operator=(basic_istream&& rhs); void swap(basic_istream& rhs); }; // [istream.extractors], character extraction templates template<class charT, class traits> basic_istream<charT, traits>& operator>>(basic_istream<charT, traits>&, charT&); template<class traits> basic_istream<char, traits>& operator>>(basic_istream<char, traits>&, unsigned char&); template<class traits> basic_istream<char, traits>& operator>>(basic_istream<char, traits>&, signed char&); template<class charT, class traits, size_t N> basic_istream<charT, traits>& operator>>(basic_istream<charT, traits>&, charT(&)[N]); template<class traits, size_t N> basic_istream<char, traits>& operator>>(basic_istream<char, traits>&, unsigned char(&)[N]); template<class traits, size_t N> basic_istream<char, traits>& operator>>(basic_istream<char, traits>&, signed char(&)[N]); }
explicit basic_istream(basic_streambuf<charT, traits>* sb);
basic_istream(basic_istream&& rhs);
virtual ~basic_istream();
basic_istream& operator=(basic_istream&& rhs);
void swap(basic_istream& rhs);
namespace std { template<class charT, class traits = char_traits<charT>> class basic_istream<charT, traits>::sentry { bool ok_; // exposition only public: explicit sentry(basic_istream<charT, traits>& is, bool noskipws = false); ~sentry(); explicit operator bool() const { return ok_; } sentry(const sentry&) = delete; sentry& operator=(const sentry&) = delete; }; }
explicit sentry(basic_istream<charT, traits>& is, bool noskipws = false);
const ctype<charT>& ctype = use_facet<ctype<charT>>(is.getloc()); if (ctype.is(ctype.space, c) != 0) // c is a whitespace character.
~sentry();
explicit operator bool() const;
operator>>(unsigned short& val);
operator>>(unsigned int& val);
operator>>(long& val);
operator>>(unsigned long& val);
operator>>(long long& val);
operator>>(unsigned long long& val);
operator>>(float& val);
operator>>(double& val);
operator>>(long double& val);
operator>>(bool& val);
operator>>(void*& val);
using numget = num_get<charT, istreambuf_iterator<charT, traits>>; iostate err = iostate::goodbit; use_facet<numget>(loc).get(*this, 0, *this, err, val); setstate(err);
operator>>(short& val);
using numget = num_get<charT, istreambuf_iterator<charT, traits>>; iostate err = ios_base::goodbit; long lval; use_facet<numget>(loc).get(*this, 0, *this, err, lval); if (lval < numeric_limits<short>::min()) { err |= ios_base::failbit; val = numeric_limits<short>::min(); } else if (numeric_limits<short>::max() < lval) { err |= ios_base::failbit; val = numeric_limits<short>::max(); } else val = static_cast<short>(lval); setstate(err);
operator>>(int& val);
using numget = num_get<charT, istreambuf_iterator<charT, traits>>; iostate err = ios_base::goodbit; long lval; use_facet<numget>(loc).get(*this, 0, *this, err, lval); if (lval < numeric_limits<int>::min()) { err |= ios_base::failbit; val = numeric_limits<int>::min(); } else if (numeric_limits<int>::max() < lval) { err |= ios_base::failbit; val = numeric_limits<int>::max(); } else val = static_cast<int>(lval); setstate(err);
basic_istream<charT, traits>&
operator>>(basic_istream<charT, traits>& (*pf)(basic_istream<charT, traits>&));
basic_istream<charT, traits>&
operator>>(basic_ios<charT, traits>& (*pf)(basic_ios<charT, traits>&));
basic_istream<charT, traits>& operator>>(ios_base& (*pf)(ios_base&));
template<class charT, class traits, size_t N>
basic_istream<charT, traits>& operator>>(basic_istream<charT, traits>& in, charT (&s)[N]);
template<class traits, size_t N>
basic_istream<char, traits>& operator>>(basic_istream<char, traits>& in, unsigned char (&s)[N]);
template<class traits, size_t N>
basic_istream<char, traits>& operator>>(basic_istream<char, traits>& in, signed char (&s)[N]);
template<class charT, class traits>
basic_istream<charT, traits>& operator>>(basic_istream<charT, traits>& in, charT& c);
template<class traits>
basic_istream<char, traits>& operator>>(basic_istream<char, traits>& in, unsigned char& c);
template<class traits>
basic_istream<char, traits>& operator>>(basic_istream<char, traits>& in, signed char& c);
basic_istream<charT, traits>& operator>>(basic_streambuf<charT, traits>* sb);
streamsize gcount() const;
int_type get();
basic_istream<charT, traits>& get(char_type& c);
basic_istream<charT, traits>& get(char_type* s, streamsize n, char_type delim);
basic_istream<charT, traits>& get(char_type* s, streamsize n);
basic_istream<charT, traits>& get(basic_streambuf<char_type, traits>& sb, char_type delim);
basic_istream<charT, traits>& get(basic_streambuf<char_type, traits>& sb);
basic_istream<charT, traits>& getline(char_type* s, streamsize n, char_type delim);
#include <iostream> int main() { using namespace std; const int line_buffer_size = 100; char buffer[line_buffer_size]; int line_number = 0; while (cin.getline(buffer, line_buffer_size, '\n') || cin.gcount()) { int count = cin.gcount(); if (cin.eof()) cout << "Partial final line"; // cin.fail() is false else if (cin.fail()) { cout << "Partial long line"; cin.clear(cin.rdstate() & ~ios_base::failbit); } else { count--; // Don't include newline in count cout << "Line " << ++line_number; } cout << " (" << count << " chars): " << buffer << endl; } }— end example
basic_istream<charT, traits>& getline(char_type* s, streamsize n);
basic_istream<charT, traits>& ignore(streamsize n = 1, int_type delim = traits::eof());
int_type peek();
basic_istream<charT, traits>& read(char_type* s, streamsize n);
streamsize readsome(char_type* s, streamsize n);
basic_istream<charT, traits>& putback(char_type c);
basic_istream<charT, traits>& unget();
int sync();
pos_type tellg();
basic_istream<charT, traits>& seekg(pos_type pos);
basic_istream<charT, traits>& seekg(off_type off, ios_base::seekdir dir);
template<class charT, class traits>
basic_istream<charT, traits>& ws(basic_istream<charT, traits>& is);
template<class Istream, class T>
Istream&& operator>>(Istream&& is, T&& x);
namespace std { template<class charT, class traits = char_traits<charT>> class basic_iostream : public basic_istream<charT, traits>, public basic_ostream<charT, traits> { public: using char_type = charT; using int_type = typename traits::int_type; using pos_type = typename traits::pos_type; using off_type = typename traits::off_type; using traits_type = traits; // [iostream.cons], constructor explicit basic_iostream(basic_streambuf<charT, traits>* sb); // [iostream.dest], destructor virtual ~basic_iostream(); protected: // [iostream.cons], constructor basic_iostream(const basic_iostream&) = delete; basic_iostream(basic_iostream&& rhs); // [iostream.assign], assign and swap basic_iostream& operator=(const basic_iostream&) = delete; basic_iostream& operator=(basic_iostream&& rhs); void swap(basic_iostream& rhs); }; }
explicit basic_iostream(basic_streambuf<charT, traits>* sb);
basic_iostream(basic_iostream&& rhs);
basic_iostream& operator=(basic_iostream&& rhs);
void swap(basic_iostream& rhs);
namespace std { template<class charT, class traits = char_traits<charT>> class basic_ostream : virtual public basic_ios<charT, traits> { public: // types (inherited from basic_ios) using char_type = charT; using int_type = typename traits::int_type; using pos_type = typename traits::pos_type; using off_type = typename traits::off_type; using traits_type = traits; // [ostream.cons], constructor/destructor explicit basic_ostream(basic_streambuf<char_type, traits>* sb); virtual ~basic_ostream(); // [ostream.sentry], prefix/suffix class sentry; // [ostream.formatted], formatted output basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>& (*pf)(basic_ostream<charT, traits>&)); basic_ostream<charT, traits>& operator<<(basic_ios<charT, traits>& (*pf)(basic_ios<charT, traits>&)); basic_ostream<charT, traits>& operator<<(ios_base& (*pf)(ios_base&)); basic_ostream<charT, traits>& operator<<(bool n); basic_ostream<charT, traits>& operator<<(short n); basic_ostream<charT, traits>& operator<<(unsigned short n); basic_ostream<charT, traits>& operator<<(int n); basic_ostream<charT, traits>& operator<<(unsigned int n); basic_ostream<charT, traits>& operator<<(long n); basic_ostream<charT, traits>& operator<<(unsigned long n); basic_ostream<charT, traits>& operator<<(long long n); basic_ostream<charT, traits>& operator<<(unsigned long long n); basic_ostream<charT, traits>& operator<<(float f); basic_ostream<charT, traits>& operator<<(double f); basic_ostream<charT, traits>& operator<<(long double f); basic_ostream<charT, traits>& operator<<(const void* p); basic_ostream<charT, traits>& operator<<(nullptr_t); basic_ostream<charT, traits>& operator<<(basic_streambuf<char_type, traits>* sb); // [ostream.unformatted], unformatted output basic_ostream<charT, traits>& put(char_type c); basic_ostream<charT, traits>& write(const char_type* s, streamsize n); basic_ostream<charT, traits>& flush(); // [ostream.seeks], seeks pos_type tellp(); basic_ostream<charT, traits>& seekp(pos_type); basic_ostream<charT, traits>& seekp(off_type, ios_base::seekdir); protected: // [ostream.cons], copy/move constructor basic_ostream(const basic_ostream&) = delete; basic_ostream(basic_ostream&& rhs); // [ostream.assign], assign and swap basic_ostream& operator=(const basic_ostream&) = delete; basic_ostream& operator=(basic_ostream&& rhs); void swap(basic_ostream& rhs); }; // [ostream.inserters.character], character inserters template<class charT, class traits> basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>&, charT); template<class charT, class traits> basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>&, char); template<class traits> basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, char); template<class traits> basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, signed char); template<class traits> basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, unsigned char); template<class traits> basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, wchar_t) = delete; template<class traits> basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, char8_t) = delete; template<class traits> basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, char16_t) = delete; template<class traits> basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, char32_t) = delete; template<class traits> basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, char8_t) = delete; template<class traits> basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, char16_t) = delete; template<class traits> basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, char32_t) = delete; template<class charT, class traits> basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>&, const charT*); template<class charT, class traits> basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>&, const char*); template<class traits> basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, const char*); template<class traits> basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, const signed char*); template<class traits> basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, const unsigned char*); template<class traits> basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, const wchar_t*) = delete; template<class traits> basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, const char8_t*) = delete; template<class traits> basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, const char16_t*) = delete; template<class traits> basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, const char32_t*) = delete; template<class traits> basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, const char8_t*) = delete; template<class traits> basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, const char16_t*) = delete; template<class traits> basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, const char32_t*) = delete; }
explicit basic_ostream(basic_streambuf<charT, traits>* sb);
basic_ostream(basic_ostream&& rhs);
virtual ~basic_ostream();
basic_ostream& operator=(basic_ostream&& rhs);
void swap(basic_ostream& rhs);
namespace std { template<class charT, class traits = char_traits<charT>> class basic_ostream<charT, traits>::sentry { bool ok_; // exposition only public: explicit sentry(basic_ostream<charT, traits>& os); ~sentry(); explicit operator bool() const { return ok_; } sentry(const sentry&) = delete; sentry& operator=(const sentry&) = delete; }; }
explicit sentry(basic_ostream<charT, traits>& os);
~sentry();
explicit operator bool() const;
pos_type tellp();
basic_ostream<charT, traits>& seekp(pos_type pos);
basic_ostream<charT, traits>& seekp(off_type off, ios_base::seekdir dir);
operator<<(bool val);
operator<<(short val);
operator<<(unsigned short val);
operator<<(int val);
operator<<(unsigned int val);
operator<<(long val);
operator<<(unsigned long val);
operator<<(long long val);
operator<<(unsigned long long val);
operator<<(float val);
operator<<(double val);
operator<<(long double val);
operator<<(const void* val);
bool failed = use_facet< num_put<charT, ostreambuf_iterator<charT, traits>> >(getloc()).put(*this, *this, fill(), val).failed();
ios_base::fmtflags baseflags = ios_base::flags() & ios_base::basefield; bool failed = use_facet< num_put<charT, ostreambuf_iterator<charT, traits>> >(getloc()).put(*this, *this, fill(), baseflags == ios_base::oct || baseflags == ios_base::hex ? static_cast<long>(static_cast<unsigned short>(val)) : static_cast<long>(val)).failed();
ios_base::fmtflags baseflags = ios_base::flags() & ios_base::basefield; bool failed = use_facet< num_put<charT, ostreambuf_iterator<charT, traits>> >(getloc()).put(*this, *this, fill(), baseflags == ios_base::oct || baseflags == ios_base::hex ? static_cast<long>(static_cast<unsigned int>(val)) : static_cast<long>(val)).failed();
bool failed = use_facet< num_put<charT, ostreambuf_iterator<charT, traits>> >(getloc()).put(*this, *this, fill(), static_cast<unsigned long>(val)).failed();
bool failed = use_facet< num_put<charT, ostreambuf_iterator<charT, traits>> >(getloc()).put(*this, *this, fill(), static_cast<double>(val)).failed();
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& (*pf)(basic_ostream<charT, traits>&));
basic_ostream<charT, traits>&
operator<<(basic_ios<charT, traits>& (*pf)(basic_ios<charT, traits>&));
basic_ostream<charT, traits>& operator<<(ios_base& (*pf)(ios_base&));
basic_ostream<charT, traits>& operator<<(basic_streambuf<charT, traits>* sb);
basic_ostream<charT, traits>& operator<<(nullptr_t);
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);
// 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);
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);
basic_ostream<charT, traits>& put(char_type c);
basic_ostream& write(const char_type* s, streamsize n);
basic_ostream& flush();
template<class charT, class traits>
basic_ostream<charT, traits>& endl(basic_ostream<charT, traits>& os);
template<class charT, class traits>
basic_ostream<charT, traits>& ends(basic_ostream<charT, traits>& os);
template<class charT, class traits>
basic_ostream<charT, traits>& flush(basic_ostream<charT, traits>& os);
template<class charT, class traits>
basic_ostream<charT, traits>& emit_on_flush(basic_ostream<charT, traits>& os);
template<class charT, class traits>
basic_ostream<charT, traits>& noemit_on_flush(basic_ostream<charT, traits>& os);
template<class charT, class traits>
basic_ostream<charT, traits>& flush_emit(basic_ostream<charT, traits>& os);
template<class Ostream, class T>
Ostream&& operator<<(Ostream&& os, const T& x);
unspecified resetiosflags(ios_base::fmtflags mask);
void f(ios_base& str, ios_base::fmtflags mask) { // reset specified flags str.setf(ios_base::fmtflags(0), mask); }
unspecified setiosflags(ios_base::fmtflags mask);
void f(ios_base& str, ios_base::fmtflags mask) { // set specified flags str.setf(mask); }
unspecified setbase(int base);
void f(ios_base& str, int base) { // set basefield str.setf(base == 8 ? ios_base::oct : base == 10 ? ios_base::dec : base == 16 ? ios_base::hex : ios_base::fmtflags(0), ios_base::basefield); }
unspecified setfill(char_type c);
template<class charT, class traits> void f(basic_ios<charT, traits>& str, charT c) { // set fill character str.fill(c); }
unspecified setprecision(int n);
void f(ios_base& str, int n) { // set precision str.precision(n); }
unspecified setw(int n);
void f(ios_base& str, int n) { // set width str.width(n); }
template<class moneyT> unspecified get_money(moneyT& mon, bool intl = false);
template<class charT, class traits, class moneyT> void f(basic_ios<charT, traits>& str, moneyT& mon, bool intl) { using Iter = istreambuf_iterator<charT, traits>; using MoneyGet = money_get<charT, Iter>; ios_base::iostate err = ios_base::goodbit; const MoneyGet& mg = use_facet<MoneyGet>(str.getloc()); mg.get(Iter(str.rdbuf()), Iter(), intl, str, err, mon); if (ios_base::goodbit != err) str.setstate(err); }
template<class moneyT> unspecified put_money(const moneyT& mon, bool intl = false);
template<class charT, class traits, class moneyT> void f(basic_ios<charT, traits>& str, const moneyT& mon, bool intl) { using Iter = ostreambuf_iterator<charT, traits>; using MoneyPut = money_put<charT, Iter>; const MoneyPut& mp = use_facet<MoneyPut>(str.getloc()); const Iter end = mp.put(Iter(str.rdbuf()), intl, str, str.fill(), mon); if (end.failed()) str.setstate(ios_base::badbit); }
template<class charT> unspecified get_time(struct tm* tmb, const charT* fmt);
template<class charT, class traits> void f(basic_ios<charT, traits>& str, struct tm* tmb, const charT* fmt) { using Iter = istreambuf_iterator<charT, traits>; using TimeGet = time_get<charT, Iter>; ios_base::iostate err = ios_base::goodbit; const TimeGet& tg = use_facet<TimeGet>(str.getloc()); tg.get(Iter(str.rdbuf()), Iter(), str, err, tmb, fmt, fmt + traits::length(fmt)); if (err != ios_base::goodbit) str.setstate(err); }
template<class charT> unspecified put_time(const struct tm* tmb, const charT* fmt);
template<class charT, class traits> void f(basic_ios<charT, traits>& str, const struct tm* tmb, const charT* fmt) { using Iter = ostreambuf_iterator<charT, traits>; using TimePut = time_put<charT, Iter>; const TimePut& tp = use_facet<TimePut>(str.getloc()); const Iter end = tp.put(Iter(str.rdbuf()), str, str.fill(), tmb, fmt, fmt + traits::length(fmt)); if (end.failed()) str.setstate(ios_base::badbit); }
template<class charT>
unspecified quoted(const charT* s, charT delim = charT('"'), charT escape = charT('\\'));
template<class charT, class traits, class Allocator>
unspecified quoted(const basic_string<charT, traits, Allocator>& s,
charT delim = charT('"'), charT escape = charT('\\'));
template<class charT, class traits>
unspecified quoted(basic_string_view<charT, traits> s,
charT delim = charT('"'), charT escape = charT('\\'));
template<class charT, class traits, class Allocator>
unspecified quoted(basic_string<charT, traits, Allocator>& s,
charT delim = charT('"'), charT escape = charT('\\'));