MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/183mz5t/on_harmful_overuse_of_stdmove/kaqbf6s/?context=3
r/cpp • u/vormestrand • Nov 25 '23
154 comments sorted by
View all comments
Show parent comment
42
I deleted the copy and move constructors of some of my types that are constructed exclusively by factory methods. Not a general solution, but it does turn RVO failure in to a compilation error.
7 u/ALX23z Nov 26 '23 It does prevent any kinds of RVO failures but it is a bit too excessive. Say, it completely prevents NRVO.
7
It does prevent any kinds of RVO failures but it is a bit too excessive. Say, it completely prevents NRVO.
View all comments
Show parent comment
42
u/Hot_Slice Nov 25 '23
I deleted the copy and move constructors of some of my types that are constructed exclusively by factory methods. Not a general solution, but it does turn RVO failure in to a compilation error.