The C++ Stories Weekly Newsletter

Join ~11000 developers who read about Modern C++, news reports, tools, and more! A new email every Monday.
Bonuses included! C++23/C++20/C++17 ref cards and more!

The above field is supplemented with consent to receive a newsletter containing information and marketing content about the cppstories.com portal from Bartłomiej Filipek codebf based in Krakow. The consent may be withdrawn at any time. See the full Privacy Policy.


See the latest articles:

Packing bools, Parallel and More

Updated:

Let’s continue with the topic of packing boolean arrays into bits. Last time I’ve shown a basic - single threaded version of this ‘super’ advanced algorithm. By using more independent variables, we could speed things up and go even faster than no packing version! We’ve also used std::vector and std::bitset. Today I’d like to look at making the task parallel.

READ MORE...

Packing Bools, Performance tests

Updated:

Imagine you have an array of booleans (or an array of ‘conditions’), and you want to pack it - so you use only one bit per boolean. How to do it? Let’s do some experiments! Updated: 8th May 2017 Read the second part here and also one update. Motivation   I started writing this post because I came across a similar problem during my work some time ago.

READ MORE...

final_act - follow-up

Updated:

Last time I wrote about final_act utility, and it seems I’ve stepped into a bigger area that I wasn’t aware of. Let’s continue with the topic and try to understand some of the problems that were mentioned in the comments. Intro   Let’s remind what was the case last time:

READ MORE...

Beautiful code: final_act from GSL

Updated:

Sometimes there’s a need to invoke a special action at the end of the scope: it could be a resource releasing code, flag set, code guard, begin/end function calls, etc. Recently, I’ve found a beautiful utility that helps in that cases. Let’s meet gsl::final_act/finally. Intro   Follow-up post here: link.

READ MORE...

C++18, Why not?

Updated:

As you’ve might already notice I’ve made a little joke on Saturday, which was the April Fools’ Day. I got the courage to announce C++18 next year! :) While it was a bit funny, I didn’t expect much traffic (as it was Saturday). Still, my stats shows that a lot of people clicked and viewed the post.

READ MORE...

C++18 Next Year!

Updated:

I have a great news! During the last meeting in Kona, the committee not only made final notes on the C++17 standard! There’s also a groundbreaking news that behind the curtains they planned C++18! Disclaimer/Note: this was just an April Fool’s joke! :). Please read the follow-up here! Intro   As it appears, the C++ Cometee finally understood that C++17 doesn’t contain the features everyone wanted.

READ MORE...

Windows File Tests

Updated:

You want to transform one file into another, input into output. What API will you choose on Windows? WinApi? C++ Streams or good old stdio? Last year in September I looked at four ways of processing a file on Windows. Also, I did some performance tests. The whole project description was recently published in Visual Studio Magazine.

READ MORE...

C++ Jobs and Predictions

Updated:

There are probably billions of lines of code written in C++ already. New code is being written every day. But will this trend continue? Will you be able to find a C++ job in five years? Let’s have a quick view. The Story   This post was motivated by a recent video from J.

READ MORE...

Modernize: Sink Functions

Updated:

One of the guidelines from Modern C++ is to avoid using raw new and delete. Instead, you should use a smart pointer, a container or other RAII object. Today I’d like to focus on so-called ‘sink functions’ that takes ownership of input parameters. How can we modernize code around such calls?

READ MORE...

Const, Move and RVO

Updated:

C++ is a surprising language. Sometimes, simple things are more complex in practice. In my article about “use const all the time”, I argued that in function bodies const should be used most of the time. But two cases were missed: when moving and when returning a value. Let’s revise this topic today.

READ MORE...

C++ Status at the end of 2016

Updated:

Another year and another C++ Status! It’s hard to believe, but it’s my fifth time I am writing this summary. And, as usually, C++ language is very alive. The biggest news for the year? Of course, it must be: the final draft for C++17!. What else have happened? See my full report below.

READ MORE...

2016 Blog Summary

Updated:

Another year of blogging! Was it good or bad? What’s the plan now? What were the most popular posts? First of all, please answer those quick questions: Bartek’s Coding Blog in 2016 The Story   Keeping things short I’d like to point out four major things that happened this year:

READ MORE...