https://bugs.llvm.org/show_bug.cgi?id=38269

            Bug ID: 38269
           Summary: no matching function for call to 'f'
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangb...@nondot.org
          Reporter: zhong...@pku.org.cn
                CC: dgre...@apple.com, llvm-bugs@lists.llvm.org

The code is as follow:

template<class T, class U> struct A { };
template<class... T, class ... U> void f( A<T,U>...p);

void g() { 
 f<int>( 
 A<int,unsigned>(),
 A<short,unsigned short>() 
 );
}

clang++ rejects it:


code0.cpp:5:2: error: no matching function for call to 'f'
 f<int>( 
 ^~~~~~
code0.cpp:2:40: note: candidate template ignored: substitution failure :
      deduced incomplete pack <int, (no value)> for template parameter 'T'
template<class... T, class ... U> void f( A<T,U>...p);
                  ~                    ^
1 error generated.

g++, instead, accepts it. BTW, T shall end up as {int,short}?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to