I love the use of C++ Insights, it really helps me understand what templating is doing under the hood without a 5th dimensional brain.
@michaelkotthaus7120
3 жыл бұрын
It's funny to see the German word "seit" instead of "since" on slide 4 at 7:46.
@communistpropagandist4608
4 жыл бұрын
At 30:30 you are just updating the wrong line. The char array declared on line 32 doesn't get it's size used. I think you meant to update the char array declared on line 35.
@abrahamkk2218
2 жыл бұрын
1.5x speed is okay to listen
@jvsnyc
3 жыл бұрын
I got so much out of the first viewing of this video on this topic that often fills people with consternation. ~45:23 on the second viewing, I now get that due to multiple inheritance being allowed in C++, and, in fact, multiple inheritance of class templates, that you could not just simply call Func() there, as it could be ambiguous. Now that didn't happen in this case, so it would again seem like the compiler could see that and not be fussy, but yes, I see that if Bar multiply inherited Foo, that Func() would be ambiguous. What I don't see then is what this-> would buy us in that case. Wouldn't this->Func() still be ambiguous in the case that we had multiply inherited from Foo and Foo in Bar? Maybe what is going on is that in the first pass this makes the compiler happy enough to not complain, and then when it compiles the instantiation this...no, it still seems to me that in the weird case you described of multiple inheritance of Foo in Bar, that this->Func() would still be ambiguous at that point, so I don't see how it would help us. EDIT: on the third listen, it sounds like only Foo::func would help us in the case of multiple inheritance of different Foo specializations.
@max_ishere
3 жыл бұрын
There are template templates? I need to watch every single video in the series.
@Sayuri998
4 жыл бұрын
He says, don't use manual for loops, use range for loops. Sure, I agree, good advice. Then he goes on to use printf instead of cout and doesn't even mention it...
@ВадимКлимов-й1щ
2 жыл бұрын
I watch the video on 1.5x and it is still extremely slow
@hidemytracks
4 жыл бұрын
Thank you for this nice and easy to understand presentation. Just want point out that you have written "void Main" everywhere, i guess it is a typing error.
@poyaochang3122
2 жыл бұрын
It's not. It's just a regular function not THE main function.
@aditya.ishan27
4 жыл бұрын
Thank you so much
@zhaoli2984
2 жыл бұрын
You may want to start watching the video at min 8.
@alles_muss_anders_werden
2 жыл бұрын
I have never heard, that the C++ compiler/linker will accept the "Main()" function as the program entry point. C++ Templates are well known to strongly reduce the speed of program execution.
@SisypheanRoller
2 жыл бұрын
Templates add to compile time overhead, not runtime. If your code is slow, it's probably your design that needs to improve.
@WilhelmDrake
Жыл бұрын
I don't believe that's true at all. Templates are resolved at compile time.
Пікірлер: 16