This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/48157] New: Unable to match function call to member function template
- From: "eldlistmailingz at tropicsoft dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 16 Mar 2011 20:50:53 +0000
- Subject: [Bug c++/48157] New: Unable to match function call to member function template
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48157
Summary: Unable to match function call to member function
template
Product: gcc
Version: 4.5.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: eldlistmailingz@tropicsoft.com
The code:
"struct AType
{
template<class AA>
void SomeFuncTemplate()
{ }
};
template < class T >
struct TTest2
{
template<T> struct helper;
template<class U>
static void check(helper<&U::template SomeFuncTemplate<int> > *);
};
int main()
{
TTest2< void (AType::*)() >::check<AType>(0);
}"
The error message:
test_has_fun_template.cpp: In function 'int main()':
test_has_fun_template.cpp:19:46: error: no matching function for call to
'TTest2<void (AType::*)()>::check(int)'
"g++" -ftemplate-depth-128 -O0 -fno-inline -Wall -pedantic -g
-Wno-variadic-macros -I"..\..\.." -I"C:\Programming\VersionControl\boost" -c
-o
"..\..\..\bin.v2\libs\tti\test\test_has_fun_template.test\gcc-mingw-4.5.2\debug\test_has_fun_template.o"
"test_has_fun_template.cpp"
This occurs in gcc 4.5.2 and in all previous versions I have tested including
4.5.0, 4.4.0, and 4.3.0.