mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-14 01:46:41 +00:00

This reverts commit 95d94a67755620c0a2871ac6f056ca8e9731d5e9. This implements the deferred concepts instantiation, which should allow the libstdc++ ranges to properly compile, and for the CRTP to work for constrained functions. Since the last attempt, this has fixed the issues from @wlei and @mordante. Differential Revision: https://reviews.llvm.org/D126907
24 lines
414 B
C++
24 lines
414 B
C++
// 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
|