(e-mail address removed)
__finally just isn't needed in C++ (that is if it means what I believe
it does)
It makes life a bit easier.
I make a workaround to simulate it, creating class cMustCall, that basicly
works like:
cMustCall::~cMustCall() { (*mPtr)(); }
and using ls like:
MustCall( TurnOffVideoMode() );
try { ... }
// __finally { TurnOffVideoMode();
but I need to declare a funciton for that, and unfortunetely C++ doesnt
support declaring "in-place" funcitions.. btw, perhaps it will someday?
Like
void DrawLine() {
// ...
{
void Help(int a) { ... }; // My small temporary/helper function
for (...) Help();
}
{
void Help(int a) { ... }; // My small temporary/helper function
for (...) Help();
}
}
?
And going back to cMustCall, btw, what would be declaration of a template
that can hold a pointer to any function, not just to void(); function?