先日のDirectXのスケルトンのような形から少しずつ手を加え、ひとまず複数のオブジェクトを描画できる状態にもってきました。
ここでオブジェクトごとに行列を持たせるようにクラスのメンバにXMMATRIX型のものを作っていたところ、コンパイル時に「ヒープで割り当てられたオブジェクトが 16 にアラインメントされていない可能性があります」という警告が出るようになりました。
さらに無視して続けていると
「C2338 You've instantiated std::aligned_storage with an extended alignment (in other words, Align > alignof(max_align_t)). Before VS 2017 15.8, the member type would non-conformingly have an alignment of only alignof(max_align_t). VS 2017 15.8 was fixed to handle this correctly, but the fix inherently changes layout and breaks binary compatibility (*only* for uses of aligned_storage with extended alignments). Please define either (1) _ENABLE_EXTENDED_ALIGNED_STORAGE to acknowledge that you understand this message and that you actually want a type with an extended alignment, or (2) _DISABLE_EXTENDED_ALIGNED_STORAGE to silence this message and get the old non-conformant behavior.」という長いエラーが出て実行不能に。
続きを読む 続・DirectX11