Lightning Talk: Help! My Expression Template Type Names Are Too Long! - Braden Ganetsky CppCon 2023

  Рет қаралды 5,697

CppCon

CppCon

Ай бұрын

cppcon.org/
---
Lightning Talk: Help! My Expression Template Type Names Are Too Long! - Braden Ganetsky - CppCon 2023
github.com/CppCon/CppCon2023
Even the name of this talk is too long! If we're ever working with expression templates, we can easily make type names long enough to slow down compilation time. Suddenly our "zero-overhead" expression templates start giving a large compile time overhead. I'll show off a C++20 trick to fix this problem.
---
Braden Ganetsky
Braden Ganetsky graduated from the University of Manitoba with a degree in mechanical engineering, but soon pivoted to C++. Now he spends his days working on supply chain simulation software, and spends his nights working on parser combinators and getting involved in the C++ community.
---
Videos Filmed & Edited by Bash Films: www.BashFilms.com
KZbin Channel Managed by Digital Medium Ltd: events.digital-medium.co.uk
---
Registration for CppCon: cppcon.org/registration/
#cppcon #cppprogramming #cpp

Пікірлер: 19
@314Labs
@314Labs Ай бұрын
That parsing library is incredible I wanna use it rn
@AnthonyDentinger
@AnthonyDentinger Ай бұрын
This is so stupid. And I love it!
@danielmilyutin9914
@danielmilyutin9914 Ай бұрын
I'd love to know all the tricks about this, too. Crossplatform prefferered.
@guiorgy
@guiorgy Ай бұрын
Interesting find
@sonulohani
@sonulohani Ай бұрын
Nice video
@__kyune__
@__kyune__ Ай бұрын
Template type names are actually weird in C++. I just used std::map but when it hit an error, the compiler also showed me the default typename of that std::map and that took me a couple minutes to figure out what happended 😂
@AlfredoCorrea
@AlfredoCorrea Ай бұрын
Doesn't mputz/mp-units use a trick with the same objective to keep the names of the type quantities short?
@electronpie
@electronpie Ай бұрын
Isn't metaprogramming with concepts and variadic templates instead of SFINAE and traditional templating supposed to fix that issue or at least contribute to doing so?
@B14kh4r4z
@B14kh4r4z Ай бұрын
Why not make a template Add{} and implement operator+ such that the whole sum will result in one Add instantiation? Do I miss a point here?
@sidasdf
@sidasdf Ай бұрын
operator+ is a binary operation.
@brockdaniel8845
@brockdaniel8845 Ай бұрын
why only msvc tho ?🙄
@ABaumstumpf
@ABaumstumpf Ай бұрын
But now the question: why make all that a giant pile of templates?
@aioia3885
@aioia3885 Ай бұрын
I'm not an expert but maybe the Wikipedia article for expression templates can explain that
@LyubomyrSemkiv
@LyubomyrSemkiv Ай бұрын
Because we can 😅
@grisumbras
@grisumbras Ай бұрын
Why make expression templates a bunch of templates? Good question.
@ruadeil_zabelin
@ruadeil_zabelin Ай бұрын
The parsing lib he showed in the beginning was a very good example of why this would happen. I have a similar case for a stream/pipeline library. I can also see this happen with composable allocators as described in andrej alexandrescu's talk about allocators from a couple of years ago.
@ichigonixsun
@ichigonixsun Ай бұрын
Bacause C++ is a steaming pile of hot garbage
@Buy_YouTube_Views_a050
@Buy_YouTube_Views_a050 Ай бұрын
Thumbs up for joy!
it takes two to tango 💃🏻🕺🏻
00:18
Zach King
Рет қаралды 30 МЛН
Play and Pause in Infinite Slider with CSS Only
13:24
Lun Dev
Рет қаралды 196
but what is 'a lifetime?
12:20
leddoo
Рет қаралды 57 М.
I Rewrote This Entire Main File // Code Review
16:08
The Cherno
Рет қаралды 106 М.
how Google writes gorgeous C++
7:40
Low Level Learning
Рет қаралды 760 М.
The Superpower of C++
7:27
code_report
Рет қаралды 34 М.
C++ Weekly - Ep 425 - Using string_view, span, and Pointers Safely!
8:36
C++ Weekly With Jason Turner
Рет қаралды 11 М.
AMD больше не конкурент для Intel
0:57
ITMania - Сборка ПК
Рет қаралды 507 М.
#miniphone
0:18
Miniphone
Рет қаралды 11 МЛН
3D printed Nintendo Switch Game Carousel
0:14
Bambu Lab
Рет қаралды 4,7 МЛН
Обзор игрового компьютера Макса 2в1
23:34