diff options
| -rw-r--r-- | libcxx/include/iomanip | 4 | ||||
| -rw-r--r-- | libcxx/test/input.output/iostream.format/quoted.manip/quoted.pass.cpp | 12 |
2 files changed, 15 insertions, 1 deletions
diff --git a/libcxx/include/iomanip b/libcxx/include/iomanip index cdb0d5f0dbf..e334c7de9fd 100644 --- a/libcxx/include/iomanip +++ b/libcxx/include/iomanip @@ -14,6 +14,8 @@ /* iomanip synopsis +namespace std { + // types T1, T2, ... are unspecified implementation types T1 resetiosflags(ios_base::fmtflags mask); T2 setiosflags (ios_base::fmtflags mask); @@ -604,7 +606,7 @@ basic_ostream<_CharT, _Traits>& operator<<( basic_ostream<_CharT, _Traits>& __os, const __quoted_proxy<_CharT, _Traits, _Allocator> & __proxy) { - return __quoted_output (__os, __proxy.string.cbegin (), __proxy.string.cend (), __proxy.__delim, __proxy.__escape); + return __quoted_output (__os, __proxy.__string.cbegin (), __proxy.__string.cend (), __proxy.__delim, __proxy.__escape); } // extractor for non-const basic_string& proxies diff --git a/libcxx/test/input.output/iostream.format/quoted.manip/quoted.pass.cpp b/libcxx/test/input.output/iostream.format/quoted.manip/quoted.pass.cpp index 9f2d7c8ecce..2fa50964555 100644 --- a/libcxx/test/input.output/iostream.format/quoted.manip/quoted.pass.cpp +++ b/libcxx/test/input.output/iostream.format/quoted.manip/quoted.pass.cpp @@ -18,6 +18,16 @@ #if _LIBCPP_STD_VER > 11 +void both_ways ( const char *p ) { + std::string str(p); + auto q = std::quoted(s); + + std::stringstream ss; + bool skippingws = is_skipws ( &ss ); + ss << q; + ss >> q; + } + bool is_skipws ( const std::istream *is ) { return ( is->flags() & std::ios_base::skipws ) != 0; } @@ -140,6 +150,8 @@ std::wstring unquote ( const wchar_t *p, wchar_t delim='"', wchar_t escape='\\' int main() { + both_ways ( "" ); // This is a compilation check + round_trip ( "" ); round_trip_ws ( "" ); round_trip_d ( "", 'q' ); |

