MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/sffyr6/discount_constructor/hurgf0l/
r/badcode • u/catithebathtub • Jan 29 '22
30 comments sorted by
View all comments
Show parent comment
4
Nope, this returns by value and in fact will use copy elision: the return value will be constructed directly in the storage at the calling site
1 u/Flatscreens Jan 29 '22 Thanks my C is clearly very rusty
1
Thanks my C is clearly very rusty
View all comments
Show parent comment
4
u/zed_three Jan 29 '22
Nope, this returns by value and in fact will use copy elision: the return value will be constructed directly in the storage at the calling site