Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2000-10-26 13:20:05


Each template parameter must appear in a deduced context at least
once in the argument list of a template function, and type expressions
including :: are typically nondeduced contexts. So the test()
function below is illegal.

14.8.2.4
  If a template parameter is used only in nondeduced contexts and is not
  explicitly specified, template argument deduction fails.

On Thu, 26 Oct 2000, David Abrahams wrote:

> From: "William Kempf" <sirwillard_at_[hidden]>
> > template <typename T1, typename T2>
> > void test(boost::call_traits<T1>::param_type p1,
> > boost::call_traits<T2>::param_type p2)
> > {
> > p1 = p2; // Just something stupid to insure full parsing.
> > }
>
> I am by no means an expert in this area of the standard, but the usage above
> looks really suspicious to me, all VC issues aside. Consider what we're


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