-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract the core engine (and make a paper out of it?) #31
Comments
If we extract the more fundamental building block that creates the layout of the structure, and make that |
This would be a much better low level engine: https://godbolt.org/z/xfzq97nKK
This allocates the memory buffer for multiple arrays, initialize them with various configurations (inspired from The whole structure can be destroyed (in reverse order) by passing in the same tuple of elements. In the
however in the destructor, the structure has to be rebuilt:
|
Another implementation would be https://godbolt.org/z/nsMhd33ox . This seems to generate better code - using try/catch instead of destructors to ensure exception safety. |
The fundamental building blocks of this library can be seen as:
This function would allocate a single block of memory that fits
sizeof...(Ts)
arrays which the sizes are given insizes
. The return value returns pointers to (non-constructed) objects inside this.The second building block would be something like
std::uninitialized_value_construct
which support multiple begin/end iterators.Then it should be very easy to build this library.
The text was updated successfully, but these errors were encountered: