3 ms·
Right. C++ objects are values, not references to values like in almost all other languages. So C++ needs to know the sizes of everything to construct them. If y
by humanrebar 10y ago
Right. C++ objects are values, not references to values like in almost all other languages. So C++ needs to know the sizes of everything to construct them. If you tried to write out the mathematical series describing the ultimate size you would need to allocate for A or B, you would end up with a value approaching infinity.
- TheCoelacanth 10y agoThis is probably my favorite thing about C++. Values are so much easier to reason about than references.