
2012/2/11 Frédéric Bron <frederic.bron@m4x.org>
[...] And this explains why it worked perfectly with v2 which used a string as argument.
Yes, filesystem v3 misuses paths as strings. Beman: this is one of the items in my list of what's bad in boost::filesystem. And apparently I'm not the only one who thinks so: On Wed, Feb 1, 2012 at 13:08, Thorsten Ottosen <thorsten.ottosen@dezide.com>wrote:
Remark 2: The fact that functions like extension() returns a temporary path object seems overkill (I know its only a cheap string copy, but still). I fail to see how ".foo" can be a path.
Me too. Nor why *p.begin() is a path. It's correct that (almost) every string can be treated as a path, but it doesn't mean that it has to. Also you said (N3363): Users are misusing paths as general string containers because they provide
interoperability.
Ironically boost::filesystem does the same thing. (And in fact it's the only code I've seen misusing boost::filesystem::path as described.) -- Yakov