
6 Dec
2008
6 Dec
'08
12:12 a.m.
On Fri, Dec 5, 2008 at 4:00 PM, Mathias Gaunard <mathias.gaunard@ens-lyon.org> wrote:
void f() { X a; bool destruct_a = true;
if (something) { g(move(a)); destruct_a = false; } // ...
if (destruct_a) a.~X(); }
Usual const-propagation should be enough to optimize those booleans out when possible.
I don't see how const-propagation is relevant here, but regardless -- const-propagation rarely (if ever) leads to optimization possibilities. Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode