$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Valentin Bonnard (Bonnard.V_at_[hidden])
Date: 1999-09-01 11:13:19
scleary_at_[hidden] 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?
It's:
- redundant: it's in a anonymous namespace,
there is function template per TU
- deprecated: static at namespace scope is
deprecated
- useless: having one function per file doesn't
solve the problem
- dangerous: having one function per file makes
boost simply unusable
-- Valentin Bonnard