#include <sstream>
#include <testsuite_hooks.h>
-void
-redirect_buffer(std::ios& stream, std::streambuf* new_buf)
+void
+redirect_buffer(std::ios& stream, std::streambuf* new_buf)
{ stream.rdbuf(new_buf); }
std::streambuf*
redirect_buffer(sstrm1, &sbuf);
std::stringbuf* const buf2 = sstrm1.rdbuf();
std::streambuf* pbasebuf2 = active_buffer(sstrm1);
- VERIFY( buf1 == buf2 );
+ VERIFY( buf1 == buf2 );
VERIFY( pbasebuf1 != pbasebuf2 );
VERIFY( pbasebuf2 == pbasebuf0 );
VERIFY( sstrm1.str() != str01 );
VERIFY( sstrm1.str() == str00 );
// however, casting the active streambuf to a stringbuf shows what's up:
+#if __cpp_rtti
std::stringbuf* psbuf = dynamic_cast<std::stringbuf*>(pbasebuf2);
+#else
+ std::stringbuf* psbuf = static_cast<std::stringbuf*>(pbasebuf2);
+#endif
str02 = psbuf->str();
VERIFY( str02 == str01 );
#include <sstream>
#include <testsuite_hooks.h>
-void
-redirect_buffer(std::wios& stream, std::wstreambuf* new_buf)
+void
+redirect_buffer(std::wios& stream, std::wstreambuf* new_buf)
{ stream.rdbuf(new_buf); }
std::wstreambuf*
redirect_buffer(sstrm1, &sbuf);
std::wstringbuf* const buf2 = sstrm1.rdbuf();
std::wstreambuf* pbasebuf2 = active_buffer(sstrm1);
- VERIFY( buf1 == buf2 );
+ VERIFY( buf1 == buf2 );
VERIFY( pbasebuf1 != pbasebuf2 );
VERIFY( pbasebuf2 == pbasebuf0 );
VERIFY( sstrm1.str() != str01 );
VERIFY( sstrm1.str() == str00 );
// however, casting the active streambuf to a stringbuf shows what's up:
+#if __cpp_rtti
std::wstringbuf* psbuf = dynamic_cast<std::wstringbuf*>(pbasebuf2);
+#else
+ std::wstringbuf* psbuf = static_cast<std::wstringbuf*>(pbasebuf2);
+#endif
str02 = psbuf->str();
VERIFY( str02 == str01 );
#include <sstream>
#include <testsuite_hooks.h>
-void
-redirect_buffer(std::ios& stream, std::streambuf* new_buf)
+void
+redirect_buffer(std::ios& stream, std::streambuf* new_buf)
{ stream.rdbuf(new_buf); }
std::streambuf*
redirect_buffer(sstrm1, &sbuf);
std::stringbuf* const buf2 = sstrm1.rdbuf();
std::streambuf* pbasebuf2 = active_buffer(sstrm1);
- VERIFY( buf1 == buf2 );
+ VERIFY( buf1 == buf2 );
VERIFY( pbasebuf1 != pbasebuf2 );
VERIFY( pbasebuf2 == pbasebuf0 );
VERIFY( sstrm1.str() != str01 );
VERIFY( sstrm1.str() == str00 );
// however, casting the active streambuf to a stringbuf shows what's up:
+#if __cpp_rtti
std::stringbuf* psbuf = dynamic_cast<std::stringbuf*>(pbasebuf2);
+#else
+ std::stringbuf* psbuf = static_cast<std::stringbuf*>(pbasebuf2);
+#endif
str02 = psbuf->str();
VERIFY( str02 == str01 );
#include <sstream>
#include <testsuite_hooks.h>
-void
-redirect_buffer(std::wios& stream, std::wstreambuf* new_buf)
+void
+redirect_buffer(std::wios& stream, std::wstreambuf* new_buf)
{ stream.rdbuf(new_buf); }
std::wstreambuf*
redirect_buffer(sstrm1, &sbuf);
std::wstringbuf* const buf2 = sstrm1.rdbuf();
std::wstreambuf* pbasebuf2 = active_buffer(sstrm1);
- VERIFY( buf1 == buf2 );
+ VERIFY( buf1 == buf2 );
VERIFY( pbasebuf1 != pbasebuf2 );
VERIFY( pbasebuf2 == pbasebuf0 );
VERIFY( sstrm1.str() != str01 );
VERIFY( sstrm1.str() == str00 );
// however, casting the active streambuf to a stringbuf shows what's up:
+#if __cpp_rtti
std::wstringbuf* psbuf = dynamic_cast<std::wstringbuf*>(pbasebuf2);
+#else
+ std::wstringbuf* psbuf = static_cast<std::wstringbuf*>(pbasebuf2);
+#endif
str02 = psbuf->str();
VERIFY( str02 == str01 );
#include <sstream>
#include <testsuite_hooks.h>
-void
-redirect_buffer(std::ios& stream, std::streambuf* new_buf)
+void
+redirect_buffer(std::ios& stream, std::streambuf* new_buf)
{ stream.rdbuf(new_buf); }
std::streambuf*
redirect_buffer(sstrm1, &sbuf);
std::stringbuf* const buf2 = sstrm1.rdbuf();
std::streambuf* pbasebuf2 = active_buffer(sstrm1);
- VERIFY( buf1 == buf2 );
+ VERIFY( buf1 == buf2 );
VERIFY( pbasebuf1 != pbasebuf2 );
VERIFY( pbasebuf2 == pbasebuf0 );
VERIFY( sstrm1.str() != str01 );
VERIFY( sstrm1.str() == str00 );
// however, casting the active streambuf to a stringbuf shows what's up:
+#if __cpp_rtti
std::stringbuf* psbuf = dynamic_cast<std::stringbuf*>(pbasebuf2);
+#else
+ std::stringbuf* psbuf = static_cast<std::stringbuf*>(pbasebuf2);
+#endif
str02 = psbuf->str();
VERIFY( str02 == str01 );
#include <sstream>
#include <testsuite_hooks.h>
-void
-redirect_buffer(std::wios& stream, std::wstreambuf* new_buf)
+void
+redirect_buffer(std::wios& stream, std::wstreambuf* new_buf)
{ stream.rdbuf(new_buf); }
std::wstreambuf*
redirect_buffer(sstrm1, &sbuf);
std::wstringbuf* const buf2 = sstrm1.rdbuf();
std::wstreambuf* pbasebuf2 = active_buffer(sstrm1);
- VERIFY( buf1 == buf2 );
+ VERIFY( buf1 == buf2 );
VERIFY( pbasebuf1 != pbasebuf2 );
VERIFY( pbasebuf2 == pbasebuf0 );
VERIFY( sstrm1.str() != str01 );
VERIFY( sstrm1.str() == str00 );
// however, casting the active streambuf to a stringbuf shows what's up:
+#if __cpp_rtti
std::wstringbuf* psbuf = dynamic_cast<std::wstringbuf*>(pbasebuf2);
+#else
+ std::wstringbuf* psbuf = static_cast<std::wstringbuf*>(pbasebuf2);
+#endif
str02 = psbuf->str();
VERIFY( str02 == str01 );