Boost C++ Libraries: Ticket #11898: Input stream operator of a filesystem::path can't handle spaces https://svn.boost.org/trac10/ticket/11898 <p> The operator&gt;&gt; in filesystem::path breaks at spaces as it would for a std::string, whereas spaces can be an integral part of a path. Concretely, the following code </p> <pre class="wiki">boost::filesystem::path p; std::istringstream("path/with spaces") &gt;&gt; p; std::cout &lt;&lt; p &lt;&lt; std::endl; </pre><p> prints "path/with" on OS X 10.11.2. I believe boost::io::quoted is supposed to take care of the spaces in the operator&gt;&gt; implementation </p> <pre class="wiki">is &gt;&gt; boost::io::quoted(str, static_cast&lt;Char&gt;('&amp;')); </pre><p> but this doesn't work on my system. (One of the weird points seems to be that it gets called with two arguments, but its declaration requires three and I can't find a default argument declaration.) Replacing the implementation with </p> <pre class="wiki">std::getline(is, str); </pre><p> seems to work for me, but I have a feeling that this bypasses some of the necessary logic in boost::io::quoted. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11898 Trac 1.4.3