Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2004-09-06 09:29:38


At 03:01 AM 9/6/2004, Vladimir Prus wrote:

>...
>I would say that most of #ifdefs inside path.cpp exist to handle root
path
>on Windows. The path is stored as a string and there are many instances
of
>code which looks at first characters to determine if there <letter> ':'
'/'
>pattern. I think if path explicitly store
>
> - a bool telling if path has a root
> - the length of the root
>
>all this logic would be much simplified.

That may be true, but it adds runtime cost. The benefit of somewhat
simplified implementation code doesn't seem worth the cost. The current
implementation code isn't all that bad. It has not been a source of bugs or
other problems that would indicate it needs replacing. Even if it did need
replacing, that could be done by refactoring without adding runtime costs.

Am I missing something?

--Beman


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