ReactOS 0.4.15-dev-8093-g3285f69
_ostream.c File Reference
#include <stl/_ostream.h>
#include <stl/_num_put.h>
Include dependency graph for _ostream.c:

Go to the source code of this file.

Classes

struct  _SPutBackC< _CharT, _Traits >
 

Macros

#define _STLP_OSTREAM_C
 

Functions

template<class _CharT , class _Traits , class _Number >
_STLP_MOVE_TO_PRIV_NAMESPACE basic_ostream< _CharT, _Traits > &_STLP_CALL __put_num (basic_ostream< _CharT, _Traits > &__os, _Number __x)
 

Macro Definition Documentation

◆ _STLP_OSTREAM_C

#define _STLP_OSTREAM_C

Definition at line 19 of file _ostream.c.

Function Documentation

◆ __put_num()

template<class _CharT , class _Traits , class _Number >
_STLP_MOVE_TO_PRIV_NAMESPACE basic_ostream< _CharT, _Traits > &_STLP_CALL __put_num ( basic_ostream< _CharT, _Traits > &  __os,
_Number  __x 
)

Definition at line 194 of file _ostream.c.

194 {
195 typedef typename basic_ostream<_CharT, _Traits>::sentry _Sentry;
196 _Sentry __sentry(__os);
197 bool __failed = true;
198
199 if (__sentry) {
200 _STLP_TRY {
202 __failed = (use_facet<_NumPut>(__os.getloc())).put(ostreambuf_iterator<_CharT, _Traits>(__os.rdbuf()),
203 __os, __os.fill(),
204 __x).failed();
205 }
207 __os._M_handle_exception(ios_base::badbit);
208 }
209 }
210 if (__failed)
211 __os.setstate(ios_base::badbit);
212 return __os;
213}
basic_streambuf< _CharT, _Traits > * rdbuf() const
Definition: _ios.h:72
char_type fill() const
Definition: _ios.h:81
void setstate(iostate __state)
Definition: _ios.h:95
void _M_handle_exception(ios_base::iostate __flag)
Definition: _ios.c:114
locale getloc() const
Definition: _ios_base.h:143
#define _STLP_TRY
Definition: features.h:817
#define _STLP_CATCH_ALL
Definition: features.h:818
#define put(ret, state, sp, n)
Definition: match.c:105

Referenced by basic_ostream< _CharT, _Traits >::operator<<().