The Boost quoted stream I/O manipulator places delimiters, defaulted
to the double-quote ("), around strings on output, and strips off
the delimiters on input. This ensures strings with embedded spaces round-trip as
desired. For example,

If the first character extracted is equal to delim, as determined by
operator==, then:

Turn off the skipws flag.

string.clear()

Until an unescaped delim character is reached or
is.not_good(), extract
characters from os and append them to string,
except that if an escape is reached, ignore it and append the
next character to string.

Discard the final delim character.

Restore the skipws flag to its original value.

Otherwise, os >> string.

Remarks:string, escape, and delim
have the type and value of the corresponding arguments of the call to the
quoted function that constructed proxy.

Returns:is.

Acknowledgements

The quoted() stream manipulator emerged from discussions on the
Boost developers mailing list. Participants included Beman Dawes, Rob Stewart,
Alexander Lamaison, Eric Niebler, Vicente Botet, Andrey Semashev, Phil Richards,
and Rob Murray. Eric Niebler's suggestions provided the basis for the name and
form of the templates.