Modern Template Techniques - Jon Kalb - Meeting C++ 2019

  Рет қаралды 17,391

Meeting Cpp

Meeting Cpp

4 жыл бұрын

Modern Template Techniques - Jon Kalb - Meeting C++ 2019
Slides: meetingcpp.com/mcpp/slides

Пікірлер: 16
@nabeelsherazi8860
@nabeelsherazi8860 2 жыл бұрын
This talk has really underscored for me as a dev coming from C#, just how much C++ developers have to abuse the compiler to get simple compile time introspection. It’s astounding.
@DrewGross
@DrewGross 4 жыл бұрын
You mentioned there are some failure cases for perfect forwarding, but didn't go into detail in this talk because they are obscure. Do you have any suggestions about where I can learn what those corner cases are? I like learning about corner cases.
@WalderFrey
@WalderFrey 4 жыл бұрын
Thanks Jon. Great talk which I think nicely finds that sweet spot on the simple -> advanced spectrum. I'm a bit confused about the use of decltype(auto) rather than just auto as the return type from your TimeCall function. Is the decltype necessary here, and if so, why?
@invexed
@invexed 4 жыл бұрын
decltype(auto) is necessary if the function f might return a reference. It forces the compiler to use decltype type deduction rules instead of auto type deduction rules. If plain auto was used instead and f returns int&, for example, the return type of TimeCall would be deduced to be int (which is not what you want in this case). Generally speaking you should use decltype(auto) return type deduction whenever the value being returned is the result of calling a generic function.
@YourCRTube
@YourCRTube 4 жыл бұрын
52:20 name_that_type, this can be easier - just static_assert(decltype(param)::nope) and you will get an error "the-type-name does not have `nope`".
@antoniocs8873
@antoniocs8873 4 жыл бұрын
Right on the first example of template code you use the keyword class. I understand that using class or typename in that location is (I believe almost) the same, but aren't C++ people pushing for the usage of typename?
@jvsnyc
@jvsnyc 3 жыл бұрын
It used to bother me when it was required to write 'class' when the template in question was mostly using built-in types that were non-class types. So I like saying typename. It makes no difference (here) to the compiler, I just hate typing lies into my source code.
@rich_in_paradise
@rich_in_paradise 4 жыл бұрын
That thing where speakers keep asking the audience questions is absolutely maddening. It adds absolutely nothing to the presentation. It makes most of the audience, who don't want to shout out, uncomfortable. It even more frustrating for people viewing the video after the fact who can't even hear what's being said, all they can hear is the speaker constantly barking out their 'questions'. Just say what you've got to say.
@jonkalb2746
@jonkalb2746 4 жыл бұрын
I think it is great that Meeting C++ is able to make conference videos public (thanks Jens Weller!). It is wonderful that people who weren't able to attend the conference in person are able to get some benefit from a conference that they didn't attend or support financially. But my focus when delivering a conference talk will be the audience in the room that have paid to support the conference and are hearing the talk live. I feel like engaging with the audience makes for a more interesting and compelling experience for that audience. (This is very much the response I get from live-audience members.) Since the audience is not "mic'ed," audience response isn't going to be captured on the recording. This will likely detract from the KZbin experience, but I feel that this is an appropriate and acceptable trade-off for better live-audience engagement. Obviously, some will disagree and I must accept that. Richinparadise, thanks for sharing your thoughts. I hope that you founds some value in the recording even though it was not optimized for your experience.
@rich_in_paradise
@rich_in_paradise 4 жыл бұрын
@@jonkalb2746 For sure you've gotta do what's best for the people attending the talk. But have you ever surveyed they afterwards. I mean all of them, not just the got feedback from the booker, or the people who did interact with you, but all the people who attend the talk? You probably find that out of an audience of 100, only perhaps 5 people will call out? That's how many people want to interact with the speaker. I've been in talks where speakers take this approach and it's cringe-inducing as well as taking up time that would be better spent, you know, actually dispensing knowlege. Anyway, I don't expect you to change your whole speaking approach based on a youtube comment :) But when people take up speaking for the first time, they tend to emulate talks that they've seen. Maybe people seeing this video will read my comment and consider a different approach.
@jonkalb2746
@jonkalb2746 4 жыл бұрын
@@rich_in_paradise We survey all attendees at CppCon about each sessions and this has never come up as a negative, but, to be fair, I've never raised *this particular issue* in the survey. What would I ask? "Do you want the speaker to be less interactive and/or engage less with the live audience?" I agree that only a relatively small number of individuals respond verbally (many more when asked for a show of hands), but I don't think it follows that those that don't respond resent having the opportunity to respond. I think that the majority of those that are not responding are refraining from doing so because others have already said what they are thinking. (Obviously, I could be mistaken in this belief.) I appreciate your concern for having time devoted to dispensing knowledge, but knowledge speakers are aware that measured rates of knowledge retention from lectures is surprisingly and disappointingly small. The challenge for speakers is not dispensing knowledge, it's helping audiences retain it. One tried and true technique for doing this is asking questions. As audience members come up with answers (even when they don't share those answers aloud) they are increasing their understanding and retention of the presented material. This is even true for the video audience that cannot hear the live-audience response. I regret that this technique isn't working for you, but I can't regret using it because it has proven to work for many.
@seditt5146
@seditt5146 3 жыл бұрын
@@rich_in_paradise Many times when someone ask a question or calls out it is something that is on the minds f many not just the one so that fellow that is asking the question is doing a great service for those that are rather shy or do not want to raise their hand in the first place. Idk why people on YT get so butt hurt about audience interactions man. Really this talk is not for us and I came to comment that only to see that Jon himself already had. It is at worse a mild inconvenience for those who are not calling out or watching it on YT and best a huge Win for tons of people in the room who now understand the concept far better than they would had Jon just rambled on for hours or whatever never being really sure if the people understand. You do not know What you have to say if you are not sure if your audience understands wtf you are talking about.
@lenkite
@lenkite 4 жыл бұрын
The first 6 minutes were frustrating. Just show the best way to write a function template: use auto for return type. No need for all the intermediate stuff and questioning the audience, whom we can't hear anyways.
@InteractiveDNA
@InteractiveDNA 4 жыл бұрын
Tarun Ramakrishna This is a prime form for not teaching anything. 99% of people learn 0% this way. Got to modernize the teaching || people will get lost at hello. Good info but Tarun is 110% right.
@seditt5146
@seditt5146 3 жыл бұрын
My god you people on YT are insufferable sometimes. Peterolen said it best. You are lucky, quit whining, seriously. I can not believe the amount of people crying here because the audience wished to ask questions so they understood it better. You know the people who this talk was for. You people should be ashamed of yourselves honestly. This is like someone giving you a present and you yelling at them that it wasnt exactly what you wanted because you wanted them to buy you Supreme Tee shirt or something. SMH.
@privetvastutnestoyalo2339
@privetvastutnestoyalo2339 3 жыл бұрын
No, the first 6 minutes were perfect to illustrate what kind of mess templates really are.
The C++20 Firehose Talk - Fabio Fracassi - Meeting C++ 2019
47:48
CPU design effects -  Jakub Beránek - Meeting C++ 2019
1:04:07
Meeting Cpp
Рет қаралды 11 М.
Khóa ly biệt
01:00
Đào Nguyễn Ánh - Hữu Hưng
Рет қаралды 20 МЛН
OMG🤪 #tiktok #shorts #potapova_blog
00:50
Potapova_blog
Рет қаралды 17 МЛН
Sigma Girl Past #funny #sigma #viral
00:20
CRAZY GREAPA
Рет қаралды 26 МЛН
Combining C++17 Features - Nicolai Josuttis - Meeting C++ 2019
59:19
Understanding Compiler Optimization
1:41:09
NWCPP - Northwest C++ Users Group
Рет қаралды 6 М.
Rust and RAII Memory Management - Computerphile
24:22
Computerphile
Рет қаралды 218 М.
Move Semantics in C++
13:10
The Cherno
Рет қаралды 282 М.
C++20's Coroutines for Beginners - Andreas Fertig - Meeting C++ online
1:26:29
Best mobile of all time💥🗿 [Troll Face]
0:24
Special SHNTY 2.0
Рет қаралды 856 М.
1$ vs 500$ ВИРТУАЛЬНАЯ РЕАЛЬНОСТЬ !
23:20
GoldenBurst
Рет қаралды 1,3 МЛН
SSD с кулером и скоростью 1 ГБ/с
0:47
Rozetked
Рет қаралды 657 М.
Gizli Apple Watch Özelliği😱
0:14
Safak Novruz
Рет қаралды 4,5 МЛН