Arthur O'Dwyer personal blog
Escape analysis hates copy elision (2021)
Yesterday Lauri Vasama showed me this awesome Godbolt: struct S { static std::unique_ptr<S> make() noexcept; ~S(); static std::unique_ptr<S> factory() { std::unique_ptr<S> s = S::make(); return M(s); } }; void take_ownership(S*) noexcept; void test() { std::unique_ptr<S> p = S::factory()…
- Points
- 122
- HN comments
- 53
- Submissions
- 1
- Cited by
- 0 commenters
Software EngineeringSystems & Performance2023
On Hacker News
| Submitted | Title on HN | Points | Comments |
|---|---|---|---|
| Oct 14, 2023 | Escape analysis hates copy elision (2021) by pornel | 122 | 53 |