We have already hacked IsTriviallyCopyable to always return 1 on Visual Studio because it otherwise would fail for volatile types (starting with Visual Studio 2015). IsTriviallyCopyable might start failing for volatile types on other compilers too in the future, so we need some sort of fix, ideally removing usages of volatile.

History

Subject changed from Dolphin expects IsTriviallyCopiable to be true for volatile types to IsTriviallyCopyable is stubbed out when using Visual Studio

The part about failing on other compilers in the future might not be true - I didn't notice that we were using std::remove_volatile. (It seems like VS doesn't handle std::remove_volatile the way we want for structs that have volatile members, unlike other compilers, since SCPFifoStruct currently trips our static assert if you try to make VS use the std::is_trivially_copyable path in ChunkFile.h.)

The usage of std::remove_volatile is also incorrect in this context conceptually. Volatile types are inherently non-trivially copyable, so this macro allows breaking that which can lead to potentially invoking undefined behavior (for example, passing a volatile qualified type to std::memcpy is breaking the precondition that the input and output objects be trivially copyable).