Тёмный

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

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

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
RU-vid Channel Managed by Digital Medium Ltd: events.digital-medium.co.uk
---
Registration for CppCon: cppcon.org/registration/
#cppcon #cppprogramming #cpp

Наука

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

 

14 апр 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 20   
@AnthonyDentinger
@AnthonyDentinger 2 месяца назад
This is so stupid. And I love it!
@314Labs
@314Labs 2 месяца назад
That parsing library is incredible I wanna use it rn
@guiorgy
@guiorgy 2 месяца назад
Interesting find
@sonulohani
@sonulohani 2 месяца назад
Nice video
@danielmilyutin9914
@danielmilyutin9914 2 месяца назад
I'd love to know all the tricks about this, too. Crossplatform prefferered.
@__kyune__
@__kyune__ 2 месяца назад
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 😂
@B14kh4r4z
@B14kh4r4z 2 месяца назад
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 2 месяца назад
operator+ is a binary operation.
@electronpie
@electronpie 2 месяца назад
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?
@AlfredoCorrea
@AlfredoCorrea 2 месяца назад
Doesn't mputz/mp-units use a trick with the same objective to keep the names of the type quantities short?
@brockdaniel8845
@brockdaniel8845 2 месяца назад
why only msvc tho ?🙄
@literallynull
@literallynull 11 дней назад
that's how the MSVC mangling works. And mangling is the part of the ABI. GCC/Clang use industry standard Itanium ABI
@ABaumstumpf
@ABaumstumpf 2 месяца назад
But now the question: why make all that a giant pile of templates?
@aioia3885
@aioia3885 2 месяца назад
I'm not an expert but maybe the Wikipedia article for expression templates can explain that
@LyubomyrSemkiv
@LyubomyrSemkiv 2 месяца назад
Because we can 😅
@grisumbras
@grisumbras 2 месяца назад
Why make expression templates a bunch of templates? Good question.
@ruadeil_zabelin
@ruadeil_zabelin 2 месяца назад
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 2 месяца назад
Bacause C++ is a steaming pile of hot garbage
@Buy_YouTube_Views_a050
@Buy_YouTube_Views_a050 2 месяца назад
Thumbs up for joy!
Далее
Naming Things in Code
7:25
Просмотров 2 млн
how Google writes gorgeous C++
7:40
Просмотров 796 тыс.
All Rust string types explained
22:13
Просмотров 151 тыс.
5 Good Python Habits
17:35
Просмотров 398 тыс.
Programming Languages I used at Google (C++ rant)
6:14
Это спасёт камеру iPhone
0:32
Просмотров 69 тыс.
FullHD в 8К БЕЗ ПОТЕРЬ? | РАЗБОР
20:42