Вопросы по теме 'copy-elision'

Как можно вернуть unique_ptr по значению без std::move?
std::unique_ptr<int> ptr() { std::unique_ptr<int> p(new int(3)); return p; // Why doesn't this require explicit move using std::move? } // Why didn't the data pointed to by 'p' is not destroyed here though p is not moved? int...
13642 просмотров
schedule 16.05.2024