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: unassig...@gcc.gnu.org
        ReportedBy: eldlistmaili...@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.

Reply via email to