brintos

brintos / llvm-project-archived public Read only

0
0
Text · 414 B · dd9a408 Raw
24 lines · cpp
1// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify -fsyntax-only -Wno-unused-value2// expected-no-diagnostics3 4namespace GithubBug44178 {5template <typename D>6struct CRTP {7  void call_foo()8    requires requires(D &v) { v.foo(); }9  {10    static_cast<D *>(this)->foo();11  }12};13 14struct Test : public CRTP<Test> {15  void foo() {}16};17 18int main() {19  Test t;20  t.call_foo();21  return 0;22}23} // namespace GithubBug4417824