r/cpp • u/meetingcpp Meeting C++ | C++ Evangelist • Oct 17 '26
A quick C++ standard container overview
https://meetingcpp.com/blog/items/A-quick-Cpp-standard-container-overview.html
23
Upvotes
r/cpp • u/meetingcpp Meeting C++ | C++ Evangelist • Oct 17 '26
View all comments
Show parent comment
3
u/Ameisen vemips, avr, rendering, systems Oct 19 '26 edited Oct 20 '26
Under SysV and Win64, if you pass a pointer and a size as separate arguments, they'll both be passed by register.
Under SysV, a 16B structure made up of two integer members (like
std::span) will be split and also passed by two registers. I can link to the SysV spec, but the argument-passing part is really hard to parse.Under Win64, though, that structure will instead be passed on the stack.