http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56084



--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-01-23 
17:44:24 UTC ---

(In reply to comment #4)

> BTW, what is the difference between deduction and substitution?



Some template arguments are deduced from the function arguments, and those

arguments are then substituted into the rest of the function template signature

to form a function signature.



e.g.



template<typename T, typename U=T>

void func(T, typename T::iterator)

{ }



If you call 'func(v, v.begin())' then T will be deduced from the type of 'v', U

will be deduced as the same type, then that type will be substituted into the

type T::iterator. If 'v' has no nested 'iterator' type then substitution fails

and so deduction fails, and the template cannot be called.

Reply via email to