Clang rejects valid program when delete move ctor is used in decltype
Open
clang:frontend
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
The following valid program is rejected by clang, gcc and msvc:
```c++
struct NoMove {
NoMove(NoMove&&) = delete;
};
NoMove&& DeclVal();
void F1(...);
void F2(auto);
using Type1 = decltype(F1(DeclVal())); // #1: this compiles
using Type2 = decltype(F2(DeclVal())); // #2: this doesn't compile when it should
```
Contributor guide
Research direction
Start with the supplied C++ reproducer, focusing on the contrast between decltype(F1(DeclVal())) (#1) and decltype(F2(DeclVal())) (#2), and compare the compiler diagnostics. Done means the valid program is accepted consistently for the Type2 declaration while preserving the existing behavior of Type1.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100