alloc_type a{1};
{
istringstream_with_alloc<alloc_type> istr(cstr, a);
+#if _GLIBCXX_USE_CXX11_ABI
VERIFY( istr.rdbuf()->get_allocator() == a );
+#endif
VERIFY( string_view{istr.str()} == cstr );
VERIFY( istr.get() == cstr.s[0] );
}
{
istringstream_with_alloc<alloc_type> istr(cstr, std::ios::in, a);
+#if _GLIBCXX_USE_CXX11_ABI
VERIFY( istr.rdbuf()->get_allocator() == a );
+#endif
VERIFY( string_view{istr.str()} == cstr );
VERIFY( istr.get() == cstr.s[0] );
VERIFY( istr.rdbuf()->sputc('X') != 'X' );
}
{
istringstream_with_alloc<alloc_type> istr(cstr, std::ios::out, a);
+#if _GLIBCXX_USE_CXX11_ABI
VERIFY( istr.rdbuf()->get_allocator() == a );
+#endif
VERIFY( string_view{istr.str()} == cstr );
VERIFY( istr.get() == cstr.s[0] );
VERIFY( istr.rdbuf()->sputc('X') == 'X' );
alloc_type a{1};
{
ostringstream_with_alloc<alloc_type> ostrstr(cstr, a);
+#if _GLIBCXX_USE_CXX11_ABI
VERIFY( ostrstr.rdbuf()->get_allocator() == a );
+#endif
VERIFY( string_view{ostrstr.str()} == cstr );
VERIFY( ostrstr.rdbuf()->sgetc() == ostringstream::traits_type::eof() );
VERIFY( ostrstr.put('X').good() );
}
{
ostringstream_with_alloc<alloc_type> ostrstr(cstr, std::ios::in, a);
+#if _GLIBCXX_USE_CXX11_ABI
VERIFY( ostrstr.rdbuf()->get_allocator() == a );
+#endif
VERIFY( string_view{ostrstr.str()} == cstr );
VERIFY( ostrstr.rdbuf()->sgetc() == cstr.s[0]);
VERIFY( ostrstr.put('X').good() );
}
{
ostringstream_with_alloc<alloc_type> ostrstr(cstr, std::ios::out, a);
+#if _GLIBCXX_USE_CXX11_ABI
VERIFY( ostrstr.rdbuf()->get_allocator() == a );
+#endif
VERIFY( string_view{ostrstr.str()} == cstr );
VERIFY( ostrstr.rdbuf()->sgetc() == ostringstream::traits_type::eof() );
VERIFY( ostrstr.put('Y').rdstate() == ostrstr.goodbit );
alloc_type a{1};
{
stringbuf_with_alloc<alloc_type> sbuf(cstr, a);
+#if _GLIBCXX_USE_CXX11_ABI
VERIFY( sbuf.get_allocator() == a );
+#endif
VERIFY( string_view{sbuf.str()} == cstr );
VERIFY( sbuf.sgetc() == cstr.s[0] );
}
{
stringbuf_with_alloc<alloc_type> sbuf(cstr, std::ios::in, a);
+#if _GLIBCXX_USE_CXX11_ABI
VERIFY( sbuf.get_allocator() == a );
+#endif
VERIFY( string_view{sbuf.str()} == cstr );
VERIFY( sbuf.sgetc() == cstr.s[0] );
VERIFY( sbuf.sputc('X') == stringbuf::traits_type::eof() );
}
{
stringbuf_with_alloc<alloc_type> sbuf(cstr, std::ios::out, a);
+#if _GLIBCXX_USE_CXX11_ABI
VERIFY( sbuf.get_allocator() == a );
+#endif
VERIFY( string_view{sbuf.str()} == cstr );
VERIFY( sbuf.sputc('X') == 'X' );
VERIFY( sbuf.sgetc() == stringbuf::traits_type::eof() );
alloc_type a{1};
{
stringstream_with_alloc<alloc_type> strstr(cstr, a);
+#if _GLIBCXX_USE_CXX11_ABI
VERIFY( strstr.rdbuf()->get_allocator() == a );
+#endif
VERIFY( string_view{strstr.str()} == cstr );
VERIFY( strstr.get() == cstr.s[0] );
}
{
stringstream_with_alloc<alloc_type> strstr(cstr, std::ios::in, a);
+#if _GLIBCXX_USE_CXX11_ABI
VERIFY( strstr.rdbuf()->get_allocator() == a );
+#endif
VERIFY( string_view{strstr.str()} == cstr );
VERIFY( strstr.get() == cstr.s[0] );
VERIFY( strstr.put('X').rdstate() == strstr.badbit );
}
{
stringstream_with_alloc<alloc_type> strstr(cstr, std::ios::out, a);
+#if _GLIBCXX_USE_CXX11_ABI
VERIFY( strstr.rdbuf()->get_allocator() == a );
+#endif
VERIFY( string_view{strstr.str()} == cstr );
VERIFY( strstr.put('X').good() );
VERIFY( strstr.get() == stringstream::traits_type::eof());