Issue 178682
Summary Clang rejects valid program involving lambda evaluation inside decltype with deleted parameterized ctor
Labels clang
Assignees
Reporter ranaanoop
    The following valid program is rejected by gcc and clang but accepted by msvc. Demo: https://godbolt.org/z/KnzqaM1Ev

```

struct C
{
  C(int) = delete;
  C(){};
};

decltype([b = C(3)](){ return 4;}()) var; //msvc OK but gcc and clang rejects

decltype([C(3)](){ return 4;}()) var2; //accepted by all compilers
int main()
{

} 
```
This is well-formed as explained in the following stackoverflow thread: https://stackoverflow.com/q/79878786/12002570
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to