36 const void*,
const char*);
42template <
class _OutputIter>
44__rw_iter_failed (
const _OutputIter&) {
return false; }
48template <
class _CharT,
class _Traits>
50__rw_iter_failed (_STD::ostreambuf_iterator<_CharT, _Traits> &__it)
52 return __it.failed ();
61template <
class _CharT,
class _OutputIter>
62_RW::__rw_facet_id num_put<_CharT, _OutputIter>::id;
65template <
class _CharT,
class _OutputIter >
66 num_put<_CharT, _OutputIter>::~num_put ()
72template <
class _CharT,
class _OutputIter >
73typename num_put<_CharT, _OutputIter>::iter_type
74num_put<_CharT, _OutputIter>::
75_C_put (iter_type __it, ios_base &__flags, char_type __fill,
int __type,
76 const void *__pval)
const
78 const numpunct<char_type> &__np =
81 char __buf [_RWSTD_DBL_MAX_10_EXP];
86 const string __grouping = __np.grouping ();
87 const char*
const __grp = __grouping.c_str ();
90 const int __f = __flags.flags ();
94 _RW::__rw_put_num (&__pbuf,
sizeof __buf,
__f, __type,
95 __prec, __pval, __grp);
98 basic_string<char_type, char_traits<char_type>, allocator<char_type> >
108 __boolstr = __np.truename ();
110 __boolstr = __np.falsename ();
112 __res = __boolstr.size ();
116 streamsize __pad = __flags.width () - streamsize (__res);
118#ifdef _RWSTD_NO_EXT_KEEP_WIDTH_ON_FAILURE
134 for (; __pad--; ++__it)
138 const ctype<char_type> &__ctp =
141 const char *__p = __pbuf;
145 typedef unsigned char _UChar;
150 if (43 == _RW::__rw_digit_map [_UChar (*__p)])
151 *__it++ = __ctp.widen (*__p++);
152 else if (
'0' == *__p && __res > 2
153 && 33 == _RW::__rw_digit_map [_UChar (__p [1])]) {
154 *__it++ = __ctp.widen (*__p++);
155 *__it++ = __ctp.widen (*__p++);
159 for (; __pad--; ++__it)
163 if (__type & _RW::__rw_facet::_C_integral && !*__grp && __prec >= 0) {
165 for (
const char *__end = __pbuf + __res; __p != __end; ++__p, ++__it)
166 *__it = __ctp.widen (*__p);
168 else if (_RW::__rw_facet::_C_bool == __type) {
170 for (_RWSTD_SIZE_T __i = 0; __i != __res; ++__i, ++__it)
171 *__it = __boolstr [__i];
175 for (
const char *__end = __pbuf + __res; __p != __end; ++__p, ++__it) {
181 case ',': *__it = __np.decimal_point ();
break;
182 case ';': *__it = __np.thousands_sep ();
break;
183 default: *__it = __ctp.widen (*__p);
break;
193 for (; __pad > 0; ++__it, --__pad)
196#ifndef _RWSTD_NO_EXT_KEEP_WIDTH_ON_FAILURE
200 if (!_RW::__rw_iter_failed (__it))
#define _RWSTD_IOS_ADJUSTFIELD
#define _RWSTD_USE_FACET(type, arg)
#define _RWSTD_NAMESPACE(name)
#define _RWSTD_STREAMSIZE
#define _RWSTD_IOS_INTERNAL