s/requires/REQUIRES to fix the test on release build
[llvm-project.git] / lldb / test / API / lang / cpp / crtp / main.cpp
blobed33115b88a93f15867470458cce27dfe2357b8e
1 template <typename T> struct Base {
2 Base(T &t) : ref(t), pointer(&t) {}
3 // Try referencing `Derived` via different ways to potentially make LLDB
4 // pull in the definition (which would recurse back to this base class).
5 T &ref;
6 T *pointer;
7 T func() { return ref; }
8 };
10 struct Derived : Base<Derived> {
11 Derived() : Base<Derived>(*this) {}
12 int member = 0;
15 Derived derived;
17 int main() { return derived.member; }