llvm-project
8a26ecc0 - [clang][NFC] Mark CWG2785 as implemented and add a test (#195547)

Commit
28 days ago
[clang][NFC] Mark CWG2785 as implemented and add a test (#195547) [CWG2785](https://wg21.link/cwg2785) clarifies that a *requires-expression* is never type-dependent, it always has type `bool`. That means that in a snippet like this: ```cpp void g(void *); template <typename T> void f() { g(requires { T(); }); } ``` The call to `g` should be diagnosed as invalid (`bool` is not convertible to `void *`) even if the template is never instantiated. Clang does the right thing since version 10: https://godbolt.org/z/s61rEbsfz
Author
Parents
Loading