This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12962] g++ fails to match template function
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Nov 2003 20:48:30 -0000
- Subject: [Bug c++/12962] g++ fails to match template function
- References: <20031108122926.12962.smelkov@mph1.phys.spbu.ru>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2003-11-08 20:48 -------
Subject: Re: g++ fails to match template function
"smelkov at mph1 dot phys dot spbu dot ru" <gcc-bugzilla@gcc.gnu.org> writes:
| Now I see.
| g++ error message is really misleading. Wouldn't it then be better
| to change it for such cases?
What happens is that the compiler tries to build an overload set, and
after eliminating the non-viable function and before proceding to actual
overload resolution, it finds that there is no matching function.
This is argualy confusing but consider that proper implementation of
SFINAE implies *silent* elimination of non viable candidates.
Maybe the compiler could keep a list of non-viable candidates
(eliminated because of SFINAE).
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12962