This week on Monday, I published a new article about lambda expression.
And in the attachment you'll find the PDF version
The article got quite popular and generated a lot of comments at the Reddit r/cpp channel. Have a look and join the discussion:
C++20 Experiments - constexpr Dynamic Memory Allocation
As I mentioned last week today I'm happy to present a new short article on this new C++20 feature. Please have a look at the attached PDF where I explore this topic, play with examples and even forced the compiler to be a simple leak detector.
Let me know if you like the article. Do you plan to use this C++20 feature in your code? Maybe you have some more experience with this? Let's talk on our Discord server.
Some of the cool articles and materials from around the week:
- In less than two hours Dragon 2 will fly to the International Space Station with a crew on board! The official stream is available from SpaceX: https://www.youtube.com/watch?v=rjb9FdVdX5I I wonder how many C++ lines are on board :)
- C++20: The Unspoken Features - Human Readable Magazine - it's a free article that describes some little features form the new Standard.
- Analyzing The Simplest C++ Program - In the article, you'll learn about ELF Format, how it's organized and where do each section of your C++ code end up. The article might be a good refresher on the compilation process.
- Releasing Today! Visual Studio 2019 v16.6 & v16.7 Preview 1 | Visual Studio Blog - Visual Studio Team released a new version of their IDE! The current live version is 16.6 with improved support for new C++20 feature. What's more, you can also try the 16.7 preview with AddressSanitizer for x64 code! (the 32bit version is already present in 16.6).
If time allows I hope to write a new article about lambdas. In the comment section below the article from this week, I got some questions about using lambdas from other threads. So how about writing a blog post that would explore this idea: how to call lambdas and still safely capture variables in a multithreaded environment? We have std::thread, std::async and also parallel algorithms up to C++17.
Additionally, I'm finishing another update for the lambda ebook. This time it's about replacing old functional stuff: bind1st with modern alternatives. And I have two bonus chapters... appendixes: one with the list of techniques used in the book (so it's easier to search), and then maybe it would be nice to convert "top 5 lambda advantages" article and put this at the end of the book.