On 16 August 2010 22:58, John Dlugosz
lexical_castfs::wpath(fs::wpath("the path that fails"))
Making the string literal a L-string (L"the path that fails"), it won't compile. The spiel is attached at the end of this message.
If that fails, it means operator>> is mishandling spaces in paths.
lexical_castfs::wpath("the path that fails")
Correcting to make the string L, it throws an exception "bad lexical cast: source type value could not be interpreted as target"
You ask if it's version 2 or version 3 of the fs library: It doesn't say!
Sorry, that was my mistake. Version 2 has the space problem in 1.43, but not in 1.44. Version 3 is introduced in 1.44 but works in a different way and has the space problem. I don't know how well it (or lexical cast) handles L-strings. I've brought up the space issue on the development list, but I'm having a bit of trouble explaining it. Until a conclusion is reached, I'd suggest using strings in program options, and then constructing the filesystem path yourself. Daniel