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

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

Reply via email to