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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to