Summary: | Order of operations during overload resolution | ||
---|---|---|---|
Product: | gcc | Reporter: | Nathan Ridge <zeratul976> |
Component: | c++ | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | daniel.kruegler |
Priority: | P3 | ||
Version: | 4.8.0 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: |
Description
Nathan Ridge
2012-08-18 08:03:54 UTC
Richard Smith has suggested that GCC is actually allowed not to instantiate 'meta<int>' as per [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." If this is really what's happening - GCC is not instantiating 'meta<int>' because it can determine without doing so that the first overload of 'foo' will not be chosen - then I guess we can close this PR as INVALID. Current ICC also accepts this. Current SolarisStudio also accepts it. I guess I'm going to add the testcase and close the bug. Author: paolo Date: Tue May 13 16:14:19 2014 New Revision: 210385 URL: http://gcc.gnu.org/viewcvs?rev=210385&root=gcc&view=rev Log: 2014-05-13 Paolo Carlini <paolo.carlini@oracle.com> PR c++/54310 * g++.dg/template/pr54310.C: New. Added: trunk/gcc/testsuite/g++.dg/template/pr54310.C Modified: trunk/gcc/testsuite/ChangeLog Done. |