|
Boost : |
Subject: Re: [boost] [Filesystem] v3 path separator changes
From: Yakov Galka (ybungalobill_at_[hidden])
Date: 2013-03-25 14:50:44
On Mon, Mar 25, 2013 at 2:32 PM, Alexander Lamaison <awl03_at_[hidden]>wrote:
> Yakov Galka <ybungalobill_at_[hidden]> writes:
>
> >[...]
> > I admit that a path class is a matter of preference. But this is why it
> is
> > unfair that exists(const path &x) uses a path in its interface towards
> > those who do not like using this class.
>
> You realise Boost.Filesystem actually works the way you describe? :-P
> Nothing forces you to use class path to benefit from the operation
> functions. Try this for example:
>
> assert(boost::filesystem::exists("c:\\"));
>
Yes, of course. But on, say, POSIX platforms, you pay for yet another
string allocation even if you don't care for the path. In addition some
library functions return a path, so there are always places where the path
class pops up.
-- Yakov
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk