[mlir][acc] Introduce MappableType interface (#122146)
[llvm-project.git] / lldb / test / API / lang / cpp / const_this / main.cpp
blobc9bd6a3f03bb27871794b794f746a196bdb2f6d1
1 struct ContextClass {
2 int member = 3;
3 ContextClass *this_type = nullptr;
4 ContextClass() { this_type = this; }
6 int func() const {
7 return member; // break in function in class.
10 template <class T> T templateFunc(T x) const {
11 return member; // break in templated function in class.
15 template <typename TC> struct TemplatedContextClass {
16 int member = 4;
17 TemplatedContextClass<TC> *this_type = nullptr;
18 TemplatedContextClass() { this_type = this; }
20 int func() const {
21 return member; // break in function in templated class.
24 template <class T> T templateFunc(T x) const {
25 return member; // break in templated function in templated class.
29 int main() {
30 ContextClass c;
31 TemplatedContextClass<int> t;
32 return c.func() + c.templateFunc(1) + t.func() + t.templateFunc(1);