News for hackers. Stuff that matters.
Re:Orthodox C++ by ericbarrett on Sunday December 27, 2020 @07:48PM (#25555647)
You’re right about std::unordered_map but std::vector storage is guaranteed to be continuous[1].

[1] https://en.cppreference.com/w/cpp/container/vector

Re:Orthodox C++ by vladharbuz on Sunday December 27, 2020 @07:50PM (#25555668)
You're right! I realised my mistake and edited my post in the meantime.
Re:Orthodox C++ by ncmncm on Sunday December 27, 2020 @10:52PM (#25556523)
unordered_map is usually fine if you keep the loading below 0.5. It is also fine if you don't care, as for example during program start-up.

BTW, vector is contiguous, not continuous.