1 // RUN: %clang_cc1 -std=c++2a -x c++ %s -verify -fsyntax-only -Wno-unused-value 2 // expected-no-diagnostics 3 4 namespace GithubBug44178 { 5 template <typename D> 6 struct CRTP { call_fooGithubBug44178::CRTP7 void call_foo() 8 requires requires(D &v) { v.foo(); } 9 { 10 static_cast<D *>(this)->foo(); 11 } 12 }; 13 14 struct Test : public CRTP<Test> { fooGithubBug44178::Test15 void foo() {} 16 }; 17 main()18int main() { 19 Test t; 20 t.call_foo(); 21 return 0; 22 } 23 } // namespace GithubBug44178 24