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++/22621] [3.4/4.0/4.1 Regression] Member function overloading introduces syntax errors


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-23 02:03 -------
(In reply to comment #3)
> bar< ptr->f > a;  // ERROR: `->' cannot appear in constant expression
> bar< &ptr->f > b; // ERROR: '>' missing in template argument

No, both of those are invalid as -> cannot be in constant expression.

For the following:
   f_obj<&foo::f> a;   // OK
   f_obj<foo::f>  b;   // ERROR: foo::f cannot be a constant expression

Those two both should be accepted as f references the static functions and not overloaded set.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org


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


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