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

Subscribers:
4,430
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-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-10Electronics: How should the USB footprint be placed on the PCB?
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-08Detect a parenthesized macro argument in C
2024-10-08Tex: Big two sided arrow across matrix
2024-10-08Unix: Firefox - How can I change window/site minimum width or disable it to make it flexible?
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-08What is the meaning of "%CPU" when using GNU time command
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/