| Issue |
58107
|
| Summary |
Requires expressions are not allowed to be used as bool expressions
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
steve02081504
|
demo code: https://godbolt.org/z/6o6K9GnnY
```c++
#define was_not_an_ill_form(...) (bool(requires { __VA_ARGS__; }))
template<class T>
T declval();
struct A {};
template<class T>
constexpr bool is_func = was_not_an_ill_form(declval<T>()());
int main() {
static_assert(!is_func<A>);
}
```
work in gcc: https://godbolt.org/z/ddEYahYox
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs