|
Boost : |
From: Vesa Karvonen (vesa.karvonen_at_[hidden])
Date: 2001-11-26 07:40:55
From: "Daniel Frey" <daniel.frey_at_[hidden]>
> I like Vesa's approach:
>
> is< D >::derived_from< B >::value
> is< B >::base_of< D >::value
>
> Is it possible to make this work on most compilers?
My comment was really meant as a joke... I should have added a smiley. (How
many of you did laugh?)
Yes. It is possible to make it work (except on some broken compilers), but you
would often need to write:
is< D >::template derived_from< B >::value
which is not ideal. I also don't like the idea of lumping several
metafunctions together.
As I explained in a private e-mail to Andrei Alexandrescu over six months ago,
I would personally prefer:
is_base_derived<B,D>::value
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk