34:21 "I'm going to assume some knowledge of lvalues and rvalues... it's been five years, people." This speaks to the ridiculousness of Rvalue References and move operations than anything else.
I don't see what makes rvalue refs ridiculous. People haven't learned it yet because it is a (somewhat) complicated subject and a lot of people think they don't really need to understand it, which is not true since if you're programming in C++ you obviously care about performance which move semantics is all about, as well as allowing flexibility when copy constructors are deleted, for example.
@@IllIlIIllIlIl Value categories aren't ridiculous. What's ridiculous is that said categories have to be defined on a case by case basis, so that either you get some imprecise intuition that's "good enough" for most cases (as the vast majority does), or you memorize all the rules, in which case I would encourage you to stay away from sharp objects because you're utterly mad. Surely this is just the kind of situation that merits the adjective "ridiculous". I'm not saying I have a better solution, but the language really is too complicated for its own good in this area.
1:07 ..wait, that's good, right? We write templates, sometimes for performance reasons. If not much time is spent doing meaningful work, then the this goal has been achieved.
This would be much more interesting if pointer parameters to the function would be type deducted as well. In that case parameter passed can be both const type or const pointer.
Is someone able to explain the is_void to me. I must have missed something because I do not understand how making T void has any bearing on the output here.
Tarun Singh Iterator isn't a recognized type by itself, and there are different kinds of iterators based on type, so if yo wanted to specify a type there (without templates) you would be limiting the function to working on only one kind of interator
Should be in the right (PC) list as recommended videos that people watched after this. Among the first videos. Probably was too recently uploaded for YT to realize that at the time you watched this video.
_Extern_ templates have been implemented correctly by everyone for decades now. This is covered in Part 2 of the talk: ua-cam.com/video/VIz6xBvwYd8/v-deo.htmlm44s But this is not to be confused with "export templates." _Export_ templates were part of the C++98 paper standard, never got implemented, and were removed even from the paper standard in C++11. However, the short answer to Sivabudh's question is "No." I'm surprised that Nicolas said "Yes." Even if "Yes, extern templates" is _technically_ correct (see Part 2), it's not really what people usually mean when they complain about having to put their templates in header files. Extern templates are a niche solution to a niche problem.
The fact that types "overrule" type deduction is something I wish I had learned the first time I heard about templates
Great presentation and content. I am not a C++ programmer by profession. But I learned so much from this. Thanks a lot.
51:30 UPDATE: c++17 standard added class template deduction types. I've checked, it works. Enjoy folks ;)
Great material and brilliant presenter! Really enjoyed the talk.
Oh wow, thank you for fixing the title (bottom right)! Wasn't expecting a reupload and got excited thinking it was part 2. :')
Nice description of why templates are useful. Thanks for the talk.
Worth it for PRETTY_FUNCTION explanation. Neato.
34:21 "I'm going to assume some knowledge of lvalues and rvalues... it's been five years, people." This speaks to the ridiculousness of Rvalue References and move operations than anything else.
I don't see what makes rvalue refs ridiculous. People haven't learned it yet because it is a (somewhat) complicated subject and a lot of people think they don't really need to understand it, which is not true since if you're programming in C++ you obviously care about performance which move semantics is all about, as well as allowing flexibility when copy constructors are deleted, for example.
@@IllIlIIllIlIl Value categories aren't ridiculous. What's ridiculous is that said categories have to be defined on a case by case basis, so that either you get some imprecise intuition that's "good enough" for most cases (as the vast majority does), or you memorize all the rules, in which case I would encourage you to stay away from sharp objects because you're utterly mad. Surely this is just the kind of situation that merits the adjective "ridiculous". I'm not saying I have a better solution, but the language really is too complicated for its own good in this area.
1:07 ..wait, that's good, right?
We write templates, sometimes for performance reasons.
If not much time is spent doing meaningful work, then the this goal has been achieved.
Not only a good content but an excellent presentation too. Thanks!
This would be much more interesting if pointer parameters to the function would be type deducted as well. In that case parameter passed can be both const type or const pointer.
Arthur you are f.... awesome!!!!!
Is someone able to explain the is_void to me. I must have missed something because I do not understand how making T void has any bearing on the output here.
Consider this:
template
bool is_void = std::is_same::value;
int main() {
std::cout
Nice explanation.I have below doubt on iterator Why we need to provide specialization in iterator
template
void process(Iterator begin, Iterator end)
{
for (; itr != end; ++itr) {
process(*itr);
}
}
why i can't write
void process(Iterator begin, Iterator end)
{
for (; itr != end; ++itr) {
process(*itr);
}
}
please explain
Tarun Singh Iterator isn't a recognized type by itself, and there are different kinds of iterators based on type, so if yo wanted to specify a type there (without templates) you would be limiting the function to working on only one kind of interator
awesome talk. and whoever contributes to the subtitle, a great job.
Where can i find the second Part :/?
Should be in the right (PC) list as recommended videos that people watched after this. Among the first videos. Probably was too recently uploaded for YT to realize that at the time you watched this video.
ua-cam.com/video/VIz6xBvwYd8/v-deo.html
Part 2: ua-cam.com/video/VIz6xBvwYd8/v-deo.html
where is part 2?
ua-cam.com/video/VIz6xBvwYd8/v-deo.html
Can we now put template implementations in source as opposed to header files now?
Yes. Look up extern templates.
Are extern templates currently implemented in any compiler correctly?
_Extern_ templates have been implemented correctly by everyone for decades now. This is covered in Part 2 of the talk: ua-cam.com/video/VIz6xBvwYd8/v-deo.htmlm44s
But this is not to be confused with "export templates." _Export_ templates were part of the C++98 paper standard, never got implemented, and were removed even from the paper standard in C++11.
However, the short answer to Sivabudh's question is "No." I'm surprised that Nicolas said "Yes." Even if "Yes, extern templates" is _technically_ correct (see Part 2), it's not really what people usually mean when they complain about having to put their templates in header files. Extern templates are a niche solution to a niche problem.
love the guy
👍🏻👍🏻👍🏻👍🏻👍🏻👍🏻
*That what awesome!!!*