C++17 says to use std::uncaught_exceptions() here instead of
std::uncaught_exception() but since we only care whether the result is
non-zero (and we aren't planning to remove the deprecated version) we
can just keep using std::uncaught_exception() and suppress the warning.
* include/std/ostream (basic_ostream::sentry::~sentry): Suppress
deprecation warnings for using uncaught_exception().
From-SVN: r263593
2018-08-16 Jonathan Wakely <jwakely@redhat.com>
+ * include/std/ostream (basic_ostream::sentry::~sentry): Suppress
+ deprecation warnings for using uncaught_exception().
+
PR libstdc++/86447
* src/c++11/cow-stdexcept.cc [_GLIBCXX_FULLY_DYNAMIC_STRING]
(logic_error::logic_error(logic_error&&))
explicit
sentry(basic_ostream<_CharT, _Traits>& __os);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
/**
* @brief Possibly flushes the stream.
*
_M_os.setstate(ios_base::badbit);
}
}
+#pragma GCC diagnostic pop
/**
* @brief Quick status checking.