Boost logo

Boost :

Subject: Re: [boost] filesystem::remove_all error handling
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-01-20 16:14:42


Zachary Turner wrote:
> Side note, but the implementation of remove_all does not appear to be tail
> recursive either, so even the best compiler will not be able to optimize
> this into a loop, leading to the potential for a stack overflow in deeply
> nested directory hierarchies. (Now that I think about it, I'm not even sure
> what, if any, C++ compilers optimize tail recursive calls).

If a function has any local variables with non-trivial destructors,
it cannot be tail-recursive. Tail recursion is not worth worrying
about in C++.

In Christ,
Steven Watanabe

Boost list run by bdawes at, gregod at, cpdaniel at, john at