[Bug c++/37088] Functions with default parameters not correctly handled inside templates.

bangerth at dealii dot org gcc-bugzilla@gcc.gnu.org
Wed Aug 13 16:22:00 GMT 2008



------- Comment #2 from bangerth at dealii dot org  2008-08-13 16:21 -------
(In reply to comment #0)
> bool pred4(const char *, const char *, const char *x = "", const char *y = "");

The type of pred4 is still
  bool (*) (const char *, const char *, const char *x, const char *)
and so when you pass this function through a pointer it can't be called with
only two parameters. 

Andrew is right that this used to be one of the many ill-conceived gcc
extensions.

W.


-- 

bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bangerth at dealii dot org
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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



More information about the Gcc-bugs mailing list