8#ifndef INCLUDED_BSLSTL_OSTREAM
9#define INCLUDED_BSLSTL_OSTREAM
50#include <bslstl_iosfwd.h>
58#ifndef BDE_DONT_ALLOW_TRANSITIVE_INCLUDES
65 using std::basic_ostream;
80 template <
class CHAR,
class TRAITS>
82 basic_ostream<CHAR,TRAITS>& stream);
88 template <
class CHAR,
class TRAITS>
89 basic_ostream<CHAR,TRAITS>&
flush_emit(basic_ostream<CHAR,TRAITS>& stream);
95 template <
class CHAR,
class TRAITS>
97 basic_ostream<CHAR,TRAITS>& stream);
99#ifndef BDE_OMIT_INTERNAL_DEPRECATED
102# if !defined(BSLS_PLATFORM_CMP_MSVC) && __cplusplus < 201703L
105 using std::bad_exception;
106 using std::basic_ios;
107 using std::basic_streambuf;
108 using std::bidirectional_iterator_tag;
110 using std::ctype_base;
111 using std::ctype_byname;
112 using std::forward_iterator_tag;
113 using std::input_iterator_tag;
115 using std::istreambuf_iterator;
119 using std::numpunct_byname;
120 using std::ostreambuf_iterator;
121 using std::output_iterator_tag;
122 using std::random_access_iterator_tag;
123 using std::set_terminate;
124 using std::set_unexpected;
126 using std::terminate;
127 using std::terminate_handler;
128 using std::uncaught_exception;
129 using std::unexpected;
130 using std::unexpected_handler;
131 using std::use_facet;
139template <
class CHAR,
class TRAITS>
140basic_ostream<CHAR,TRAITS>&
emit_on_flush(basic_ostream<CHAR,TRAITS>& stream)
142 using BloombergLP::bslstl::SyncBufBase;
143 if (SyncBufBase *p =
dynamic_cast<SyncBufBase*
>(stream.rdbuf())) {
144 BloombergLP::bslstl::SyncBufBaseUtil::setEmitOnSync(p,
true);
149template <
class CHAR,
class TRAITS>
150basic_ostream<CHAR,TRAITS>&
flush_emit(basic_ostream<CHAR,TRAITS>& stream)
152 using BloombergLP::bslstl::SyncBufBase;
154 if (SyncBufBase *p =
dynamic_cast<SyncBufBase*
>(stream.rdbuf())) {
155 typename basic_ostream<CHAR,TRAITS>::sentry ok(stream);
157 stream.setstate(ios_base::badbit);
160 if (!BloombergLP::bslstl::SyncBufBaseUtil::emit(p)) {
161 stream.setstate(ios_base::badbit);
168template <
class CHAR,
class TRAITS>
171 using BloombergLP::bslstl::SyncBufBase;
172 if (SyncBufBase *p =
dynamic_cast<SyncBufBase*
>(stream.rdbuf())) {
173 BloombergLP::bslstl::SyncBufBaseUtil::setEmitOnSync(p,
false);
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bdlb_printmethods.h:283
basic_ostream< CHAR, TRAITS > & emit_on_flush(basic_ostream< CHAR, TRAITS > &stream)
Definition bslstl_ostream.h:140
basic_ostream< CHAR, TRAITS > & noemit_on_flush(basic_ostream< CHAR, TRAITS > &stream)
Definition bslstl_ostream.h:169
basic_ostream< CHAR, TRAITS > & flush_emit(basic_ostream< CHAR, TRAITS > &stream)
Definition bslstl_ostream.h:150
void swap(TYPE &a, TYPE &b)