@@ -180,43 +180,45 @@ class basic_ostream : virtual public basic_ios<_CharT, _Traits> {
180
180
_LIBCPP_HIDE_FROM_ABI basic_ostream () {} // extension, intentially does not initialize
181
181
};
182
182
183
+ #if defined(__MINGW32__) || defined(__CYGWIN__)
184
+ # define _LIBCPP_HIDE_INNER_CLASS_METHOD _LIBCPP_HIDE_FROM_ABI
185
+ #else
186
+ # define _LIBCPP_HIDE_INNER_CLASS_METHOD _LIBCPP_HIDE_FROM_ABI_AFTER_V1
187
+ #endif
188
+
183
189
template <class _CharT , class _Traits >
184
190
class basic_ostream <_CharT, _Traits>::sentry {
185
191
bool __ok_;
186
192
basic_ostream<_CharT, _Traits>& __os_;
187
193
188
194
public:
189
- explicit sentry (basic_ostream<_CharT, _Traits>& __os);
190
- ~sentry ();
191
- sentry (const sentry&) = delete ;
192
- sentry& operator =(const sentry&) = delete ;
193
-
194
- _LIBCPP_HIDE_FROM_ABI explicit operator bool () const { return __ok_; }
195
- };
196
-
197
- template <class _CharT , class _Traits >
198
- basic_ostream<_CharT, _Traits>::sentry::sentry (basic_ostream<_CharT, _Traits>& __os) : __ok_ (false ), __os_ (__os) {
199
- if (__os.good ()) {
200
- if (__os.tie ())
201
- __os.tie ()->flush ();
202
- __ok_ = true ;
195
+ _LIBCPP_HIDE_INNER_CLASS_METHOD explicit sentry (basic_ostream<_CharT, _Traits>& __os) : __ok_(false ), __os_(__os) {
196
+ if (__os.good ()) {
197
+ if (__os.tie ())
198
+ __os.tie ()->flush ();
199
+ __ok_ = true ;
200
+ }
203
201
}
204
- }
205
202
206
- template <class _CharT , class _Traits >
207
- basic_ostream<_CharT, _Traits>::sentry::~sentry () {
208
- if (__os_.rdbuf () && __os_.good () && (__os_.flags () & ios_base::unitbuf) && uncaught_exceptions () == 0 ) {
203
+ _LIBCPP_HIDE_INNER_CLASS_METHOD ~sentry () {
204
+ if (__os_.rdbuf () && __os_.good () && (__os_.flags () & ios_base::unitbuf) && uncaught_exceptions () == 0 ) {
209
205
# if _LIBCPP_HAS_EXCEPTIONS
210
- try {
206
+ try {
211
207
# endif // _LIBCPP_HAS_EXCEPTIONS
212
- if (__os_.rdbuf ()->pubsync () == -1 )
213
- __os_.setstate (ios_base::badbit);
208
+ if (__os_.rdbuf ()->pubsync () == -1 )
209
+ __os_.setstate (ios_base::badbit);
214
210
# if _LIBCPP_HAS_EXCEPTIONS
215
- } catch (...) {
216
- }
211
+ } catch (...) {
212
+ }
217
213
# endif // _LIBCPP_HAS_EXCEPTIONS
214
+ }
218
215
}
219
- }
216
+
217
+ sentry (const sentry&) = delete ;
218
+ sentry& operator =(const sentry&) = delete ;
219
+
220
+ _LIBCPP_HIDE_FROM_ABI explicit operator bool () const { return __ok_; }
221
+ };
220
222
221
223
template <class _CharT , class _Traits >
222
224
basic_ostream<_CharT, _Traits>::basic_ostream (basic_ostream&& __rhs) {
0 commit comments