Can Tail Call Optimization and RAII Co-Exist?
Taken at face-value, it would certainly seem like RAII works against TCO. However, remember that there are a number of ways in which the compiler can “get away with it”, so to speak. The first and most obvious case is if the destructor is trivial, meaning that it is the default destructor (compiler-generated) and all … Read more