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

Subscribers:
4,110
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: speedtest cli with cron and date
2024-10-10Wordpress: Get Page URl when changing slug and permalink
2024-10-10Gis: Connect shapes into one
2024-10-10Unix: Laptop suddenly shuts down when opening or closing lid during sleep
2024-10-10Electronics: How to make a SR latch that reacts to edges on its inputs?
2024-10-10Electronics: Does a Off-(On)-On switch exist?
2024-10-10Electronics: How should the USB footprint be placed on the PCB?
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-08How to pass JSON using WWW::Mechanize in perl
2024-10-08Do I need to create a configuration file for router in OpenVPN?
2024-10-08how to calculate difference between two duration in excel
2024-10-08npm error: TypeError ERR_INVALID_ARG_TYPE: The "path" argument must be of type string. Received a...
2024-10-08Dba: How to create smallest compressed backup of SQL Server databases intended for deletion?
2024-10-08Softwareengineering: Moving from 3-tier architecture to clean architecture
2024-10-08VS Code 1.94 - Run selection/line in Python terminal very slow
2024-10-08Gis: Configuring XYZ source
2024-10-08Unix: Identify lines with duplicate column 1 entries and swap columns if found