Index: ../test/input.output/iostream.format/quoted.manip/quoted.pass.cpp
===================================================================
--- ../test/input.output/iostream.format/quoted.manip/quoted.pass.cpp	(revision 0)
+++ ../test/input.output/iostream.format/quoted.manip/quoted.pass.cpp	(revision 0)
@@ -0,0 +1,95 @@
+//===----------------------------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// <iomanip>
+
+// quoted
+
+#include <iomanip>
+#include <sstream>
+#include <string>
+#include <cassert>
+
+#if _LIBCPP_STD_VER > 11
+
+void round_trip ( const char *p ) {
+	std::stringstream ss;
+	ss << std::quoted(p);
+	std::string s;
+	ss >> std::quoted(s);
+	assert ( s == p );
+	}
+
+std::string quote ( const char *p ) {
+	std::stringstream ss;
+	ss << std::quoted(p);
+	std::string s;
+	ss >> s;	// no quote
+	return s;
+}
+
+std::string unquote ( const char *p ) {
+	std::stringstream ss;
+	ss << p;
+	std::string s;
+	ss >> std::quoted(s);
+	return s;
+}
+
+
+
+void round_trip ( const wchar_t *p ) {
+	std::wstringstream ss;
+	ss << std::quoted(p);
+	std::wstring s;
+	ss >> std::quoted(s);
+	assert ( s == p );
+	}
+	
+std::wstring quote ( const wchar_t *p ) {
+	std::wstringstream ss;
+	ss << std::quoted(p);
+	std::wstring s;
+	ss >> s;	// no quote
+	return s;
+}
+
+std::wstring unquote ( const wchar_t *p ) {
+	std::wstringstream ss;
+	ss << p;
+	std::wstring s;
+	ss >> std::quoted(s);
+	return s;
+}
+
+
+int main()
+{
+	round_trip (  "" );
+	round_trip ( L"" );
+	round_trip (  "Hi" );
+	round_trip ( L"Hi" );
+	round_trip (  "Hi Mom" );
+	round_trip ( L"Hi Mom" );
+	
+	assert ( quote (  "" )  ==  "\"\"" );
+	assert ( quote ( L"" )  == L"\"\"" );
+	assert ( quote (  "a" ) ==  "\"a\"" );
+	assert ( quote ( L"a" ) == L"\"a\"" );
+
+//	missing end quote - must not hang
+	unquote (  "\"abc" );
+	unquote ( L"\"abc" );
+
+//	More tests with delimiters, etc
+	}
+
+#else
+int main() {}
+#endif
Index: ../include/iomanip
===================================================================
--- ../include/iomanip	(revision 185865)
+++ ../include/iomanip	(working copy)
@@ -26,6 +26,17 @@
 template <class charT> T9 get_time(struct tm* tmb, const charT* fmt);
 template <class charT> T10 put_time(const struct tm* tmb, const charT* fmt);
 
+template <class charT>
+  T11 quoted(const charT* s, charT delim=charT('"'), charT escape=charT('\\'));
+
+template <class charT, class traits, class Allocator>
+  T12 quoted(const basic_string<charT, traits, Allocator>& s,
+             charT delim=charT('"'), charT escape=charT('\\'));
+
+template <class charT, class traits, class Allocator>
+  T13 quoted(basic_string<charT, traits, Allocator>& s,
+             charT delim=charT('"'), charT escape=charT('\\'));
+
 }  // std
 
 */
@@ -499,6 +510,143 @@
     return __iom_t10<_CharT>(__tm, __fmt);
 }
 
