https://bugs.llvm.org/show_bug.cgi?id=51793
Bug ID: 51793
Summary: Clang bind non-const lvalue reference to an rvalue in
lambda init-capture list
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++2b
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
struct O {
constexpr int f() const { return 0; };
} o;
constexpr bool b = [](auto... args) {
return [&...x = args.f()] {
return true;
}();
}(o);
Clang accepts this code.
https://godbolt.org/z/jYfoM7sbx
--
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