Boost logo

Boost :

From: John Max Skaller (skaller_at_[hidden])
Date: 2001-08-27 14:05:58


Jonathan H Lundquist wrote:

[function template specialisation syntax]

> > Why isn't the obvious syntax:
> >
> > template<>
> > void f<int, long>(int, long)
> >
> >
> > Because it fails to correctly identify
> >which template is being specialised in all cases.
> >For example:
> >
> > template<class U, class V>
> > void f(U,V); //1
> >
> > template<class U, class V>
> > void f(V,U); //2
>
> Thanks for expounding, but aren't the two above ambiguous anyway without any
> specializations?

        What do you mean 'the above two'?
Do you mean a _call_?

        int i; string s;
        f<int,string>(i,s);

Doesn't this call match 1, but not 2?

-- 
John (Max) Skaller, mailto:skaller_at_[hidden] 
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
New generation programming language Felix  http://felix.sourceforge.net
Literate Programming tool Interscript     
http://Interscript.sourceforge.net

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