Boost logo

Boost :

From: Alexander Nasonov (alnsn_at_[hidden])
Date: 2002-04-22 02:59:33

"Andrei Alexandrescu" <andrewalex_at_[hidden]> wrote in message
> That is correct. MC++D explains why. The closest you can get is by using
> acyclic visitation. This is because the only thing that behaves like a
> template and a virtual function at the same time is dynamic_cast.

The dynamic_cast behaves like template because it is defined on a set of
   dynamic_cast<T>(v) is valid if T belongs to D(v),
   where D(v) is set of types defined according to 5.2.7 of C++ standard

You can emulate dynamic_cast once you defined this set by hand. Easiest way
to do so is enumerate those types in typelist. For more information, view my

Alexander Nasonov

Boost list run by bdawes at, gregod at, cpdaniel at, john at