This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/36486] g++ accepts code with ambiguous overloading
- From: "peterbindels at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Jun 2008 21:32:57 -0000
- Subject: [Bug c++/36486] g++ accepts code with ambiguous overloading
- References: <bug-36486-11760@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from peterbindels at gmail dot com 2008-06-10 21:32 -------
It's still warning free on 4.3.1 (except with all turned on, when ti complains
about unused parameters but nothing else).
As far as I can tell the second template matches the subset of the matches for
the first template where R would be an const ? &, with the second parameter
matching a different but still default constructed type. It's not ambiguous
because of the const at least.
I don't see why this would not work? Do you have an std reference for why this
would be ill-formed?
--
peterbindels at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |peterbindels at gmail dot
| |com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36486