From: Kevlin Henney (kevlin_at_[hidden])
Date: 2000-09-04 09:51:07
In message <01c501c0167c$b0c61060$3e0524d4_at_pdimov>, Peter Dimov
>We'll have to ask somebody with access to VC7 to try the a.to_ptr<T>()
>syntax. VC6's inability to handle it is a parser problem that might be fixed
From what I hear, I wouldn't hold your breath :-(
>I want to be able to compare ref's that hold values of the same type via
>operator<, hence the default semantics. Also, the ability to use ref as a
>map key is a good thing, IMHO.
>(This applies to any as well.)
This is why map and set take an optional function object type to make
the comparison criteria explicit.
>As an aside, what are the reasons that type_info::op< is spelled before()?
Because it does not represent a magnitude-based comparison. It conforms
to the principle of least astonishment, for the simple reason that
operator< implies an obvious, total-ordering comparison for a type. The
same applies to ref<>, except that ref<> spells before() -- incorrectly,
IMHO -- as operator< ;-)
Kevlin Henney phone: +44 117 942 2990
Curbralan Ltd mobile: +44 7801 073 508
kevlin_at_[hidden] fax: +44 870 052 2289
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk