How do you see the new C++ standard? Is it ok? Great? Meh?
Last week, after a few years of break, I presented my new talk that addressed the above question! It happened at the Cracow C++ Local Group.
Have a look what’s inside this talk.
Intro Listing all of the features from the new standard might sound simple at first glance.
For my article series about C++17 features, I’ve made a separate entry about new attributes. At first sight, I thought that [[nodiscard]] is just another simple and a rarely used thing. But later I thought… hmmm… maybe it might be valuable?
One reason is that [[nodiscard]] might be handy when enforcing code contracts.
Three weeks ago with Jonathan from Fluent C++, we announced a coding challenge: link here.
Let’s meet the winner and discuss some of the best solutions
(Our choice is quite surprising! See why :))
First of all, I’d like to thank you all for the submissions to the challenge. The task was ambitious!
Let’s put C++17 in practice!
One of the good ways to do it is to take part in a coding challenge.
So together with Jonathan Boccara from Fluent C++ we invite you to participate in “The Expressive C++17 coding challenge”.
The Expressive C++17 coding challenge Jonathan made a few contests on his blog (for example this one), and I thought it might be fun to do something similar for C++17.
The last post in the series about C++17 (STL utils) was posted on 4th September. It happened to be just two days before the final C++17 spec was approved! :)
C++17 is formally approved
2017-09-06 by Herb Sutter
herbsutter.com/2017/09/06/c17-is-formally-approved/
In this post, I’d like to make a little summary, and I also have a bonus for you :)
The new C++ standard brings many useful additions to the Standard Library. So far we’ve discussed bigger features like the filesystem or parallel algorithms. Today, I want to focus on smaller, but also handy things.
For example, there are utils for handling type safe unions, replacement of void*, string searchers and much more.
C++17 is on the way, and I’m glad to see more books that stay on the bleeding edge of C++ adaptation. Today I’d like to present a book that focuses on the Standard Library.
Is this another great book?
TL; DR: Yes :) But read more to see why :)
Writing multithreaded code is hard. You want to utilize all of the machine’s processing power, keep code simple and avoid data races at the same time.
Let’s see how C++17 can make writing parallel code a bit easier.
Intro With C++11⁄14 we’ve finally got threading into the standard library. You can now create std::thread and not just depend on third party libraries or a system API.
Although C++ is an old programming language, its Standard Library misses a few basic things. Features that Java or .NET had for years were/are not available in STL. With C++17 there’s a nice improvement: for example, we now have the standard filesystem!
Traversing a path, even recursively is so simple now!
With each C++ standard, we aim for simpler, cleaner and more expressive code. C++17 offers several “big” language features that should make our code nicer. Let’s have a look.
Intro You might say that most of the new language features (not to mention The Standard Library improvements) are there to write simpler/cleaner code.
“C++ Attributes… what?”
There were almost 40% votes like that in my recent Twitter survey. Maybe It would be good to introduce that little-known feature?
There’s even a good occasion, as in C++17 we’ll get even more useful stuff connected with attributes.
Interested?
Intro Have you ever used __declspec, __attribute or #pragma directives in your code?
Is C++ well suited for writing fast small utilities/tools?
Let’s see:
For my recent giveaway I needed a tool that would take an input file - CSV with data and then draw a few winners from all of the entries. To make things more complicated each entry might have a different weight.