|
Boost : |
From: Beman Dawes (beman_at_[hidden])
Date: 1999-09-01 11:16:43
Steve Cleary wrote:
>Why not:
>
>namespace boost {
> namespace {
> template <class Derived, class Base>
>-> static
> inline Derived polymorphic_cast(Base* x) {
> assert( dynamic_cast<Derived>(x) != 0 ); // detect logic
error
> return static_cast<Derived>(x);
> }
> }
>}
>
>or am I missing something?
The unnamed namespace has the same effect as static. Static has been
deprecated for this usage if I remember correctly.
--Beman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk