[Bug c++/48883] ?: ternary operator fails in certain contexts - link error
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu May 5 12:15:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48883
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.05.05 12:15:05
Ever Confirmed|0 |1
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-05-05 12:15:05 UTC ---
reduced:
template<typename T>
T myMax(T a, T b) {
if(a < b) return a;
return b;
}
int main() {
bool even = true;
int (*fp)(int, int);
fp = even ? myMax<int> : myMax<int>; /* yields link error */
}
The function template specialization should be implicitly instantiated
More information about the Gcc-bugs
mailing list