+#if _LIBCPP_STD_VER > 11
+
+template <class _Char, class _Traits, class _ForwardIterator>
+std::basic_ostream<_Char, _Traits> &
+__quoted_output ( basic_ostream<_Char, _Traits> &__os, 
+        _ForwardIterator __first, _ForwardIterator __last, _Char __delim, _Char __escape )
+{
+    __os << __delim;
+    for ( ; __first != __last; ++ __first )
+    {
+        if (_Traits::eq (*__first, __escape) || _Traits::eq (*__first, __delim))
+            __os << __escape;
+        __os << *__first;
+    }
+    __os << __delim;
+    return __os;
+}
+
+template <class _Char, class _Traits, class _String>
+basic_istream<_Char, _Traits> &
+__quoted_input ( basic_istream<_Char, _Traits> &__is, _String & __string, _Char __delim, _Char __escape )
+{
+    __string.clear ();
+    _Char __c;
+    __is >> __c;
+    if ( !__is.good ())
+        return __is;
+
+    if (!_Traits::eq (__c, __delim))    // no delimiter, read the whole string
+    {
+        __is.unget ();
+        __is >> __string;
+        return __is;
+    }
+
+    ios_base::fmtflags saved_flags = __is.flags ();
+    __is >> noskipws;
+    while (true)
+        {
+        __is >> __c;
+        if ( !__is.good ())
+            break;
+        if (_Traits::eq (__c, __escape))
+        {
+            __is >> __c;
+            if ( !__is.good ())
+                break;
+        }
+        else if (_Traits::eq (__c, __delim))
+            break;
+        __string.push_back ( __c );
+        }
+    __is.flags ( saved_flags );
+    return __is;
+}
+
+
+template <class _CharT, class Iter, class _Traits=char_traits<_CharT>>
+struct quoted_output_proxy
+{
+    Iter  first;
+    Iter  last;
+    _CharT  delim;
+    _CharT  escape;
+
+    quoted_output_proxy(Iter f_, Iter l_, _CharT __delim, _CharT __escape)
+    : first(f_), last(l_), delim(__delim), escape(__escape) {}
+    //  This would be a nice place for a string_ref 
+};
+
+template <class _CharT, class _Traits, class Iter>
+basic_ostream<_CharT, _Traits>& operator<<(
+         basic_ostream<_CharT, _Traits>& os, 
+         const quoted_output_proxy<_CharT, Iter, _Traits> & proxy)
+{
+    return __quoted_output (os, proxy.first, proxy.last, proxy.delim, proxy.escape);
+}
+
+template <class _CharT, class _Traits, class _Allocator>
+struct quoted_proxy
+{
+    basic_string<_CharT, _Traits, _Allocator> &string;
+    _CharT  delim;
+    _CharT  escape;
+
+    quoted_proxy(basic_string<_CharT, _Traits, _Allocator> &s_, _CharT __delim, _CharT __escape)
+    : string(s_), delim(__delim), escape(__escape) {}
+};
+
+template <class _CharT, class _Traits, class _Allocator>
+_LIBCPP_INLINE_VISIBILITY
+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);
+}
+
+//  extractor for non-const basic_string& proxies
+template <class _CharT, class _Traits, class _Allocator>
+_LIBCPP_INLINE_VISIBILITY
+basic_istream<_CharT, _Traits>& operator>>(
+        basic_istream<_CharT, _Traits>& is, 
+        const quoted_proxy<_CharT, _Traits, _Allocator> & proxy)
+{
+    return __quoted_input ( is, proxy.string, proxy.delim, proxy.escape );
+}
+
+
+template <class _CharT>
+_LIBCPP_INLINE_VISIBILITY
+quoted_output_proxy<_CharT, const _CharT *>
+quoted ( const _CharT *s, _CharT delim = _CharT('"'), _CharT escape=_CharT('\\'))
+{
+    const _CharT *end = s;
+    while ( *end ) ++end;
+    return quoted_output_proxy<_CharT, const _CharT *> ( s, end, delim, escape );
+}
+
+template <class _CharT, class _Traits, class _Allocator>
+_LIBCPP_INLINE_VISIBILITY
+quoted_output_proxy<_CharT, typename basic_string <_CharT, _Traits, _Allocator>::const_iterator>
+quoted ( const basic_string <_CharT, _Traits, _Allocator> &s, _CharT delim = _CharT('"'), _CharT escape=_CharT('\\'))
+{
+    return quoted_output_proxy<_CharT, 
+            typename basic_string <_CharT, _Traits, _Allocator>::const_iterator> 
+                    ( s.cbegin(), s.cend (), delim, escape );
+}
+
+template <class _CharT, class _Traits, class _Allocator>
+quoted_proxy<_CharT, _Traits, _Allocator>
+quoted ( basic_string <_CharT, _Traits, _Allocator> &s, _CharT delim = _CharT('"'), _CharT escape=_CharT('\\'))
+{
+    return quoted_proxy<_CharT, _Traits, _Allocator>( s, delim, escape );
+}
+#endif
+
 _LIBCPP_END_NAMESPACE_STD
 
 #endif  // _LIBCPP_IOMANIP
