forward In C++11

  Рет қаралды 3,014

CppNuts

CppNuts

Күн бұрын

Пікірлер: 16
@13somasanimahesh58
@13somasanimahesh58 3 ай бұрын
Does wrapper function accepts only rvalue? Also what would happen if I don't use forward in the inner function?
@Sam-di4wq
@Sam-di4wq 7 ай бұрын
Man, you have one of the best videos on C++ out there. You make sense and save time. Thank you!
@mehtubbhai9709
@mehtubbhai9709 7 ай бұрын
Wow! You explained std::forward in 2.5 mins and I got it! Thx Rupesh 👍
@rishiniranjan1746
@rishiniranjan1746 5 ай бұрын
Really ?
@mastermax7777
@mastermax7777 25 күн бұрын
What would happen if we took out the forward in this case..?
@05060024
@05060024 25 күн бұрын
Then, whether you call wrapper() with an lvalue like a variable n, or an rvalue like a literal 50, the lvalue version of the inner function will be called in both cases. In the second case, the wrapper function accepts an rvalue reference, but converts it to an lvalue when it calls the inner function.
@deepikapatait6861
@deepikapatait6861 7 ай бұрын
crystal clear explanation and voice too.
@vrishabh07
@vrishabh07 7 ай бұрын
I learned a lot about c++ from your videos. Can you please recommend some good books for design patterns, advanced c++ and other topics ?
@CppNuts
@CppNuts 3 ай бұрын
Never read any book bro, just internet is enough to learn.
@mrinalmadhav8119
@mrinalmadhav8119 5 ай бұрын
Please continue to upload videos
@badassopenpolling
@badassopenpolling 7 ай бұрын
this is usefull. one function catching l value and rvalue
@Souravjaiswl
@Souravjaiswl 7 ай бұрын
I need some help how to install gcc compiler 13.2.0 or gcc 11.0.1 in window 11 or 10 make a video because my gcc 8.0.1 compiler is not working on c++17 or above please sir help me 🙏 . And thanks for this awesome playlist. ❤
@jaedongtang37
@jaedongtang37 6 ай бұрын
Good explanation!
@CppNuts
@CppNuts 3 ай бұрын
Glad it was helpful!
@SaurabhMishra0709
@SaurabhMishra0709 7 ай бұрын
Thanks for uploading this.😊
@aj-uo3uh
@aj-uo3uh 7 ай бұрын
Helpfull
UFC 287 : Перейра VS Адесанья 2
6:02
Setanta Sports UFC
Рет қаралды 486 М.
Жездуха 41-серия
36:26
Million Show
Рет қаралды 5 МЛН
What is oversubscription in multithreading
4:29
CppNuts
Рет қаралды 1,3 М.
How to Return Array Elements with a Function in C++
5:33
C++ Better Explained
Рет қаралды 1 М.
Aggvent Calendar Day 18
3:36
Andy Math
Рет қаралды 13 М.
Why std::vector reserve Is vERY iMPORTANT
6:24
CppNuts
Рет қаралды 571
My Favourite NAS Releases of 2024
14:27
NASCompares
Рет қаралды 10 М.
LeetCode Concurrency Print Zero Odd Even
10:09
CppNuts
Рет қаралды 535