Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-08-11 14:00:11


David Abrahams <dave_at_[hidden]> writes:

> Thomas Witt <witt_at_[hidden]> writes:
>
>> What would be the native representation for the following native
> ^^^^^^ ^^^^^^
>> paths
>>
>> C:\C\foo
>> \C\foo
>> C:\foo
>
> Not a very interesting challenge.
>
> "C:\C\foo"
> "\C\foo"
> "C:\foo"
>
> I assume you mean the portable representation of the native paths:
>
> "/C/C/foo"
> "/" + *current_path().begin() + "/C/foo" (**)
> "/C/foo"
>
> (**) There is no way to represent "The foo subdirectory of the C
> directory of the current drive" portably, because it isn't a portable
> concept. Therefore, we could pick other sensible answers for the
> middle path, e.g.:
>
>
> 1. Exception is thrown
>
> 2. "./C/foo"
>
> 3. "/*/C/foo" where '*' is some character not normally allowed
> in portable paths.

Sorry, should've been:

            "*/C/foo" where '*' is some character not normally
            allowed in portable paths.

Just to avoid confusion with the term "absolute" because I gather
some people need any path starting with '/' to be absolute.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk