Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

unique_pseudofunction: N overloads for the price of 1 - Filipp Gelman - CppCon 2019

Автор: CppCon

Загружено: 2019-10-15

Просмотров: 1728

Описание:

http://CppCon.org
—
Discussion & Comments:   / cpp  
—
Presentation Slides, PDFs, Source Code and other presenter materials are available at: https://github.com/CppCon/CppCon2019
—
This talk will present a class template that behaves almost like `unique_function`, but lacks one of its key restrictions: having just one overload of `operator()`.

`std::function` is an excellent tool for interface design. It encapsulates almost any object that is invocable the right way. `unique_function` is an even better tool. It can encapsulate some types that `std::function` can't - the ones that are move-only. Unfortunately, it is still invocable in just one way. You get one list of argument types and that's what you must pass.

What if the object you want to pass is invocable in more than one way? What if its `operator()` is a template that you will instantiate with N different types? What if it is a variadic template to which you will pass 0-N arguments? What if you use tag dispatch to do N different things?

If you want these things, as well as the type erasure offered by `std::function` and the move-only support offered by `unique_function`, then `unique_pseudofunction` is the class for you.

Follow the path I took towards realizing that `unique_pseudofunction` is the solution to most of my problems. We'll break this down into the following steps:
Building a simple non-generic `unique_function`
Making it generic
Adding a small buffer optimization
Extending it to support more than one overload of `operator()`

We will also look in close detail at several problems solved along the way, and several others that are still unsolved.

This talk involves small amounts of C++17 and large amounts of template metaprogramming, function references, and type erasure.
—
Filipp Gelman
Software Developer, Bloomberg LP
At Bloomberg LP since 2016, Filipp enjoys exploring the obscure, arcane, and esoteric corners of the C++ language. He is known among his coworkers for heavy use of templates, emphasis on compile time computation, and abusing language features for nefarious purposes.

—
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

*-----*
Register Now For CppCon 2022: https://cppcon.org/registration/
*-----*

unique_pseudofunction: N overloads for the price of 1 - Filipp Gelman - CppCon 2019

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

Embrace Modern Technology: Using HTML 5 for GUI in C++ - Borislav Stanimirov - CppCon 2019

Embrace Modern Technology: Using HTML 5 for GUI in C++ - Borislav Stanimirov - CppCon 2019

C++ ♥ Python - Alex Dathskovsky - CppCon 2025

C++ ♥ Python - Alex Dathskovsky - CppCon 2025

Программирование на ассемблере без операционной системы

Программирование на ассемблере без операционной системы

Typst: Современная замена Word и LaTeX, которую ждали 40 лет

Typst: Современная замена Word и LaTeX, которую ждали 40 лет

Синьор 1С: 10 привычек, без которых ты не вырастешь

Синьор 1С: 10 привычек, без которых ты не вырастешь

CppCon 2019

CppCon 2019

Почему любители часто круче «профессионалов»?

Почему любители часто круче «профессионалов»?

Задача из вступительных Стэнфорда

Задача из вступительных Стэнфорда

Cache-Friendly C++ - Jonathan Müller - CppCon 2025

Cache-Friendly C++ - Jonathan Müller - CppCon 2025

Он вам не Диод! Таинственный Диод Ганна.

Он вам не Диод! Таинственный Диод Ганна.

Я удалил ';' из C

Я удалил ';' из C

🔥 DDR5 СВОИМИ РУКАМИ | Выживаем в кризис памяти 2026 года 💪| SODIMM - UDIMM без переходников

🔥 DDR5 СВОИМИ РУКАМИ | Выживаем в кризис памяти 2026 года 💪| SODIMM - UDIMM без переходников

Back To Basics: C++ Strings and Character Sequences - Nicolai Josuttis - CppCon 2025

Back To Basics: C++ Strings and Character Sequences - Nicolai Josuttis - CppCon 2025

Графический API не имеет значения

Графический API не имеет значения

Для Чего РЕАЛЬНО Нужен был ГОРБ Boeing 747?

Для Чего РЕАЛЬНО Нужен был ГОРБ Boeing 747?

Лучшее метро России (и это не Москва)

Лучшее метро России (и это не Москва)

Я в опасности

Я в опасности

C++20: C++ at 40 - Bjarne Stroustrup - CppCon 2019

C++20: C++ at 40 - Bjarne Stroustrup - CppCon 2019

C++26 - What's In It For You? - Marc Gregoire - CppCon 2025

C++26 - What's In It For You? - Marc Gregoire - CppCon 2025

Внезапно миролюбивый Путин снова на связи (English subtitles)

Внезапно миролюбивый Путин снова на связи (English subtitles)

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: infodtube@gmail.com