Issue |
98261
|
Summary |
[clang] Structured bindings cannot be initialized from braced rvalue arrays
|
Labels |
clang
|
Assignees |
|
Reporter |
MagentaTreehouse
|
The following code fails to compile:
```cpp
struct Array {
int data[2];
};
Array f() { return {}; }
int main() {
auto [a, b]{f().data}; // xvalue init
using T = int [2];
auto [c, d]{T{}}; // prvalue init
}
```
See Compiler Explorer: https://godbolt.org/z/P3EPzWdTc
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs