Subject: Re: [boost] [filesystem] Request for comments on proposedrelative() function
From: Peter Dimov (lists_at_[hidden])
Date: 2014-05-16 09:20:11
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
relative( d:/, c:a/b ) == c:a/b
-- c:a/b is not a relative path.
Absolute, def :- path x is absolute when r / x does not depend on r.
On an unrelated note, this c:a/b business sure throws a spanner in the
works. It's absolute by the above definition... but it depends on the
current directory of drive C... except that there is no such thing as a
current directory of drive C in Windows, there's only one current directory
per process... except that under DOS current directories were per-drive, so
they are emulated today using hidden environment variables*. Madness. How
about we just say c:a/b is c:/a/b and be done with it.
(*) SET "" will display the hidden variables. The current directory of drive
C: is the variable "=C:".
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk