Lancern's Treasure Chest
08:09 · Oct 16, 2023 · Mon
Escape analysis hates copy elision (2021)
https://quuxplusone.github.io/blog/2021/03/07/copy-elision-borks-escape-analysis/
Arthur O’Dwyer
Escape analysis hates copy elision
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*)…
Home
Powered by
BroadcastChannel
&
Sepia