X a(),b(),c(),d();
〜
if(is_true) return;
〜
Y e();
} → if(!is_true)e.~e();→ d.~d();→ c.~c();→ b.~b();→ a.~a();

RAIIは開放の順番は規定されてるの?
それとも順不同?