Summary of C++17 features

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.

READ MORE...

Enforcing code contracts with [[nodiscard]]

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.

READ MORE...

Expressive C++ Coding Challenge Results

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!

READ MORE...

The Expressive C++17 Coding Challenge

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.

READ MORE...

C++17 in detail: Summary & Bonus

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 :)

READ MORE...

C++17 in details: Standard Library Utilities

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.

READ MORE...

C++17 in details: Parallel Algorithms

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.

READ MORE...

C++17 in details: Filesystem

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!

READ MORE...

C++17 in details: Code Simplification

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.

READ MORE...

C++17 in details: Attributes

“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?

READ MORE...