The section of code works. But if I instead use the commented out version,
using StorageType = alignas(alignof(T)) char[sizeof(T)];
I get errors.
template <typename T> struct minipool {
union minipool_item {
private:
//using StorageType = alignas(alignof(T)) char[sizeof(T)];
using StorageType = char[sizeof(T)];
// Points to the next freely available item.
minipool_item *next;
// Storage of the item. Note that this is a union
// so it is shared with the pointer "next" above.
StorageType datum;
....
};
};
What is the correct syntax?