Very cool talk. Always good to recapitulate the basics - there are to many things we use without understanding the underlying tech and history. BTW: Where can I get this awesome T-Shirt?
There isn't a foreach construct in C++ that would allow you to loop through a range of data of different data types at runtime. C++ foreach works on only those data types that have implemented the basic input iterator related operators defined by the requirements of input iterators (begin(), end() operator++() and operator*). In the example on slide 31 you just want to print every fn argument on a separate line (where fn argument is of a certain type for which ostream& operator
Interesting talk, though not as 'basic' as I assumed. It would have been helpful if the speech bubbles were removed; the code in the speech bubbles could have been placed side-by-side with the code on the left. For example, at 4:18, the text in the speech bubble could have been replaced with the code on the left but with "T" and "typename" swapped out for "CustomType" and "class". The explanation need not change. 4:16 "...use a better name, like CustomType as shown in the example on the right". 3:37 "...can be replaced by class, as you can see in the example on the right..." Edit: I just noticed the speech bubbles do help as annotations in other slides.
This is why a TypeEval function is screaming to be created. I am 100% certain the std::people can create a better one than I can. Typeid() doesn't actually consider a tuple of string/int/string the same type as a tuple of variant/variant/map as the same types so there is no secure way to funnel them into whatever place or process they need to be. A bool function is totally fine as long as it is general (i.e. one container type instance should match with another, and with its type-name, regardless of their particular flavor of chaos inside). Knowing everything at compile time is neither realistic nor creatively workable. "Strongly typed" needs to not just be a begrudging neurosis or a religious mantra but also lead to supplying the proper tools for the coder to secure this strength on his or her end.
BTW if you stop Putin (i.e. perform a successful coup in Russia) things are guaranteed to take a turn for the worse. If you are as invested in political situation in Russia as I am an expert in templates in C++ (I know that < > now does not always mean "include a library from a standard location of all libraries") maybe you should consider first studying, then preaching?
Great talk. I believe that understanding templates reveals most of the C++ programming language.
Wow the master himself. His book on templates is excellent. Thanks for this video.
Glad to hear that you enjoyed this presentation!
Its amazing how Nico can make extremely complex topics approachable. I bought all his books!
Nico is a great speaker, I've been looking forward to this one!
Hands down the best templates course I've ever had. Thanks!!
Thanks CppCon for uploading videos here. so much appreciate it. Couldn't be more proud of this great community.
You're brilliant! I LOVE your amazing books and you're my role model. Thanks for contributing to the world of C++
This is exactly what I was looking for! Great talk!
Wow, this is trippy. Didn't know this was a thing:
if constexpr (requires {coll.push_back(val);})
A truly insightful talk!
Well done! Engaging throughout.
Fantastic talk, thank you, I'm just starting to learn templates and this helped immensely, many thanks.
That's a pure pleasure to listen to the prelection like this. Thank you!
We need an "if compiles{" expression that takes the first branch if the code in that branch compiles 😅
The much needed. We need better metaprogramming.
Very good! Thank you for the talk!
thank you. even better the second time around! : )
Very cool talk. Always good to recapitulate the basics - there are to many things we use without understanding the underlying tech and history.
BTW: Where can I get this awesome T-Shirt?
35:46 std::complex is only specified for float, double and long double, not for int.
love his tshirt. where can I get one?
Templates are pretty awesome now, as is this talk ;)
Great talks! I love your books! You're absolutely amazing. BTW, I am looking for "Back to Basics 2022" playlist but couldn't find it.
Looks pretty exciting!
Great talk
Excellent talk, thank you.
Great talk man!
Super Sir, impressed :)
Thankyou so much !!
Josuttis, thank you.
nice talk.
i had one query on slide no.31, why recursive call to "if" statement when you know number of var args. why not "range for".
You can't iterate on an argument pack like you would do with a container, because the types of the various elements could be different.
In his specific example you could avoid recursion using a fold expression.
There isn't a foreach construct in C++ that would allow you to loop through a range of data of different data types at runtime. C++ foreach works on only those data types that have implemented the basic input iterator related operators defined by the requirements of input iterators (begin(), end() operator++() and operator*). In the example on slide 31 you just want to print every fn argument on a separate line (where fn argument is of a certain type for which ostream& operator
Good stuff...
Very useful
Interesting talk, though not as 'basic' as I assumed.
It would have been helpful if the speech bubbles were removed; the code in the speech bubbles could have been placed side-by-side with the code on the left. For example, at 4:18, the text in the speech bubble could have been replaced with the code on the left but with "T" and "typename" swapped out for "CustomType" and "class". The explanation need not change.
4:16 "...use a better name, like CustomType as shown in the example on the right".
3:37 "...can be replaced by class, as you can see in the example on the right..."
Edit: I just noticed the speech bubbles do help as annotations in other slides.
This is why a TypeEval function is screaming to be created. I am 100% certain the std::people can create a better one than I can. Typeid() doesn't actually consider a tuple of string/int/string the same type as a tuple of variant/variant/map as the same types so there is no secure way to funnel them into whatever place or process they need to be. A bool function is totally fine as long as it is general (i.e. one container type instance should match with another, and with its type-name, regardless of their particular flavor of chaos inside). Knowing everything at compile time is neither realistic nor creatively workable. "Strongly typed" needs to not just be a begrudging neurosis or a religious mantra but also lead to supplying the proper tools for the coder to secure this strength on his or her end.
C with better structure, which is c++.
pReality = (UnconditionalSurrender *)pVictoryPlan;
I call function templates for 145 000 different types, so I end up with 145 000 functions generated. Wow, really nice feature.
BTW if you stop Putin (i.e. perform a successful coup in Russia) things are guaranteed to take a turn for the worse. If you are as invested in political situation in Russia as I am an expert in templates in C++ (I know that < > now does not always mean "include a library from a standard location of all libraries") maybe you should consider first studying, then preaching?
Keep C++ away from stupid politics
_CppCon_ please keep politic out.
they can't, there is "con" in channel's title. So following the agenda is what they have to do
Just to understand, what are you talking about
@@rahulc480 See top left corner of the slide.