[llvm-bugs] [Bug 31388] New: Accessing objects captured with generalized capture syntax in lambda trailing return type produces an error

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Dec 15 02:44:47 PST 2016


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

            Bug ID: 31388
           Summary: Accessing objects captured with generalized capture
                    syntax in lambda trailing return type produces an
                    error
           Product: clang
           Version: trunk
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++14
          Assignee: unassignedclangbugs at nondot.org
          Reporter: vittorio.romeo at outlook.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

This code:

    int main()
    {
        auto l = [x = 10]() -> decltype(x) {};
    }   

Produces the following error:

    error: use of undeclared identifier 'x'
        auto l = [x = 10]() -> decltype(x) {};
                                        ^

On wandbox:
http://melpon.org/wandbox/permlink/zsFICgiaMhCrIIwe

Related StackOverflow question:
http://stackoverflow.com/questions/41162200

-- 
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/20161215/7b36f30e/attachment.html>


More information about the llvm-bugs mailing list