libstdc++: Fix errors when syncbuf is used without RTTI
libstdc++-v3/ChangeLog: * include/std/ostream (__syncbuf_base::_S_get): Mark parameter as unused and only use dynamic_cast when RTTI is enabled.
This commit is contained in:
parent
4591f7e532
commit
14b554c462
@ -783,10 +783,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
{
|
||||
public:
|
||||
static bool*
|
||||
_S_get(basic_streambuf<_CharT, _Traits>* __buf) noexcept
|
||||
_S_get(basic_streambuf<_CharT, _Traits>* __buf [[maybe_unused]]) noexcept
|
||||
{
|
||||
#if __cpp_rtti
|
||||
if (auto __p = dynamic_cast<__syncbuf_base*>(__buf))
|
||||
return &__p->_M_emit_on_sync;
|
||||
#endif
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user