8#ifndef INCLUDED_BSLSTL_OSTREAM
9#define INCLUDED_BSLSTL_OSTREAM
52#include <bslstl_iosfwd.h>
60#ifndef BDE_DONT_ALLOW_TRANSITIVE_INCLUDES
67 using std::basic_ostream;
82 template <
class CHAR,
class TRAITS>
84 basic_ostream<CHAR,TRAITS>& stream);
90 template <
class CHAR,
class TRAITS>
91 basic_ostream<CHAR,TRAITS>&
flush_emit(basic_ostream<CHAR,TRAITS>& stream);
97 template <
class CHAR,
class TRAITS>
99 basic_ostream<CHAR,TRAITS>& stream);
101#ifndef BDE_OMIT_INTERNAL_DEPRECATED
104# if !defined(BSLS_PLATFORM_CMP_MSVC) && __cplusplus < 201703L
107 using std::bad_exception;
108 using std::basic_ios;
109 using std::basic_streambuf;
110 using std::bidirectional_iterator_tag;
112 using std::ctype_base;
113 using std::ctype_byname;
114 using std::forward_iterator_tag;
115 using std::input_iterator_tag;
117 using std::istreambuf_iterator;
121 using std::numpunct_byname;
122 using std::ostreambuf_iterator;
123 using std::output_iterator_tag;
124 using std::random_access_iterator_tag;
125 using std::set_terminate;
126 using std::set_unexpected;
128 using std::terminate;
129 using std::terminate_handler;
130 using std::uncaught_exception;
131 using std::unexpected;
132 using std::unexpected_handler;
133 using std::use_facet;
141template <
class CHAR,
class TRAITS>
142basic_ostream<CHAR,TRAITS>&
emit_on_flush(basic_ostream<CHAR,TRAITS>& stream)
144 using BloombergLP::bslstl::SyncBufBase;
145 if (SyncBufBase *p =
dynamic_cast<SyncBufBase*
>(stream.rdbuf())) {
146 BloombergLP::bslstl::SyncBufBaseUtil::setEmitOnSync(p,
true);
151template <
class CHAR,
class TRAITS>
152basic_ostream<CHAR,TRAITS>&
flush_emit(basic_ostream<CHAR,TRAITS>& stream)
154 using BloombergLP::bslstl::SyncBufBase;
156 if (SyncBufBase *p =
dynamic_cast<SyncBufBase*
>(stream.rdbuf())) {
157 typename basic_ostream<CHAR,TRAITS>::sentry ok(stream);
159 stream.setstate(ios_base::badbit);
162 if (!BloombergLP::bslstl::SyncBufBaseUtil::emitInternal(p)) {
163 stream.setstate(ios_base::badbit);
170template <
class CHAR,
class TRAITS>
173 using BloombergLP::bslstl::SyncBufBase;
174 if (SyncBufBase *p =
dynamic_cast<SyncBufBase*
>(stream.rdbuf())) {
175 BloombergLP::bslstl::SyncBufBaseUtil::setEmitOnSync(p,
false);
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition bdlat_valuetypefunctions.h:939
basic_ostream< CHAR, TRAITS > & emit_on_flush(basic_ostream< CHAR, TRAITS > &stream)
Definition bslstl_ostream.h:142
basic_ostream< CHAR, TRAITS > & noemit_on_flush(basic_ostream< CHAR, TRAITS > &stream)
Definition bslstl_ostream.h:171
basic_ostream< CHAR, TRAITS > & flush_emit(basic_ostream< CHAR, TRAITS > &stream)
Definition bslstl_ostream.h:152