Hi, gurus!
i've come into a bit of a weird situation:
i'm writing template-based generic functions which forward v8::Arguments
args to native functions. i'm adding Unlocker support so clients can say
"it's okay to unlock v8 while this function is running" when they bind the
functions. i've come into a corner case in my design where i literally
cannot scope a return value properly vis-a-vis Unlocker:
T rv
{
Unlocker unl;
rv = theFunction( ... );
}
return rv;
that works for most cases but does not work when T is a reference type (or
otherwise cannot be default-initialized).
i can work around it, but i need to know if this is legal:
Unlocker unl;
T rv( theFunction(...) );
unl.~Unlocker(); // <----- this part
return rv;
i.e. i need to destruct the Unlocker before it goes out of scope.
Is it legal for me to do this or will i somehow hose Unlocker's assumptions?
--
----- stephan beal
http://wanderinghorse.net/home/stephan/
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users