MSVC C4315 Compiler Error - No Documentation Found

When compiling my application today, I came across this warning (the code, I think, does not matter):

warning C4315: "MyClass": 'this' pointer for member "MyClass :: my_data_" cannot be aligned 8, as expected by the constructor

I can not find the documentation about this warning in the online help, my locally installed or in a search on Google. I found one link on the MS forum:

There is no documentation to warn the C431 compiler 5

But no information about the error itself.

Do you have any information about this error? I'm trying to guess how to fix it.

+5
source share
1

- ( ?), .

, , , MyClass::my_data_ 8 , MyClass.

#pragma pack(some-number), reset #pragma pack().

#pragma pack(show), , .

+3

All Articles