------- Comment #2 from cjoldfield at gmail dot com  2010-05-25 17:09 -------
Intel 11.1 accepts it, but it doesn't even try to instantiate "one &f(...)". 
To see what I mean, try replacing main with:

#include <iostream>
int main()
{
   std::cout << sizeof(f<D*, int>(0)) << std::endl;
   std::cout << sizeof(f<D*, B*>(0)) << std::endl;
   std::cout << sizeof(f<VD*, B*>(0)) <<std::endl;
}

Also for intel, if one forces it to try to instantiate "one &f(...)" by
removing "two &f(...)", it will complain that there is no matching call to
f<...>(0) for all three calls (it should match the second).  In this situation,
gcc only complains about the first and the last, which is the expected
behavior.


-- 


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

Reply via email to