| 1 | int _ID = 0; |
|---|---|
| 2 | |
| 3 | class Foo { |
| 4 | public: |
| 5 | Foo *next; |
| 6 | int ID; |
| 7 | |
| 8 | Foo () : next(0), ID(++_ID) {} |
| 9 | }; |
| 10 | |
| 11 | int evalFoo(Foo& foo) |
| 12 | { |
| 13 | return foo.ID; // Set break point at this line. |
| 14 | } |
| 15 | |
| 16 | int main() { |
| 17 | Foo f; |
| 18 | f.next = &f; |
| 19 | return evalFoo(foo&: f); |
| 20 | } |
| 21 | |
| 22 |
