หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
Object allocated on the heap may not be aligned for this type.
Remarks
An over-aligned object allocated by using operator new may not have the specified alignment. Override operator new and operator delete for over-aligned types so that they use the aligned allocation routines—for example, _aligned_malloc and _aligned_free.
Example
The following example generates C4316:
// C4316.cpp
// Test: cl /W3 /c C4316.cpp
__declspec(align(32)) struct S {}; // C4324
int main() {
new S; // C4316
}