Boost logo

Boost :

From: Terje Slettebø (tslettebo_at_[hidden])
Date: 2003-01-30 09:15:02


>From: "Gennaro Prota" <gennaro_prota_at_[hidden]>

> On Thu, 30 Jan 2003 12:33:04 +0100, Terje Slettebø
> <tslettebo_at_[hidden]> wrote:
>
> >>From: "Andrei Alexandrescu" <andrewalex_at_[hidden]>
> >> Even if we also define is_super_and_subtype,
> >> void is hardly a supertype of everything.
> >
> >Well, it could be. It's like an "abstract base class", even for built-in
> >types - everything can be implicitly converted to void
>
> What do you mean? In standard terminology, for an expression e to be
> *implicitly* convertible to T you must be able to write:
>
> T t = e;

You're right that it isn't implicitly convertible to void in this sense.
What I was thinking of was that if you return a value from a function, it
may be ignored by the caller. However, you're right that this doesn't have
anything to do with implicit conversion - there can't even be a void object,
so it clearly isn't obeying LSP. void *, with regard to other pointers, is
something else, though.

Regards,

Terje


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