Розмір відео: 1280 X 720853 X 480640 X 360
Показувати елементи керування програвачем
Автоматичне відтворення
Автоповтор
You are a dark wizard in C++ arts!
Thanks! Hope it was helpful!
Super clear explanation, thanks Zen.
Thanks mate!
In C++ the base optimization struct is known as std::_Compressed_pair
W vid keep up the work
So if you have Alloc as a member of your class it would add 1 byte to your list class ?
Yes, it has to. The standard says you need to be able to take the address of the Alloc object. Thus it needs to occupy space.
It could occupy much more space depending on the other member variables, due to alignment requirements. So it most likely occupies 8 bytes, and less likely 4 or 2 or 1.
You are a dark wizard in C++ arts!
Thanks! Hope it was helpful!
Super clear explanation, thanks Zen.
Thanks mate!
In C++ the base optimization struct is known as std::_Compressed_pair
W vid keep up the work
So if you have Alloc as a member of your class it would add 1 byte to your list class ?
Yes, it has to. The standard says you need to be able to take the address of the Alloc object. Thus it needs to occupy space.
It could occupy much more space depending on the other member variables, due to alignment requirements. So it most likely occupies 8 bytes, and less likely 4 or 2 or 1.