Boost logo

Boost :

Subject: Re: [boost] [filesystem.v3] possible bug in replace_extension
From: Yakov Galka (ybungalobill_at_[hidden])
Date: 2012-02-10 17:42:22

2012/2/11 Frédéric Bron <frederic.bron_at_[hidden]>

> [...]
> 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

> 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.)


Boost list run by bdawes at, gregod at, cpdaniel at, john at