33m : you can do better then emplace_back by using memcpy for trivially copiable types. Also In my measurements checks for capacity in push back don't go away.
Actually no, since any make_array function still has to forward the arguments, whereas std::array has no constructors so they can be constructed in-place
"C" and "C with Classes" are shitty and unsafe. Most of the broken shit in C++ is because of the broken shit in C. Modern C++ & Rust are the future, just let "C" & "C with Classes" die.
@@lincolnsand5127 "Most of the broken shit in C++ is because of the broken shit in C" No. The most shitty thing about C++ is how easily you can make a deep copy of an object accidentally and allocate a new one, and how hard it is to be able to tell when that happens and when it doesn't and you can't really reason about it. That's not a problem that comes from C, you will never accidentally do a deep copy of a string in C. That's a C++ problem.
33m : you can do better then emplace_back by using memcpy for trivially copiable types.
Also In my measurements checks for capacity in push back don't go away.
So basically lack of partial template deduction for classes makes make_array function better than std::array constructor.
Actually no, since any make_array function still has to forward the arguments, whereas std::array has no constructors so they can be constructed in-place
lmao the people in the audience
Sorry guys, i'm going back to C with classes, meaning i'm using C++ with a very very limited amount of ++ extensions.
Yeah, and you'll get yourself into constructor hell. The whole language is broken. I'm so close to just going to C tbh lol.
"C" and "C with Classes" are shitty and unsafe. Most of the broken shit in C++ is because of the broken shit in C. Modern C++ & Rust are the future, just let "C" & "C with Classes" die.
@@lincolnsand5127 "Most of the broken shit in C++ is because of the broken shit in C" No. The most shitty thing about C++ is how easily you can make a deep copy of an object accidentally and allocate a new one, and how hard it is to be able to tell when that happens and when it doesn't and you can't really reason about it. That's not a problem that comes from C, you will never accidentally do a deep copy of a string in C. That's a C++ problem.
Is this the talk that is been referred @5:00? th-cam.com/video/O50qTuM5OT0/w-d-xo.html
16:50 std::size !!!!
Would have preferred examples where initializer lists are broken when used in non-contrived real life code
So vector is not real life code?