2012/3/12 avasilev <[email protected]> > Yes, using the placement new operator was my initial idea. But as far as > I investigated this technique, it is not very safe, because of alignment > issues. I am curious about the role of the 'double align' member and the > union. Is this to prevent a zero-sized array in case sizeof(Unlocker) == 0 ? >
If i'm not sorely mistaken, the standard guarantees that sizeof() on a struct will always be at least 1. See: http://stackoverflow.com/questions/3849334/sizeof-empty-structure-is-0-in-c-and-1-in-c-why -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
