Тёмный
No video :(

Cute C++ Tricks, Part 2.5 of N - Code You Should Learn From & Never Write - Daisy Hollman - CppCon22 

CppCon
Подписаться 152 тыс.
Просмотров 17 тыс.
50% 1

Опубликовано:

 

27 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 20   
@Qazqi
@Qazqi Год назад
In my own experience, the one scenario where I've desired to have function template partial specialization was when the template parameter is used only as a template parameter and not as a function parameter. Overloads don't help at all for that, but you can of course work around it via a `wrapper` function parameter where `wrapper` is functionally identical to `std::type_identity`.
@Qazqi
@Qazqi Год назад
The trick to replace a primary template is 100% UB because you can't just put stuff in std willy-nilly, but it's incredible that in practice, you can now bring C++ back to the old JS days of just replacing something you don't like. You can't have constraints on non-template functions (yet? didn't follow whether it was delayed or denied), but that would've gotten us pretty damn close, not that the standard library has much non-template code anyway.
@embeddor3023
@embeddor3023 Год назад
Can we please add the overload set pattern into the standard? It's very useful for variant visitation and it doesn't make any sense to keep writing this manually everytime we need this ...
@Roibarkan
@Roibarkan Год назад
I believe it's discussed in the committee - p1772 (and p0051).
@Bolpat
@Bolpat Год назад
44:00 Note that for user-defined char sequence literals, you also get separator and decimal point characters. For that reason, you cannot simply subtract '0' and add.
@Bolpat
@Bolpat Год назад
10:20 Actually, there’s four ways to express constrained template parameters because you can put a requires clause behind the template parameter list and behind the function parameter list. The second version exists so you can refer to parameters in the constraints (e.g. decltype(param)), but to be honest, I don’t really understand where requires behind the template parameter list really shine.
@Bolpat
@Bolpat Год назад
Hex floating point literals are nuts: static_assert(0xAB.Cp1 == 0x55.Ep2); That is because the exponent is 2-based, not 16-based: static_assert(0xAB.Cp0 == 0xA.BCp4); Can you guess what 0x1.4p3 is?
@JohnWasinger
@JohnWasinger Год назад
Nice plug for Python there. 49:30
@6eeykwr2
@6eeykwr2 Год назад
Great talk as always Daisy
@lukasz2345
@lukasz2345 Год назад
Where I can find that slides?
@Roibarkan
@Roibarkan Год назад
The link is on the bottom left of every slide, ends with cppcon-2022 (sorry for not putting a link, youtube won’t allow it)
@Roibarkan
@Roibarkan Год назад
19:16 “requires expression”, I believe
@WndSks
@WndSks Год назад
Code font is too small as usual on these talks.
@KulaGGin
@KulaGGin Год назад
It's just fine on my monitor. -Get a bigger monitor.- Just kidding. The player should allow zooming in and out. Well, if you really want to, PotPlayer allows to open YT videos and easily zoom in and out, and move the focused part to where you want it.
@PaulMetalhero
@PaulMetalhero Год назад
Why do you write class instead of typename?
@eLBehmo
@eLBehmo Год назад
Slide code / it's shorter
@michaelzomsuv3631
@michaelzomsuv3631 Год назад
Is there an equivalent of this talk but for C?
@AstuteJoe
@AstuteJoe Год назад
Yeaaaaaaaaah, this template stuff also doesn't quite interests me, but something digging deep into pointers, SIMD instructions, memory management, etc... would be awesome! Arena allocators? There's some cool trickery when replacing free and malloc
@__hannibaalbarca__
@__hannibaalbarca__ Год назад
May be my word will be very harmful; i should tell it: These day c++ standard-er need to learn deep concepts of mathematics logics and predicate calculus, topology and algebraic topology; The old way of concept is more better than key word concepts and should be replaced by TheCondition ; Because Concepts should build a fonction or Templates and under the template we write what the conditions should be for the parameter ; the concepts gave a general rule inside class or function {like return type, errors, max_memory or type of execution ……….} . Am y right.
Далее
Кого из блогеров узнали?
00:10
Просмотров 461 тыс.
Музыкальные пародии
00:28
Просмотров 23 тыс.
СМАЗАЛ ДВЕРЬ
00:31
Просмотров 299 тыс.
-memory-safe C++ - Jim Radigan - CppCon 2022
1:05:45
Просмотров 22 тыс.
Let's get comfortable with SFINAE (C++)
35:55
Просмотров 7 тыс.
How principled coders outperform the competition
11:11
Keynote: Optimizing for Change - Ben Deane - CppNorth 2023
1:24:24