atomgalaxy/liberasure

Questions

DenisYaroshevskiy opened this issue · 2 comments

Hi

This align confused me:

auto align(char* buf_start) -> char* {

I thought that when you do placement new, you should automatically get the aligned address.
And also that aligned_storage should have sufficient size to store anything of that size or less.

Is this to support custom aligned types and arbitrary buffer sizes?
What are you trying to achieve?

Why do you use RTTI instead of strategy pattern?

return x && y && (std::type_index(typeid(*x)) == std::type_index(typeid(*y)));

Remembered about this old post by Sean Parent on the subject: http://stlab.cc/tips/small-object-optimizations.html

It's a tricky exercise in general.