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); }