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++/12357] Fails to find overload (or maybe very bad error message)


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12357


igodard at pacbell dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


------- Additional Comments From igodard at pacbell dot net  2003-09-22 22:56 -------
Pardon me, but I think it is premature to close this bug.

The issue of operator< suggested by Bangaerth is a red herring - you get the same message with any function, including the "P" that is acceptable as an explicit argument (try it).

Sidwell says that default arguments do not play a part in type deduction. This may be so, although it escapes my why that should be. It seems trivial to me to look at each candidate and see if there is a resolution to the call, using the defaults for any missing actuals. Perhaps it's a scope issue, because the actuals and the defaults have differing scopes.

BTAIM, if templates can't (usefully) have default arguments, then the compiler should flag that at the declaration of the template, not at the call. And even at the call something a bit more informative than simply "nothing matched" would sure help the poor user. What does EDG say if you use "P" as the default?

Ivan


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