Тёмный

Lightning Talk: Writing a Better std::move - Jonathan Müller - CppCon 2023 

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

cppcon.org/
---
Lightning Talk: Writing a Better std::move - Jonathan Müller - CppCon 2023
github.com/CppCon/CppCon2023
std::move allows the creation of const rvalue references, which is almost always wrong. It also allows moving out of lvalue references, which can be dangerous since you don't have real ownership over them and a caller might not expect the object to disappear. Let's fix those problems using macros, reflection, and more macros.
---
Jonathan Müller
Jonathan is a library developer at think-cell. In his spare time, he works on various C++ open source libraries for memory allocation, cache-friendly containers, or parsing. He also blogs at foonathan.net and is a member of the C++ standardization committee.
---
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

Наука

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

 

27 июн 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 13   
@skulver
@skulver Месяц назад
I'm not sure if I'm more impressed by the level of knowledge on display or if I'm more horrified by the level of knowledge required to write a move function. Definitely a video that warrants a few watches because there's a lot in there. Well done!
@foonathan
@foonathan Месяц назад
Thanks!
@employeeofthemonth1
@employeeofthemonth1 Месяц назад
Excellent talk this!
@foonathan
@foonathan Месяц назад
Thanks!
@passerby4507
@passerby4507 Месяц назад
Intriguing, but not entirely convinced it's a good idea.
@zbychs
@zbychs Месяц назад
Very interesting, thanks.
@jopa19991
@jopa19991 Месяц назад
really decent talk
@314Labs
@314Labs Месяц назад
The ending 😆.
@RN-rm7gd
@RN-rm7gd Месяц назад
Hmm, i fear it's a dump question. But why do you move in the first place? Or is make_padding designed not to take a reference? Anyways, designing a function in a way of moving around a pointer which than is expected to end up in the original parameter doens't feel right in the first place. Ronald.
@foonathan
@foonathan Месяц назад
It's just a silly example, but the idea was that you want to create a tree of widgets, where the "padding widget" owns the "content widget", hence the move.
@aniketbisht2823
@aniketbisht2823 Месяц назад
How are compile times affected? Especially given the usage of "is_id_expression".
@foonathan
@foonathan Месяц назад
They didn't get noticeable worse. You can also disable the is_id_expression check in most builds for example, as it doesn't affect code generation and is just an extra lint against misuse.
@KX36
@KX36 Месяц назад
don't watch an hour lecture on move semantics, watch this instead!
Далее
LISA - ROCKSTAR (Official Music Video)
02:48
Просмотров 31 млн
Stop Using the Worst Way to Loop Lists in .NET!
9:35
How to write SOLID C++
29:22
Просмотров 38 тыс.
Object Oriented Programming is Good | Prime Reacts
31:30
Naming Things in Code
7:25
Просмотров 2 млн
Why do C Programmers Always Obfuscate Their Code?
2:01:57
Will the battery emit smoke if it rotates rapidly?
0:11
FullHD в 8К БЕЗ ПОТЕРЬ? | РАЗБОР
20:42