Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-01-22 08:29:05


From: "John Maddock" <jm_at_[hidden]>
> > That's very well put; I don't think anyone thought very carefully
> > about the meaning of "convertible" before, and I think we could
> > probably stand to tighten up our documentation in this area. All it
> > says right now is:
> >
> > Evaluates to true if type T is convertible to type U.
> > Types T and U must not be incomplete, abstract or function types.
> >
> > Can you suggest an appropriate technical explanation?
>
> Well the wording in the standardisation proposal says:
>
> "value: defined to be true only if type From is implicitly-convertible to
> type To (4.0).
>
> Which really says it all IMO (by reference to section 4.0 of the standard.

Nope, it says nothing AFAICS. A type cannot be convertible. Only values are.
And you cannot say "a value of type From is implicitly convertible to To
(4.0)" because you need to specify whether that value is an lvalue of type
>From or an rvalue of type From, and what do l- and r-values mean when
applied to strange (array, reference, function, abstract, etc) types.


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