Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/c++/v1/__cxx03/iomanip is written in an unsupported language. File is not indexed.

0001 // -*- C++ -*-
0002 //===----------------------------------------------------------------------===//
0003 //
0004 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0005 // See https://llvm.org/LICENSE.txt for license information.
0006 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0007 //
0008 //===----------------------------------------------------------------------===//
0009 
0010 #ifndef _LIBCPP___CXX03_IOMANIP
0011 #define _LIBCPP___CXX03_IOMANIP
0012 
0013 /*
0014     iomanip synopsis
0015 
0016 namespace std {
0017 
0018 // types T1, T2, ... are unspecified implementation types
0019 T1 resetiosflags(ios_base::fmtflags mask);
0020 T2 setiosflags (ios_base::fmtflags mask);
0021 T3 setbase(int base);
0022 template<charT> T4 setfill(charT c);
0023 T5 setprecision(int n);
0024 T6 setw(int n);
0025 template <class moneyT> T7 get_money(moneyT& mon, bool intl = false);
0026 template <class charT, class moneyT> T8 put_money(const moneyT& mon, bool intl = false);
0027 template <class charT> T9 get_time(struct tm* tmb, const charT* fmt);
0028 template <class charT> T10 put_time(const struct tm* tmb, const charT* fmt);
0029 
0030 template <class charT>
0031   T11 quoted(const charT* s, charT delim=charT('"'), charT escape=charT('\\')); // C++14
0032 
0033 template <class charT, class traits, class Allocator>
0034   T12 quoted(const basic_string<charT, traits, Allocator>& s,
0035              charT delim=charT('"'), charT escape=charT('\\')); // C++14
0036 
0037 template <class charT, class traits, class Allocator>
0038   T13 quoted(basic_string<charT, traits, Allocator>& s,
0039              charT delim=charT('"'), charT escape=charT('\\')); // C++14
0040 
0041 }  // std
0042 
0043 */
0044 
0045 #include <__cxx03/__config>
0046 #include <__cxx03/istream>
0047 #include <__cxx03/version>
0048 
0049 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0050 #  pragma GCC system_header
0051 #endif
0052 
0053 _LIBCPP_BEGIN_NAMESPACE_STD
0054 
0055 // resetiosflags
0056 
0057 class __iom_t1 {
0058   ios_base::fmtflags __mask_;
0059 
0060 public:
0061   _LIBCPP_HIDE_FROM_ABI explicit __iom_t1(ios_base::fmtflags __m) : __mask_(__m) {}
0062 
0063   template <class _CharT, class _Traits>
0064   friend _LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
0065   operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t1& __x) {
0066     __is.unsetf(__x.__mask_);
0067     return __is;
0068   }
0069 
0070   template <class _CharT, class _Traits>
0071   friend _LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
0072   operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t1& __x) {
0073     __os.unsetf(__x.__mask_);
0074     return __os;
0075   }
0076 };
0077 
0078 inline _LIBCPP_HIDE_FROM_ABI __iom_t1 resetiosflags(ios_base::fmtflags __mask) { return __iom_t1(__mask); }
0079 
0080 // setiosflags
0081 
0082 class __iom_t2 {
0083   ios_base::fmtflags __mask_;
0084 
0085 public:
0086   _LIBCPP_HIDE_FROM_ABI explicit __iom_t2(ios_base::fmtflags __m) : __mask_(__m) {}
0087 
0088   template <class _CharT, class _Traits>
0089   friend _LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
0090   operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t2& __x) {
0091     __is.setf(__x.__mask_);
0092     return __is;
0093   }
0094 
0095   template <class _CharT, class _Traits>
0096   friend _LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
0097   operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t2& __x) {
0098     __os.setf(__x.__mask_);
0099     return __os;
0100   }
0101 };
0102 
0103 inline _LIBCPP_HIDE_FROM_ABI __iom_t2 setiosflags(ios_base::fmtflags __mask) { return __iom_t2(__mask); }
0104 
0105 // setbase
0106 
0107 class __iom_t3 {
0108   int __base_;
0109 
0110 public:
0111   _LIBCPP_HIDE_FROM_ABI explicit __iom_t3(int __b) : __base_(__b) {}
0112 
0113   template <class _CharT, class _Traits>
0114   friend _LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
0115   operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t3& __x) {
0116     __is.setf(__x.__base_ == 8    ? ios_base::oct
0117               : __x.__base_ == 10 ? ios_base::dec
0118               : __x.__base_ == 16 ? ios_base::hex
0119                                   : ios_base::fmtflags(0),
0120               ios_base::basefield);
0121     return __is;
0122   }
0123 
0124   template <class _CharT, class _Traits>
0125   friend _LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
0126   operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t3& __x) {
0127     __os.setf(__x.__base_ == 8    ? ios_base::oct
0128               : __x.__base_ == 10 ? ios_base::dec
0129               : __x.__base_ == 16 ? ios_base::hex
0130                                   : ios_base::fmtflags(0),
0131               ios_base::basefield);
0132     return __os;
0133   }
0134 };
0135 
0136 inline _LIBCPP_HIDE_FROM_ABI __iom_t3 setbase(int __base) { return __iom_t3(__base); }
0137 
0138 // setfill
0139 
0140 template <class _CharT>
0141 class __iom_t4 {
0142   _CharT __fill_;
0143 
0144 public:
0145   _LIBCPP_HIDE_FROM_ABI explicit __iom_t4(_CharT __c) : __fill_(__c) {}
0146 
0147   template <class _Traits>
0148   friend _LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
0149   operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t4& __x) {
0150     __os.fill(__x.__fill_);
0151     return __os;
0152   }
0153 };
0154 
0155 template <class _CharT>
0156 inline _LIBCPP_HIDE_FROM_ABI __iom_t4<_CharT> setfill(_CharT __c) {
0157   return __iom_t4<_CharT>(__c);
0158 }
0159 
0160 // setprecision
0161 
0162 class __iom_t5 {
0163   int __n_;
0164 
0165 public:
0166   _LIBCPP_HIDE_FROM_ABI explicit __iom_t5(int __n) : __n_(__n) {}
0167 
0168   template <class _CharT, class _Traits>
0169   friend _LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
0170   operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t5& __x) {
0171     __is.precision(__x.__n_);
0172     return __is;
0173   }
0174 
0175   template <class _CharT, class _Traits>
0176   friend _LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
0177   operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t5& __x) {
0178     __os.precision(__x.__n_);
0179     return __os;
0180   }
0181 };
0182 
0183 inline _LIBCPP_HIDE_FROM_ABI __iom_t5 setprecision(int __n) { return __iom_t5(__n); }
0184 
0185 // setw
0186 
0187 class __iom_t6 {
0188   int __n_;
0189 
0190 public:
0191   _LIBCPP_HIDE_FROM_ABI explicit __iom_t6(int __n) : __n_(__n) {}
0192 
0193   template <class _CharT, class _Traits>
0194   friend _LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
0195   operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t6& __x) {
0196     __is.width(__x.__n_);
0197     return __is;
0198   }
0199 
0200   template <class _CharT, class _Traits>
0201   friend _LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
0202   operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t6& __x) {
0203     __os.width(__x.__n_);
0204     return __os;
0205   }
0206 };
0207 
0208 inline _LIBCPP_HIDE_FROM_ABI __iom_t6 setw(int __n) { return __iom_t6(__n); }
0209 
0210 // get_money
0211 
0212 template <class _MoneyT>
0213 class __iom_t7;
0214 
0215 template <class _CharT, class _Traits, class _MoneyT>
0216 _LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
0217 operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t7<_MoneyT>& __x);
0218 
0219 template <class _MoneyT>
0220 class __iom_t7 {
0221   _MoneyT& __mon_;
0222   bool __intl_;
0223 
0224 public:
0225   _LIBCPP_HIDE_FROM_ABI __iom_t7(_MoneyT& __mon, bool __intl) : __mon_(__mon), __intl_(__intl) {}
0226 
0227   template <class _CharT, class _Traits, class _Mp>
0228   friend basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t7<_Mp>& __x);
0229 };
0230 
0231 template <class _CharT, class _Traits, class _MoneyT>
0232 _LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
0233 operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t7<_MoneyT>& __x) {
0234 #ifndef _LIBCPP_HAS_NO_EXCEPTIONS
0235   try {
0236 #endif // _LIBCPP_HAS_NO_EXCEPTIONS
0237     typename basic_istream<_CharT, _Traits>::sentry __s(__is);
0238     if (__s) {
0239       typedef istreambuf_iterator<_CharT, _Traits> _Ip;
0240       typedef money_get<_CharT, _Ip> _Fp;
0241       ios_base::iostate __err = ios_base::goodbit;
0242       const _Fp& __mf         = std::use_facet<_Fp>(__is.getloc());
0243       __mf.get(_Ip(__is), _Ip(), __x.__intl_, __is, __err, __x.__mon_);
0244       __is.setstate(__err);
0245     }
0246 #ifndef _LIBCPP_HAS_NO_EXCEPTIONS
0247   } catch (...) {
0248     __is.__set_badbit_and_consider_rethrow();
0249   }
0250 #endif // _LIBCPP_HAS_NO_EXCEPTIONS
0251   return __is;
0252 }
0253 
0254 template <class _MoneyT>
0255 inline _LIBCPP_HIDE_FROM_ABI __iom_t7<_MoneyT> get_money(_MoneyT& __mon, bool __intl = false) {
0256   return __iom_t7<_MoneyT>(__mon, __intl);
0257 }
0258 
0259 // put_money
0260 
0261 template <class _MoneyT>
0262 class __iom_t8;
0263 
0264 template <class _CharT, class _Traits, class _MoneyT>
0265 _LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
0266 operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t8<_MoneyT>& __x);
0267 
0268 template <class _MoneyT>
0269 class __iom_t8 {
0270   const _MoneyT& __mon_;
0271   bool __intl_;
0272 
0273 public:
0274   _LIBCPP_HIDE_FROM_ABI __iom_t8(const _MoneyT& __mon, bool __intl) : __mon_(__mon), __intl_(__intl) {}
0275 
0276   template <class _CharT, class _Traits, class _Mp>
0277   friend basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t8<_Mp>& __x);
0278 };
0279 
0280 template <class _CharT, class _Traits, class _MoneyT>
0281 _LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
0282 operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t8<_MoneyT>& __x) {
0283 #ifndef _LIBCPP_HAS_NO_EXCEPTIONS
0284   try {
0285 #endif // _LIBCPP_HAS_NO_EXCEPTIONS
0286     typename basic_ostream<_CharT, _Traits>::sentry __s(__os);
0287     if (__s) {
0288       typedef ostreambuf_iterator<_CharT, _Traits> _Op;
0289       typedef money_put<_CharT, _Op> _Fp;
0290       const _Fp& __mf = std::use_facet<_Fp>(__os.getloc());
0291       if (__mf.put(_Op(__os), __x.__intl_, __os, __os.fill(), __x.__mon_).failed())
0292         __os.setstate(ios_base::badbit);
0293     }
0294 #ifndef _LIBCPP_HAS_NO_EXCEPTIONS
0295   } catch (...) {
0296     __os.__set_badbit_and_consider_rethrow();
0297   }
0298 #endif // _LIBCPP_HAS_NO_EXCEPTIONS
0299   return __os;
0300 }
0301 
0302 template <class _MoneyT>
0303 inline _LIBCPP_HIDE_FROM_ABI __iom_t8<_MoneyT> put_money(const _MoneyT& __mon, bool __intl = false) {
0304   return __iom_t8<_MoneyT>(__mon, __intl);
0305 }
0306 
0307 // get_time
0308 
0309 template <class _CharT>
0310 class __iom_t9;
0311 
0312 template <class _CharT, class _Traits>
0313 _LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
0314 operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t9<_CharT>& __x);
0315 
0316 template <class _CharT>
0317 class __iom_t9 {
0318   tm* __tm_;
0319   const _CharT* __fmt_;
0320 
0321 public:
0322   _LIBCPP_HIDE_FROM_ABI __iom_t9(tm* __tm, const _CharT* __fmt) : __tm_(__tm), __fmt_(__fmt) {}
0323 
0324   template <class _Cp, class _Traits>
0325   friend basic_istream<_Cp, _Traits>& operator>>(basic_istream<_Cp, _Traits>& __is, const __iom_t9<_Cp>& __x);
0326 };
0327 
0328 template <class _CharT, class _Traits>
0329 _LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
0330 operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t9<_CharT>& __x) {
0331 #ifndef _LIBCPP_HAS_NO_EXCEPTIONS
0332   try {
0333 #endif // _LIBCPP_HAS_NO_EXCEPTIONS
0334     typename basic_istream<_CharT, _Traits>::sentry __s(__is);
0335     if (__s) {
0336       typedef istreambuf_iterator<_CharT, _Traits> _Ip;
0337       typedef time_get<_CharT, _Ip> _Fp;
0338       ios_base::iostate __err = ios_base::goodbit;
0339       const _Fp& __tf         = std::use_facet<_Fp>(__is.getloc());
0340       __tf.get(_Ip(__is), _Ip(), __is, __err, __x.__tm_, __x.__fmt_, __x.__fmt_ + _Traits::length(__x.__fmt_));
0341       __is.setstate(__err);
0342     }
0343 #ifndef _LIBCPP_HAS_NO_EXCEPTIONS
0344   } catch (...) {
0345     __is.__set_badbit_and_consider_rethrow();
0346   }
0347 #endif // _LIBCPP_HAS_NO_EXCEPTIONS
0348   return __is;
0349 }
0350 
0351 template <class _CharT>
0352 inline _LIBCPP_HIDE_FROM_ABI __iom_t9<_CharT> get_time(tm* __tm, const _CharT* __fmt) {
0353   return __iom_t9<_CharT>(__tm, __fmt);
0354 }
0355 
0356 // put_time
0357 
0358 template <class _CharT>
0359 class __iom_t10;
0360 
0361 template <class _CharT, class _Traits>
0362 _LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
0363 operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t10<_CharT>& __x);
0364 
0365 template <class _CharT>
0366 class __iom_t10 {
0367   const tm* __tm_;
0368   const _CharT* __fmt_;
0369 
0370 public:
0371   _LIBCPP_HIDE_FROM_ABI __iom_t10(const tm* __tm, const _CharT* __fmt) : __tm_(__tm), __fmt_(__fmt) {}
0372 
0373   template <class _Cp, class _Traits>
0374   friend basic_ostream<_Cp, _Traits>& operator<<(basic_ostream<_Cp, _Traits>& __os, const __iom_t10<_Cp>& __x);
0375 };
0376 
0377 template <class _CharT, class _Traits>
0378 _LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
0379 operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t10<_CharT>& __x) {
0380 #ifndef _LIBCPP_HAS_NO_EXCEPTIONS
0381   try {
0382 #endif // _LIBCPP_HAS_NO_EXCEPTIONS
0383     typename basic_ostream<_CharT, _Traits>::sentry __s(__os);
0384     if (__s) {
0385       typedef ostreambuf_iterator<_CharT, _Traits> _Op;
0386       typedef time_put<_CharT, _Op> _Fp;
0387       const _Fp& __tf = std::use_facet<_Fp>(__os.getloc());
0388       if (__tf.put(_Op(__os), __os, __os.fill(), __x.__tm_, __x.__fmt_, __x.__fmt_ + _Traits::length(__x.__fmt_))
0389               .failed())
0390         __os.setstate(ios_base::badbit);
0391     }
0392 #ifndef _LIBCPP_HAS_NO_EXCEPTIONS
0393   } catch (...) {
0394     __os.__set_badbit_and_consider_rethrow();
0395   }
0396 #endif // _LIBCPP_HAS_NO_EXCEPTIONS
0397   return __os;
0398 }
0399 
0400 template <class _CharT>
0401 inline _LIBCPP_HIDE_FROM_ABI __iom_t10<_CharT> put_time(const tm* __tm, const _CharT* __fmt) {
0402   return __iom_t10<_CharT>(__tm, __fmt);
0403 }
0404 
0405 template <class _CharT, class _Traits>
0406 _LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>& __quoted_output(
0407     basic_ostream<_CharT, _Traits>& __os,
0408     const _CharT* __first,
0409     const _CharT* __last,
0410     _CharT __delim,
0411     _CharT __escape) {
0412   basic_string<_CharT, _Traits> __str;
0413   __str.push_back(__delim);
0414   for (; __first != __last; ++__first) {
0415     if (_Traits::eq(*__first, __escape) || _Traits::eq(*__first, __delim))
0416       __str.push_back(__escape);
0417     __str.push_back(*__first);
0418   }
0419   __str.push_back(__delim);
0420   return std::__put_character_sequence(__os, __str.data(), __str.size());
0421 }
0422 
0423 template <class _CharT, class _Traits, class _String>
0424 _LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
0425 __quoted_input(basic_istream<_CharT, _Traits>& __is, _String& __string, _CharT __delim, _CharT __escape) {
0426   __string.clear();
0427   _CharT __c;
0428   __is >> __c;
0429   if (__is.fail())
0430     return __is;
0431 
0432   if (!_Traits::eq(__c, __delim)) {
0433     // no delimiter, read the whole string
0434     __is.unget();
0435     __is >> __string;
0436     return __is;
0437   }
0438 
0439   __save_flags<_CharT, _Traits> __sf(__is);
0440   std::noskipws(__is);
0441   while (true) {
0442     __is >> __c;
0443     if (__is.fail())
0444       break;
0445     if (_Traits::eq(__c, __escape)) {
0446       __is >> __c;
0447       if (__is.fail())
0448         break;
0449     } else if (_Traits::eq(__c, __delim))
0450       break;
0451     __string.push_back(__c);
0452   }
0453   return __is;
0454 }
0455 
0456 template <class _CharT, class _Traits>
0457 struct _LIBCPP_HIDDEN __quoted_output_proxy {
0458   const _CharT* __first_;
0459   const _CharT* __last_;
0460   _CharT __delim_;
0461   _CharT __escape_;
0462 
0463   _LIBCPP_HIDE_FROM_ABI explicit __quoted_output_proxy(const _CharT* __f, const _CharT* __l, _CharT __d, _CharT __e)
0464       : __first_(__f), __last_(__l), __delim_(__d), __escape_(__e) {}
0465 
0466   template <class _T2, __enable_if_t<_IsSame<_Traits, void>::value || _IsSame<_Traits, _T2>::value, int> = 0>
0467   friend _LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _T2>&
0468   operator<<(basic_ostream<_CharT, _T2>& __os, const __quoted_output_proxy& __p) {
0469     return std::__quoted_output(__os, __p.__first_, __p.__last_, __p.__delim_, __p.__escape_);
0470   }
0471 };
0472 
0473 template <class _CharT, class _Traits, class _Allocator>
0474 struct _LIBCPP_HIDDEN __quoted_proxy {
0475   basic_string<_CharT, _Traits, _Allocator>& __string_;
0476   _CharT __delim_;
0477   _CharT __escape_;
0478 
0479   _LIBCPP_HIDE_FROM_ABI explicit __quoted_proxy(basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __d, _CharT __e)
0480       : __string_(__s), __delim_(__d), __escape_(__e) {}
0481 
0482   friend _LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
0483   operator<<(basic_ostream<_CharT, _Traits>& __os, const __quoted_proxy& __p) {
0484     return std::__quoted_output(
0485         __os, __p.__string_.data(), __p.__string_.data() + __p.__string_.size(), __p.__delim_, __p.__escape_);
0486   }
0487 
0488   friend _LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
0489   operator>>(basic_istream<_CharT, _Traits>& __is, const __quoted_proxy& __p) {
0490     return std::__quoted_input(__is, __p.__string_, __p.__delim_, __p.__escape_);
0491   }
0492 };
0493 
0494 template <class _CharT, class _Traits, class _Allocator>
0495 _LIBCPP_HIDE_FROM_ABI __quoted_output_proxy<_CharT, _Traits>
0496 __quoted(const basic_string<_CharT, _Traits, _Allocator>& __s,
0497          _CharT __delim  = _CharT('"'),
0498          _CharT __escape = _CharT('\\')) {
0499   return __quoted_output_proxy<_CharT, _Traits>(__s.data(), __s.data() + __s.size(), __delim, __escape);
0500 }
0501 
0502 template <class _CharT, class _Traits, class _Allocator>
0503 _LIBCPP_HIDE_FROM_ABI __quoted_proxy<_CharT, _Traits, _Allocator>
0504 __quoted(basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\')) {
0505   return __quoted_proxy<_CharT, _Traits, _Allocator>(__s, __delim, __escape);
0506 }
0507 
0508 #if _LIBCPP_STD_VER >= 14
0509 
0510 template <class _CharT>
0511 _LIBCPP_HIDE_FROM_ABI auto quoted(const _CharT* __s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\')) {
0512   const _CharT* __end = __s;
0513   while (*__end)
0514     ++__end;
0515   return __quoted_output_proxy<_CharT, void>(__s, __end, __delim, __escape);
0516 }
0517 
0518 template <class _CharT, class _Traits, class _Allocator>
0519 _LIBCPP_HIDE_FROM_ABI auto
0520 quoted(const basic_string<_CharT, _Traits, _Allocator>& __s,
0521        _CharT __delim  = _CharT('"'),
0522        _CharT __escape = _CharT('\\')) {
0523   return __quoted_output_proxy<_CharT, _Traits>(__s.data(), __s.data() + __s.size(), __delim, __escape);
0524 }
0525 
0526 template <class _CharT, class _Traits, class _Allocator>
0527 _LIBCPP_HIDE_FROM_ABI auto
0528 quoted(basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\')) {
0529   return __quoted_proxy<_CharT, _Traits, _Allocator>(__s, __delim, __escape);
0530 }
0531 
0532 template <class _CharT, class _Traits>
0533 _LIBCPP_HIDE_FROM_ABI auto
0534 quoted(basic_string_view<_CharT, _Traits> __sv, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\')) {
0535   return __quoted_output_proxy<_CharT, _Traits>(__sv.data(), __sv.data() + __sv.size(), __delim, __escape);
0536 }
0537 
0538 #endif // _LIBCPP_STD_VER >= 14
0539 
0540 _LIBCPP_END_NAMESPACE_STD
0541 
0542 #endif // _LIBCPP___CXX03_IOMANIP