[llvm-bugs] [Bug 43297] New: incorrect overload resolution for function with variadic templates and parameter with default value

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 12 10:23:35 PDT 2019


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

            Bug ID: 43297
           Summary: incorrect overload resolution for function with
                    variadic templates and parameter with default value
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++17
          Assignee: unassignedclangbugs at nondot.org
          Reporter: andrey.a.davydov at gmail.com
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

template<typename... T>
void f(T...);          // #1

template<typename... T>
void f(T..., int = 1); // #2

void test() {
    f();
}

Clang selects #2 (https://gcc.godbolt.org/z/tJNCzq), but it must be an
ambiguous function call.

-- 
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/20190912/82e402ab/attachment.html>


More information about the llvm-bugs mailing list