Issue 53057
Summary [Concepts] Cannot use _BitInt in type requirements
Labels new issue
Assignees
Reporter Matthewacon
    **Affected versions**: 12.0.0 and onward

**Example 1 (clang 14.0.0+)**:
```c++
template<auto N>
requires requires {
 typename _BitInt(N);
}
using T = void;
```

**Example 2 (clang versions 12.0.0 - 13.0.0)**:
```c++
template<auto N>
requires requires {
 typename _ExtInt(N);
}
using T = void;
```

**Diagnostic**:
```
<source>:3:11: error: expected a qualified name after 'typename'
 typename _BitInt(N);
          ^
1 error generated.
```
**Notes**:
Can work around the issue by using an alias template, as follows:
```c++
template<auto N>
using BitInt = _BitInt(N);

template<auto N>
requires requires {
 typename BitInt<N>;
}
using T = void;
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to