aboutsummaryrefslogtreecommitdiff
path: root/clang/test/SemaTemplate/deferred-concept-inst.cpp
blob: dd9a4086a42ed8f8c6d760134846e86faf1f9c3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// RUN: %clang_cc1 -std=c++2a -x c++ %s -verify -fsyntax-only -Wno-unused-value
// expected-no-diagnostics

namespace GithubBug44178 {
template <typename D>
struct CRTP {
  void call_foo()
    requires requires(D &v) { v.foo(); }
  {
    static_cast<D *>(this)->foo();
  }
};

struct Test : public CRTP<Test> {
  void foo() {}
};

int main() {
  Test t;
  t.call_foo();
  return 0;
}
} // namespace GithubBug44178