问题标签 [empty-class]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
111 浏览

c++ - 为什么c++空类没有字节对齐?

我最近了解到空类的大小是 1 而不是零。为什么它没有字节对齐,在 32 位环境中它的大小应该是 4?下一个对象的地址是什么?