This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19054] Parse error in calls to template function members
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Dec 2004 13:54:27 -0000
- Subject: [Bug c++/19054] Parse error in calls to template function members
- References: <20041217134807.19054.dummy1@gazeta.pl>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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