I\'m having trouble understand what the purpose of the alignas
and alignof
keywords are, and I\'m not quite sure I fully understand what alignment is.<
Some special types must be aligned at more bytes than usual- for example, matrices must be aligned at 16bytes on x86 for the most efficient copying to the GPU. SSE vector types can behave this way too. As such, if you want to make a container type, then you must know the alignment requirements of the type you're trying to contain or allocate.