Hacker News Comments on
CppCon 2017: Louis Brandy “Curiously Recurring C++ Bugs at Facebook”
CppCon
·
Youtube
·
26
HN points
·
4
HN comments
HN Theater has aggregated all Hacker News stories and comments that mention CppCon's video "CppCon 2017: Louis Brandy “Curiously Recurring C++ Bugs at Facebook”".
Youtube Summary
HN Theater Rankings
- This course is unranked · view top recommended courses
Hacker News Stories and Comments
All the comments and stories posted to Hacker News that reference this video.
⬐
Sep 22, 2022
·
maxbond on
Lockfree Algorithms (2010)
Related talk from cppcon: https://youtu.be/lkgszkPnV8g
⬐
Jun 23, 2021
·
slavik81 on
My favourite C++ footgun
I'm a big fan of Scott Meyer's Effective C++. It's a little dated now, but it was the most valuable book I'd ever read on the language.Louis Brandy's Curiously Recurring Bugs at Facebook presentation from CppCon17 has somewhat of the same feeling, though it only covers a few bugs: https://youtu.be/lkgszkPnV8g
⬐
Jan 29, 2020
·
wyldfire on
C++20 Reference Card
No. Sorry for being unclear. [1] is a great video that covers a lot of good stuff in particular this usability bug. It's worth watching in its entirety.If you don't want to sit through the video, here's the broken code in question:
"unique_lock<mutex>(m_mutex);" has no effect, but you might mistakenly think that this will block on m_mutex. Labeling unique_lock's constructor as [[nodiscard]] would force you to think twice. See [2] for more details.void Obj::update() noexcept { unique_lock<mutex>(m_mutex); do_the_mutation(); }
[1] https://youtu.be/lkgszkPnV8g?t=1767
[2] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p177...
⬐ mehrdadnAhh, that makes sense! On my phone at the moment but will check out the video too, thanks!
⬐
Aug 17, 2019
·
rebotfc on
Async-std: an async port of the Rust standard library
It can be as fast as C++ whilst at the same time suffering from none of these bugs:
⬐
⬐ lainga#6 really got me (won't spoil it for anyone, but): is this the same reason arr[n] and [arr]n are the same in C? The {square,curly} braces are just sugar?⬐ caraffleI don't think it's the same. arr[n] and [arr]n works because brackets simply expand to * (arr + n) in the first case, * (n + arr) in the second.C++ dictates if a statement can be interpreted as a declaration, it will be (see "The most vexing parse"). Universal initialization was introduced to provide another way to ensure this doesn't happen.
https://softwareengineering.stackexchange.com/questions/1336...