|
Boost : |
From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2003-01-12 19:41:27
----- Original Message -----
From: "David Abrahams" <dave_at_[hidden]>
> > I didn't know that this was legal:
> >
> > template<class T> struct identity {
> > typedef T type;
> > };
> >
> > template<class T> void func(const T&, typename identity<T>::type* = 0);
> >
> > int main() {
> > func(10);
> > return 0;
> > }
>
> Sure, T is deducible due to the first argument.
Cool, I learn something every day. I assume, though, that if I attempted to
actually use the second parameter it would become non-deducable, right?
Paul Mensonides
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk