-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
badcaseThe defect of the modelThe defect of the model
Description
void foo(std::vector<std::unique_ptr<int>>& cont, std::unique_ptr<int>& p)
{
for (auto& x : cont) {
p = std::move(x);
}
for (auto& x: cont) {
use(x);
}
}
void bar(std::vector<std::unique_ptr<int>>& cont, std::unique_ptr<int>& p)
{
for (size_t i = 0; i < cont.size(); ++i) {
p = std::move(cont[i]);
}
for (auto& x: cont) {
use(x);
}
}Metadata
Metadata
Assignees
Labels
badcaseThe defect of the modelThe defect of the model