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++/19054] Parse error in calls to template function members


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-17 13:54 -------
The first parse error is a dup of bug 795, which was fixed for 3.4 as you pointed out and has a work 
around which is just the same as fixing the next parse error which is a true parse error.
The second one is not a bug in GCC but in your code since wm is type dependent, there is not enough 
information for the compiler to kown that wm.t is a template.  The fix in the source is:
  template <int n, int m>
  void t_m()
  {
    D<n> wm;
    wm.template t<m>(); // parse error here
    // Workaround: change function name form `t_m' to `t' !?!
  }

Note the template keyword, that is needed to tell the compiler/parser that wm.t is a template.

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


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


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