There is an existing question that requires C++03 and has no answer, so I will open a new one.
Problem I have is that I want to have std::vector
of std::byte
, but so that .data()
(first element of data array) is 16 byte aligned.
alignas
on wrapped char does not help because I do not want to have alignment gaps in the array.
In other words I want to keey alignment of 1 for elements, but I want alignment of 16 for the array.
Ideally I would like to avoid using a custom allocator. If there is any TBB or boost vector that does what I want that would be also great.