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

  Рет қаралды 8,564

CppCon

CppCon

Күн бұрын

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

Пікірлер: 13
@skulver
@skulver 15 күн бұрын
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 8 күн бұрын
Thanks!
@employeeofthemonth1
@employeeofthemonth1 16 күн бұрын
Excellent talk this!
@foonathan
@foonathan 8 күн бұрын
Thanks!
@zbychs
@zbychs 16 күн бұрын
Very interesting, thanks.
@passerby4507
@passerby4507 16 күн бұрын
Intriguing, but not entirely convinced it's a good idea.
@jopa19991
@jopa19991 16 күн бұрын
really decent talk
@314Labs
@314Labs 16 күн бұрын
The ending 😆.
@RN-rm7gd
@RN-rm7gd 14 күн бұрын
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 8 күн бұрын
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 16 күн бұрын
How are compile times affected? Especially given the usage of "is_id_expression".
@foonathan
@foonathan 8 күн бұрын
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 16 күн бұрын
don't watch an hour lecture on move semantics, watch this instead!
ISSEI funny story😂😂😂Strange World | Magic Lips💋
00:36
ISSEI / いっせい
Рет қаралды 138 МЛН
格斗裁判暴力执法!#fighting #shorts
00:15
武林之巅
Рет қаралды 43 МЛН
Kitten has a slime in her diaper?! 🙀 #cat #kitten #cute
00:28
Surprise Gifts #couplegoals
00:21
Jay & Sharon
Рет қаралды 32 МЛН
i cant stop thinking about this exploit
8:40
Low Level Learning
Рет қаралды 277 М.
Let's get comfortable with SFINAE (C++)
35:55
platis.solutions
Рет қаралды 2,8 М.
Delivering Safe C++ - Bjarne Stroustrup - CppCon 2023
1:29:16
Understanding B-Trees: The Data Structure Behind Modern Databases
12:39
Why Does Diffusion Work Better than Auto-Regression?
20:18
Algorithmic Simplicity
Рет қаралды 26 М.
Procedurally Generating Icons for my Farming Game
18:50
ThinMatrix
Рет қаралды 101 М.
APPLE УБИЛА ЕГО - iMac 27 5K
19:34
ЗЕ МАККЕРС
Рет қаралды 99 М.
Creepy Samsung Alarm cannot be turned off 😱🤣 #shorts
0:14
Adani Family
Рет қаралды 1,7 МЛН
Купите ЭТОТ БЮДЖЕТНИК вместо флагманов от Samsung, Xiaomi и Apple!
13:03
Thebox - о технике и гаджетах
Рет қаралды 72 М.
Добавления ключа в домофон ДомРу
0:18