alignas specifier vs __attribute__(aligned), c++11
问题 I'm currently in the process of developing an OS kernel in C++11, and I've come across a question, I cannot seem to find the answer to myself. Currently I'm aligning my paging structures, using compiler specific attributes (eg. gcc's __attribute__(aligned) ), however I'm wanting to use the C++11 alignas specifier instead, on Clang++ this is no issue, as it gladly accepts 4096 alignment as parameter to alignas, however G++ does not! So first of all, what's the main difference between the