$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2004-11-18 13:18:09
> >>IMO, a runtime error here is just not acceptable.
> >
> > I disagree. I don't see compile-time error as an advantage here, but
only a
> > burden. I very much prefer to be able to write
>
> I'm sorry but that just doesn't make sense... You are basically saying
> that, straight C++, if you have...
>
> void foo(int arg1, int arg2);
>
> And I use it as...
>
> foo(1);
>
> That C++ should give me a runtime error instead of the compiler doing
> the syntax checking.
>
> Are you serious?
I am discribing following sotuation:
void foo(int arg1, int arg2) {...}
void foo(int arg1) {...}
template<typename Params>
foo1( Params const& p) {
if( p.has(asrg2) )
foo( p[arg1], p[arg2] );
else
foo( p[arg1] );
}
I think it's very convinient to be able to call different overloads of the
same function without using any MP tricks.
Gennadiy.