Special Member Functions in C++ - Kris van Rens - C++ on Sea 2023

  Рет қаралды 6,006

cpponsea

cpponsea

Күн бұрын

Пікірлер: 13
@GeorgeTsiros
@GeorgeTsiros 4 ай бұрын
I like this dude. Soft-spoken, calm, evenly paced.
@VoidloniXaarii
@VoidloniXaarii Жыл бұрын
Thank you for this great talk
@cpponsea
@cpponsea Жыл бұрын
You are so very welcome! Thank you for your comment.
@VoidloniXaarii
@VoidloniXaarii Жыл бұрын
@@cpponsea such an unexpectedly warm response, thank you so much, made my day
@krizzzlybear
@krizzzlybear Жыл бұрын
Thank you very much!
@SamWhitlock
@SamWhitlock Жыл бұрын
49:26 just in case anyone is wondering, this is not UB: C++ member initialization is done based on the order in which they're declared in the class, not the initialization list order. However, this is extremely confusing to not have them line up, so don't do it IRL (lest you confuse colleagues).
@N....
@N.... Жыл бұрын
48:48 it's not clear from your explanation, but initialization order is always the order of the data members in the class definition. The order in each constructor is ignored. So this code is perfectly fine, it's just confusing to read. The only warnings would be a suggestion to re-order the constructor initializer list so it matches the actual behavior, but either way the behavior is the same and, in this case, well-defined.
@krizzzlybear
@krizzzlybear Жыл бұрын
Yes I could have done a better job there. Thanks for the comment and proper explanation!
@Roibarkan
@Roibarkan Жыл бұрын
55:51 the topic of self-move is a little controversial- many experts say it’s OK for self-move to change/clear the object state, and the only requirement is that the object is left in a valid state.
@tal500
@tal500 Жыл бұрын
Notice that in Version 5 on the last minutes, you can leave the same class definition the same and init the Algorithm directly by a Configuration, no need for the user to explicitly constrcut AlgorithmInit from it. Why? Because of C++ can automatically convert Configuration->AlgorithmInit.
@N....
@N.... Жыл бұрын
15:10 on the left, I think b is a function declaration due to most vexing parse, instead you'd have to write auto b = Zaphod();
@krizzzlybear
@krizzzlybear Жыл бұрын
Yes! You're right, I should have seen that one. Thanks for the heads-up!
@volodyanarchist
@volodyanarchist Жыл бұрын
For me the object that was moved from is a no-go for any use. If you use it, you are doing something wrong. To waste time and to try to safeguard against purposefully bad code is useless, that's akin to trying to guard against your object being memcopied with 0 bytes or something like that. Of course, you can do that, but why would you?
Typical C++, but Why? - Björn Fahller - C++ on Sea 2023
50:49
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
Pipeline architectures in C++ - Boguslaw Cyganek - Meeting C++ 2024
1:04:32
Keynote: Advent of Code, Behind the Scenes - Eric Wastl
46:01
Cursed C++ Casts
17:41
Logan Smith
Рет қаралды 77 М.
The Return of Procedural Programming - Richard Feldman
52:53
ChariotSolutions
Рет қаралды 62 М.
New Algorithms in C++23 - Conor Hoekstra - C++ on Sea 2023
1:25:20