CppCon 2016: Arthur O'Dwyer “Template Normal Programming (part 1 of 2)”

  Рет қаралды 65,980

CppCon

CppCon

Күн бұрын

Пікірлер: 33
@leocelente
@leocelente 3 жыл бұрын
The fact that types "overrule" type deduction is something I wish I had learned the first time I heard about templates
@JobinAugustine
@JobinAugustine Жыл бұрын
Great presentation and content. I am not a C++ programmer by profession. But I learned so much from this. Thanks a lot.
@lisekSL
@lisekSL 2 жыл бұрын
51:30 UPDATE: c++17 standard added class template deduction types. I've checked, it works. Enjoy folks ;)
@RedRumIzzy
@RedRumIzzy 8 жыл бұрын
Great material and brilliant presenter! Really enjoyed the talk.
@Knuckler
@Knuckler 6 жыл бұрын
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.
@IllIlIIllIlIl
@IllIlIIllIlIl 6 жыл бұрын
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.
@isodoubIet
@isodoubIet 5 жыл бұрын
@@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.
@YuTe3712
@YuTe3712 8 жыл бұрын
Oh wow, thank you for fixing the title (bottom right)! Wasn't expecting a reupload and got excited thinking it was part 2. :')
@IllumTheMessage
@IllumTheMessage 8 жыл бұрын
Nice description of why templates are useful. Thanks for the talk.
@AtomkeySinclair
@AtomkeySinclair 3 жыл бұрын
Worth it for PRETTY_FUNCTION explanation. Neato.
@playerguy2
@playerguy2 3 жыл бұрын
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.
@dans.5418
@dans.5418 6 жыл бұрын
Not only a good content but an excellent presentation too. Thanks!
@wpavada3247
@wpavada3247 8 жыл бұрын
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.
@DevinSamarin
@DevinSamarin 7 жыл бұрын
Part 2: kzbin.info/www/bejne/jHrdZ6t4q9yMmpo
@seditt5146
@seditt5146 5 жыл бұрын
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.
@ricardorey2714
@ricardorey2714 5 жыл бұрын
Consider this: template bool is_void = std::is_same::value; int main() { std::cout
@YasasCPerera
@YasasCPerera 5 жыл бұрын
awesome talk. and whoever contributes to the subtitle, a great job.
@Slicc12345
@Slicc12345 8 жыл бұрын
Where can i find the second Part :/?
@dresnyd
@dresnyd 7 жыл бұрын
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.
@andersknatten
@andersknatten 6 жыл бұрын
kzbin.info/www/bejne/jHrdZ6t4q9yMmpo
@allopeth
@allopeth 5 жыл бұрын
Arthur you are f.... awesome!!!!!
@TarunSingh-je9my
@TarunSingh-je9my 5 жыл бұрын
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
@yotty97
@yotty97 5 жыл бұрын
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
@victornoagbodji
@victornoagbodji 8 жыл бұрын
where is part 2?
@andersknatten
@andersknatten 6 жыл бұрын
kzbin.info/www/bejne/jHrdZ6t4q9yMmpo
@sivabudh
@sivabudh 8 жыл бұрын
Can we now put template implementations in source as opposed to header files now?
@nlguillemot
@nlguillemot 8 жыл бұрын
Yes. Look up extern templates.
@llothar68
@llothar68 7 жыл бұрын
Are extern templates currently implemented in any compiler correctly?
@Quuxplusone
@Quuxplusone 6 жыл бұрын
_Extern_ templates have been implemented correctly by everyone for decades now. This is covered in Part 2 of the talk: kzbin.info/www/bejne/jHrdZ6t4q9yMmpom44s 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.
@che8488
@che8488 7 жыл бұрын
👍🏻👍🏻👍🏻👍🏻👍🏻👍🏻
@notalexmarin
@notalexmarin 6 жыл бұрын
love the guy
@michaelkohlhaas4427
@michaelkohlhaas4427 6 жыл бұрын
*That what awesome!!!*
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 958 М.
Herb Sutter - Peering forward  C++’s next decade
59:59
code::dive conference
Рет қаралды 3,3 М.
They Made a Sequel to C
1:53:24
Tsoding Daily
Рет қаралды 107 М.
Why Can't We Make Simple Software? - Peter van Hardenberg
41:34
Handmade Cities
Рет қаралды 161 М.
Introduction to C++ Template Metaprogramming - Sasha Goldshtein
56:32
NDC Conferences
Рет қаралды 17 М.
All the Safeties: Safety in C++ - Sean Parent - CppNow 2023
1:28:03
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН