wrote:
>that was a joke. I have written numerous macros which would easily >resist being ported to Delphi, but I don't really use them in >production code :)
why not? I do it all the time
>Works in C++Builder 2009 onwards (it relies on decltype()).
looks really interesting as I still use bcb2006 and don't know yet what that decltype staff is all about I have to use something like this
#define BEGIN_END_UPDATE(Obj) ScopeGuard ANONYMOUS_VARIABLE(scopeGuard)=MakeBeginEndUpdate((Obj)); (void)(ANONYMOUS_VARIABLE(scopeGuard));
I wonder whether is is possible to implement something similar in newer delphi versions in order to avoid aforementioned ubiquitous nested try/finally boredom?
-- Vladimir Ulchenko aka vavan