Jonathan M Davis: > There are lots of cases where using scope(exit) makes sense, and it's a great > construct. But there are also plenty of cases where using plain old RAII with > a > single declaration is better. It works fine in D as long as the struct in > question doesn't need a default constructor. But if it does, then it becomes > a > problem.
Can't you use a static opCall (also suggested by Jacob Carlborg)? Bye, bearophile