Boost logo

Boost :

Subject: Re: [boost] [filesystem][lexical_cast] Lexical cast of filenames containing spaces
From: Dmitry Goncharov (dgoncharov_at_[hidden])
Date: 2010-08-14 10:27:36


> An issue has come up in program options. With filesystem v3, this throws:
>
> lexical_cast<boost::filesystem::path>("file name")
>
> The problem is that filesystem v3's stream extractor treats spaces as
> separators (which is the right thing to do IMO), so it only extracts "file", which
> causes lexical cast to throw an exception - because the whole string hasn't
> been extracted.
>
> Would it be possible to create a special case in lexical_cast to deal with this?
> How does it deal with this problem for strings?
>

This bug was fixed two month ago.
Have a look https://svn.boost.org/trac/boost/ticket/3863

Regards, Dmitry


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk