On 31 January 2012 19:01, Andres Freund <and...@anarazel.de> wrote: >> I suggest that you generalise from the example of PLV8. The basic >> problem is that the effect of longjmp()ing over an area of the stack >> with a C++ non-POD type is undefined. I don't think you can even use >> structs, as they have implicit destructors in C++. > The PODness of a struct depends on its contents.
Right. If I was going to invest much effort in this sort of thing, I might even write a static assertion that verified a given type's POD-ness over time, by declaring it within a union...which would work....unless you were using C++11. Or, just use std::is_pod to build a static assertion. -- Peter Geoghegan http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training and Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers