3 ms·
The std::is_trivially_copyable type-trait can be used to determine if a type is trivially copyable. It's been in the standard since C++11. I imagine an implemen
by MaxBarraclough 2y ago
The std::is_trivially_copyable type-trait can be used to determine if a type is trivially copyable. It's been in the standard since C++11. I imagine an implementation of std::vector could make use of it to determine if it's safe to use realloc.
https://en.cppreference.com/w/cpp/types/is_trivially_copyable https://en.cppreference.com/w/cpp/types/is_trivially_copyabl...