Why is `std::pair ` not designed to be trivially copyable? (stackoverflow.com)stack
23 points by xmllmx in stackoverflow.com · 1h ago · stack
It is common to use std::vector<std::pair<int, int>> in most projects. If std::is_trivially_copyable_v<std::pair<int, int>> is true, then most implementations of std::vector can use the fastest std::memcpy to perform element relocations, providing a significant performance benef…