[llvm-bugs] [Bug 49578] New: Clang frontend command failed when candidate function template not viable

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Mar 13 09:26:01 PST 2021


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

            Bug ID: 49578
           Summary: Clang frontend command failed when candidate function
                    template not viable
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: hewillk at gmail.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

The following code will trigger the clang frontend error:

#include <variant>

template <class... Ts> struct overloaded : Ts... { };

int main() {
    std::variant<int, double> vec[] = {10, 1.5};
    for (auto& v: vec) {
        std::visit(overloaded {
            [](auto arg) { },
            [](double arg) { },
        }, v);
    }
}

(godbolt: https://godbolt.org/z/jobfzn)

-- 
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/20210313/6c56a699/attachment-0001.html>


More information about the llvm-bugs mailing list