标签:style 处理程序 incr name locale min soft warning single
C:\Users\Administrator\Desktop\cppsrc>cl -d1reportSingleClassLayoutTeacher virtual.cpp
用于 x86 的 Microsoft (R) C/C++ 优化编译器 18.00.21005.1 版版权所有(C) Microsoft Corporation。 保留所有权利。
virtual.cpp
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xlocale(337) : warning C4530: 使用了 C++ 异常处理程序,但未启用展开语义。请指定 /EHsc
class Teacher size(16):
+---
| +--- (base class People)
0 | | {vfptr}
4 | | m_name
8 | | m_age
| +---
12 | m_salary
+---
Teacher::$vftable@:
| &Teacher_meta
| 0
0 | &Teacher::display
Teacher::display this adjustor: 0
Microsoft (R) Incremental Linker Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
/out:virtual.exe
virtual.obj
C:\Users\Administrator\Desktop\cppsrc>
其中,teacher是virtual.cpp中定义的class。
visual studio cl -d1reportSingleClassLayout查看内存f分布
标签:style 处理程序 incr name locale min soft warning single
原文地址:https://www.cnblogs.com/CodeWorkerLiMing/p/11032442.html