I wonder what the state of tail call optimization is in mainstream c++ compilers these days.
It's important to remember local objects with destructors will make this impossible, since destructors are run at the end of the function scope and thus after what's seemingly a perfect tail call.