This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/12962] g++ fails to match template function


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]