|
Boost : |
From: Beman Dawes (bdawes_at_[hidden])
Date: 2004-02-02 11:41:47
At 09:41 AM 2/2/2004, David Abrahams wrote:
>Beman Dawes <bdawes_at_[hidden]> writes:
>
>> Coming back to equivalence, I still like John Maddock's suggestion of
>> throwing only if both do not exist. If fits my intuitive sense of what
>> "equivalence" means for files and directories. However, such thoughts
>> in the past sometimes changed when tests cases were being
>> constructed. So no firm decision has been made yet.
>
>I don't think I'd want an exception in this case either. I think you
>should treat a path that doesn't exist like a non-signalling NaN.
>IIRC, two NaNs never compare equal.
That makes sense, and it also occurred to me earlier. What would push me
strongly in one direct or another is if someone came up with a case where
the non-throwing approach was more dangerous. But I can't think of such a
case.
The NaN analogy is a clear way to explain the rationale for not throwing.
--Beman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk