|
Boost : |
Subject: Re: [boost] [filesystem] Request for comments on proposedrelative() function
From: Beman Dawes (bdawes_at_[hidden])
Date: 2014-05-16 18:18:51
On Fri, May 16, 2014 at 7:20 AM, Peter Dimov <lists_at_[hidden]> wrote:
> Yakov Galka wrote:
>
> relative(x,y) returns a path z (unique up to equivalence), if exists,
>> such that y / z = x (up to equivalence)
>>
>
> If you allow z to be an absolute path, it'd never be unique when x is
> absolute, because x would be a trivial solution then. This is why I don't
> particularly like
>
> relative( d:/, c:a/b ) == c:a/b
>
As proposed, lexically_relative("d:/", "c:a/b") is an error.
The semantics are deliberately conservative in that p must be prefixed with
base, rather than trying to invent some possible semantics for the case
where the two arguments appear to have no lexical connection.
--Beman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk