Scott Meyers Keynote from Meeting C++ 2014 Slides & Description
Tag: effective c++, [vid_tags]
Xem thêm: http://tipthuthuat.cc/category/review
Nguồn: http://tipthuthuat.cc
Random Posts
DDR3 và DDR4 khác gì nhau? – SHTech #4
– Tham khảo các sản phẩm bộ nhớ RAM tại website – Một câu hỏi mình nhận được từ rất…
iPhone 7 Plus: Nên chọn 128gb hay 256GB
Khi chọn mua iPhone 7 Plus các bạn sẽ đứng giữa 3 sự lựa chọn về bộ nhớ trong đó…
7 Game MMORPG Terbaru Terbaik 2021 I MMORPG Android Terbaik
#NakanoGaming #GameAndroidTerbaik #BestAndroidGames 7 Game MMORPG Terbaru Terbaik 2021 I MMORPG Android Terbaik Gabung Grup FB ✔Please Help Me Reach…
[DXRACER-VIETNAM.COM] Những gì có thể làm với ghế DXRacer
Nhà phân phối ghế DXRacer chính hãng tại Việt Nam Website: Fanpage: Tag: dxracer vietnam, dxracer, ghe dxracer, dxracer viet…
HOW TO SET ONE SINGLE NAME ON FACEBOOK | 2020- 2021 ANDROID [ Tutorial ]
Hi guys! 🖤 It’s me your lauve Ang video po na ito ay tutorial kung papano mag set ng one…
Đánh giá Galaxy S4 qua bản thử nghiệm vừa xuất hiện tại Việt Nam | VTC2
Tin được phát sóng trong Bản tin 10 phút Cập nhật – Kênh Công nghệ VTC2 – Đài Truyền hình…
Can't find it in the comments so for everyone interested: the map emplace function has to allocate a map Node which contains a T. It is assumed that "normally" you successfully insert with a call to emplace.
For optimizations Node allocation does 2 things at once: allocate memory for Node and T. As it does the allocation it HAS TO do initialization as well, resulting in a Node which contains a T – both initialized and healthy. After that key comparison and insertion into the container happens as explained in the talk.
Hope this is understandable.
Why an assignment happens as part of what should be in-place construction within existing space in a container is baffling to me. Sounds like a shortcoming of the library implementation to me. Rust can do this no problem. If the target location already has a T, well, destruct T and construct a fresh T in place. Why is this not standard behavior?
As for QWUKs, utterly ridiculous. You can easily use reflection to get around this extra allocation & deallocation for God's sake. The arguments come in in constructor order do they not? Writing the assembly to do this for an object is easier than writing the C++ to orchestrate it for all types, but seriously?
WTF nobody's laughing at the jokes LOL
However, at least they did ask some good questions at the end.
The more I read the standard or look up research such as he's pointing out, the more I stop worrying about writing "proper" C++. Such a thing doesn't exist.
Das ist sehr funny.
From "prefer" to "consider" emplacement instead of insertion, ie from min 1910 to 5445 & 5730
It's a shame the audience only gets about a quarter of his jokes. He's such a unique person in tech, sad to see him retire from C++.
Very useful, Thanks! 🙂
How come VC++ implementation requires so much more commands at times?
while these guys spent 2 hours analyzing all the inane implications of specific c++ standard library API implementations and everything going on under the hood, people were getting actual work done in C.
It's really annoying how low the output volume is. Listening to music before and after can be dangerous, when you forget that you've increased the volume tenfolds only to listen to this video.
Scott was surprisingly pissed about "You should make an item about that." 😉
Isn't Scott wrong about "direct init" and "copy init" in `push_back` and `emplace_back` cases? `push_back` need convert arg to T before calling function that can't use explicit constructors. `emplace_back` send arg to constructor directly that is explicit call with `nullptr`.