@@ -203,6 +203,7 @@ template <class charT> class messages_byname;
203203# include < __iterator/istreambuf_iterator.h>
204204# include < __iterator/ostreambuf_iterator.h>
205205# include < __locale>
206+ # include < __locale_dir/pad_and_output.h>
206207# include < __memory/unique_ptr.h>
207208# include < __type_traits/make_unsigned.h>
208209# include < cerrno>
@@ -1239,66 +1240,6 @@ protected:
12391240template <class _CharT , class _OutputIterator >
12401241locale::id num_put<_CharT, _OutputIterator>::id;
12411242
1242- template <class _CharT , class _OutputIterator >
1243- _LIBCPP_HIDE_FROM_ABI _OutputIterator __pad_and_output (
1244- _OutputIterator __s, const _CharT* __ob, const _CharT* __op, const _CharT* __oe, ios_base& __iob, _CharT __fl) {
1245- streamsize __sz = __oe - __ob;
1246- streamsize __ns = __iob.width ();
1247- if (__ns > __sz)
1248- __ns -= __sz;
1249- else
1250- __ns = 0 ;
1251- for (; __ob < __op; ++__ob, ++__s)
1252- *__s = *__ob;
1253- for (; __ns; --__ns, ++__s)
1254- *__s = __fl;
1255- for (; __ob < __oe; ++__ob, ++__s)
1256- *__s = *__ob;
1257- __iob.width (0 );
1258- return __s;
1259- }
1260-
1261- template <class _CharT , class _Traits >
1262- _LIBCPP_HIDE_FROM_ABI ostreambuf_iterator<_CharT, _Traits> __pad_and_output (
1263- ostreambuf_iterator<_CharT, _Traits> __s,
1264- const _CharT* __ob,
1265- const _CharT* __op,
1266- const _CharT* __oe,
1267- ios_base& __iob,
1268- _CharT __fl) {
1269- if (__s.__sbuf_ == nullptr )
1270- return __s;
1271- streamsize __sz = __oe - __ob;
1272- streamsize __ns = __iob.width ();
1273- if (__ns > __sz)
1274- __ns -= __sz;
1275- else
1276- __ns = 0 ;
1277- streamsize __np = __op - __ob;
1278- if (__np > 0 ) {
1279- if (__s.__sbuf_ ->sputn (__ob, __np) != __np) {
1280- __s.__sbuf_ = nullptr ;
1281- return __s;
1282- }
1283- }
1284- if (__ns > 0 ) {
1285- basic_string<_CharT, _Traits> __sp (__ns, __fl);
1286- if (__s.__sbuf_ ->sputn (__sp.data (), __ns) != __ns) {
1287- __s.__sbuf_ = nullptr ;
1288- return __s;
1289- }
1290- }
1291- __np = __oe - __op;
1292- if (__np > 0 ) {
1293- if (__s.__sbuf_ ->sputn (__op, __np) != __np) {
1294- __s.__sbuf_ = nullptr ;
1295- return __s;
1296- }
1297- }
1298- __iob.width (0 );
1299- return __s;
1300- }
1301-
13021243template <class _CharT , class _OutputIterator >
13031244_OutputIterator
13041245num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob, char_type __fl, bool __v) const {
0 commit comments