If a C++ function returns some heavy object by value should I capture it by const ref or by value?

Subscribers:
4,270
Published on ● Video Link: https://www.youtube.com/watch?v=4Rrof4IDRp4



Duration: 0:00
1 views
0


If a C++ function returns some heavy object by value should I capture it by const ref or by value?
I hope you found a solution that worked for you :)
The Content is licensed under (https://meta.stackexchange.com/help/licensing) CC BY-SA.
Attention! This video does always use the same license as the source!
Thanks to all those great people for their contributions!

(stackoverflow.com/users/853791/bobeff)bobeff
(stackoverflow.com/users/17167312/homer512)Homer512
A special thanks goes out to the (stackoverflow.com/questions/79066249/if-a-c-function-returns-some-heavy-object-by-value-should-i-capture-it-by-cons)Stackexchange community

I wish you all a wonderful day! Stay safe :)
If anything is off, please write me at peter D.O.T schneider A.T ois42.de

c++20 c++




Other Videos By Peter Schneider


2024-10-10Unix: chose files random and put the names into textfiles
2024-10-10Dynamically change a file name when using FFmpeg
2024-10-10Webmasters: How can I calculate the bandwidth I will need for a video-streaming server?
2024-10-10Check if a potentially primitive value has a given property
2024-10-10Unix: Laptop suddenly shuts down when opening or closing lid during sleep
2024-10-10Why would my C++ stdlib's shared_ptr use acq_rel ordering when decrementing the atomic ref count?
2024-10-10Tex: How to exit loop when encounter first integer in string
2024-10-10how to find date of nth occurrence of a particular day of the week (e.g. Sunday) in a particular ...
2024-10-10Is left shifting a long long considered Undefined Behavior in C?
2024-10-10Unix: How to print the processed argument after each command invocation with xargs
2024-10-09If a C++ function returns some heavy object by value should I capture it by const ref or by value?
2024-10-08Mathematica: How to divide a rectangular box into smaller rectangular boxes?
2024-10-08Tex: Big two sided arrow across matrix
2024-10-08Do I need to create a configuration file for router in OpenVPN?
2024-10-08Unix: Get output into journal in a C written service
2024-10-08Tex: How can I insert this symbol resembling a zeta?
2024-10-08how to calculate difference between two duration in excel
2024-10-08Electronics: Why do I need a USB-C controller for PD?
2024-10-08Can't CD into dir - Windows 10
2024-10-08Security: putting database mongod.conf under $HOME/web-server/. instead of /etc/
2024-10-08Softwareengineering: Moving from 3-tier architecture to clean architecture