I\'ve been debugging a program for some time, and eventually found the error was due to a reference not being updated as I thought it would be.
Here\'s a example that sh
[too long for a comment:]
If adding
Test& add(int& i, const int toadd) { i += toadd; return *this; }
This call
t.set(i).add(i, 5).print(i);
returns
15
From this I conclude that the culprit is the i + 5 as parameter to print.
i + 5