C++20 Reference Card
21–30 of 48 posts
Re: C++20 Reference Card
#22Whenever I see new C++ features I'm all the more impressed with how Zig manages to provide capabilities similar to -- and at least as powerful as -- type templates, value templates, constexprs, concepts, and conditional compilation (preprocessor), with a single feature and keyword, without any type/template-level programming, a preprocessor or AST macros (i.e. mini-languages different from the ordinary computation la…
Re: C++20 Reference Card
#23Re: C++20 Reference Card
#24Could someone please explain why you'd put nodiscard on a constructor? I'm a bit confused as to when that's needed.
After not using C++ for 15+ years , looking at it now makes my eyes bleed.
I'm trying to gradually replace C++ with Rust as my primary language, but it's still a lot easier to get a well-paying job in C++ than in Rust.
Re: C++20 Reference Card
#25Re: C++20 Reference Card
#26Re: C++20 Reference Card
#27Whenever I see new C++ features I'm all the more impressed with how Zig manages to provide capabilities similar to -- and at least as powerful as -- type templates, value templates, constexprs, concepts, and conditional compilation (preprocessor), with a single feature and keyword, without any type/template-level programming, a preprocessor or AST macros (i.e. mini-languages different from the ordinary computation la…
Re: C++20 Reference Card
#28Could someone please explain why you'd put nodiscard on a constructor? I'm a bit confused as to when that's needed.
To avoid this insidious bug: std::lock_guard (m); // guard is immediately thrown away versus the correct std::lock_guard g(m); // hold mutex til end of scope
The same way that int (a); and int a; are equivalent.
So the guard should remain until end of scope, but won't guard anything.
Re: C++20 Reference Card
#29Whenever I see new C++ features I'm all the more impressed with how Zig manages to provide capabilities similar to -- and at least as powerful as -- type templates, value templates, constexprs, concepts, and conditional compilation (preprocessor), with a single feature and keyword, without any type/template-level programming, a preprocessor or AST macros (i.e. mini-languages different from the ordinary computation la…
Re: C++20 Reference Card
#30Direct links: C++20 Features https://mcusercontent.com/e93417593cbf4da3dba03d672/files/42... Language Features of C++17 https://gallery.mailchimp.com/e93417593cbf4da3dba03d672/file...