24 Apr
2014
24 Apr
'14
5:34 p.m.
BTW this is true also of std::aligned_storage which also fails the final assert above. If instead we had:
typedef __declspec(align(8)) struct some_struct_type align_t;
Then the asserts all pass, but now align_t can not be passed through a function call by value. In fact this was a previous bug in the type traits lib: http://article.gmane.org/gmane.comp.lib.boost.devel/173011
So we're basically screwed whatever we do.
*Nod*, I discovered shortly after that std::aligned_storage in VC was similarly affected. Whle I expected __declspec(align(N)) to be at least reliable (after a light test) that also is disappointgly not the case for the reasons you've indicated.
I've just updated the type_traits docs to reflect these issues. Cheers, John.