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: unassignedclangb...@nondot.org
          Reporter: tiagomacar...@gmail.com
                CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
                    llvm-bugs@lists.llvm.org, richard-l...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to