http://llvm.org/bugs/show_bug.cgi?id=20611

            Bug ID: 20611
           Summary: crash with lambda (auto) return type
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++1y
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

This simple piece of code compiled fine:
    auto l = [](auto& container) -> auto {
            return container[0];
        };

    std::vector<int> v{ 1, 2, 3 };
    std::cout << l(v);

But clang will crash on this:
    auto l = [](auto& container) -> (auto) {
            return container[0];
        };

    std::vector<int> v{ 1, 2, 3 };
    std::cout << l(v);

Here is additional brackets around auto: (auto).

Thanks

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to