This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/48883] ?: ternary operator fails in certain contexts - link error
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 5 May 2011 12:15:44 +0000
- Subject: [Bug c++/48883] ?: ternary operator fails in certain contexts - link error
- Auto-submitted: auto-generated
- References: <bug-48883-4@http.gcc.gnu.org/bugzilla/>
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