On 31 January 2012 19:01, Andres Freund <andres(at)anarazel(dot)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
In response to
pgsql-hackers by date
|Next:||From: Robert Haas||Date: 2012-01-31 19:47:19|
|Subject: Re: Progress on fast path sorting, btree index creation time|
|Previous:||From: Dean Rasheed||Date: 2012-01-31 19:15:43|
|Subject: Re: Index-only scan performance regression|