Skip to content

Commit

Permalink
Update std.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed May 22, 2024
1 parent 58657ad commit 9c48ecc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/cfg/std.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4948,6 +4948,12 @@ void smartPtr_get2(std::vector<std::unique_ptr<int>>& v)
}
}

bool smartPtr_get3(size_t n, size_t i) { // #12748
std::unique_ptr<int[]> buf = std::make_unique<int[]>(n);
const int* p = buf.get() + i;
return p != nullptr;
}

void smartPtr_reset()
{
std::unique_ptr<int> p(new int());
Expand Down

0 comments on commit 9c48ecc

Please sign in to comment.