This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/25610] New: 'invalid use of member' error on correct code with templates
- From: "yuri at tsoft dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Dec 2005 02:31:24 -0000
- Subject: [Bug c++/25610] New: 'invalid use of member' error on correct code with templates
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following testcase produces strange error message on the line 'vv.s1...':
error: invalid use of member (did you forget the '&' ?)
--- testcase ---
struct CC {
template<int mm> CC s1(int m) { return (CC()); }
};
template<class A>
struct S {
static inline void exec1(A &vv) {
vv.s1<1>(1);
}
};
void f() {
CC v;
S<CC>::exec1(v);
}
--
Summary: 'invalid use of member' error on correct code with
templates
Product: gcc
Version: 4.0.2
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: yuri at tsoft dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25610