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

            Bug ID: 34702
           Summary: Address of variadic template function leads to type
                    deduction failure
           Product: clang
           Version: 5.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: m...@ookypooky.com
                CC: llvm-bugs@lists.llvm.org

This code:

--
template<typename... Ts>
void f (Ts... vs, int y);

auto p = &(f<>);
--

Fails to compile as follows:

--
$ clang++ -std=c++17 clang.cpp
clang.cpp:4:12: error: address of overloaded function 'f' does not match
required type 'void (int)'
auto p = &(f<>);
           ^~~
clang.cpp:2:6: note: candidate template ignored: failed template argument
deduction
void f (Ts... vs, int y);
     ^
1 error generated.
--

The code compiles fine in g++, FWIW. I don't see why it would be illegal, and
if it is illegal then the error message could do with being improved!

-- 
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