[Bug c++/12962] g++ fails to match template function
gdr at integrable-solutions dot net
gcc-bugzilla@gcc.gnu.org
Sat Nov 8 20:48:00 GMT 2003
------- 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
More information about the Gcc-bugs
mailing list