Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-05-05 06:36:08


From: "Dietmar Kuehl" <dietmar_kuehl_at_[hidden]>
> template <class SP> void f(SP p);
>
> is, of course, inappropriate because it would be "catch all". A slight
> variation (thanks to Howard Hinnant for pointing out this technique in
> a different context) removes this "catch all" problem at the cost of
> writing a certain default argument:
>
> template <class SP> void f(SP p,
> typename is_ptr_shared<SP>::type = 0);

That's nice. Restricted templates possible, after all. ;-)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk