25 Jul
2013
25 Jul
'13
12:41 a.m.
[Nathan Ridge]
A clang developer has recently pointed me to an interesting clause in the standard ([temp.inst] p6): "If the overload resolution process can determine the correct function to call without instantiating a class template definition, it is unspecified whether that instantiation actually takes place." Perhaps this is coming into play here (and thus all of the above behaviour is standard-conforming)?
That's an excellent catch. Yep, I agree.
Of course, just because there isn't a unique standard-conforming behaviour doesn't mean that isn't value in compiler implementers agreeing on a de facto standard behaviour in common cases, like the one that arose in this thread. :) Regards, Nate