[llvm-bugs] [Bug 42053] New: [rejects valid] error when lambda capturing the result of a sctructured binding

via llvm-bugs llvm-bugs at lists.llvm.org
Tue May 28 22:59:37 PDT 2019


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

            Bug ID: 42053
           Summary: [rejects valid] error when lambda capturing the result
                    of a sctructured binding
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++17
          Assignee: unassignedclangbugs at nondot.org
          Reporter: tiagomacarios 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

https://godbolt.org/z/do-bM3

struct S {
  int a;
};

void f() {
  []() {
    auto [k] = S{0};
    [k]() {};
  };
}


<source>:8:6: error: 'k' in capture list does not name a variable

    [k]() {};

     ^

-- 
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/20190529/52ad608b/attachment-0001.html>


More information about the llvm-bugs mailing list