[llvm-bugs] [Bug 39180] New: Clang compiler failed with error: no matching member function for call to 'f'
    via llvm-bugs 
    llvm-bugs at lists.llvm.org
       
    Thu Oct  4 10:49:44 PDT 2018
    
    
  
https://bugs.llvm.org/show_bug.cgi?id=39180
            Bug ID: 39180
           Summary: Clang compiler failed with error: no matching member
                    function for call to 'f'
           Product: clang
           Version: 6.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: soumi.manna at intel.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Clang compiler failed on windows with error: no matching member function for
call to 'f' for the following example.
bug.cpp:10:19: error: no matching member function for call to 'f'
        int b = a.f();
                ~~^
bug.cpp:2:34: note: candidate template ignored: deduced too few arguments for
expanded pack 'T'; no argument for 1st
      expanded parameter in deduced argument pack <>
        template<Types ...T> int f() {
                                 ^
1 error generated.
Microsoft visual studio 2017 passes the example.
ksh-3.2$ cl -c -std:c++17 bug.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.13.26131.1 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.
bug.cpp
ksh-3.2$ cat bug.cpp
template<class ...Types> struct Tuple_ {  // _VARIADIC_TEMPLATE
        template<Types ...T> int f() {
                return sizeof...(Types);
        }
};
int main(int argc, char *argv[])
{
        Tuple_<char,int> a;
        int b = a.f();
}
Soumi Manna
Intel C/C++ Front-end team
-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181004/8b252572/attachment-0001.html>
    
    
More information about the llvm-bugs
mailing list