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++17/C++20 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:

Fun with printing tables with std::format and C++20

Updated:

std::format added in C++20 is a powerful helper for various text formatting tasks. In this blog post, we’ll have fun and print some tables with it. You’ll see the “old” C++17 version and compare it against the C++20 style. std::format excercise   As an exercise to learn about std::format, we can try printing some more advanced structures than just “Hello World”.

READ MORE...

std::initializer_list in C++ 2/2 - Caveats and Improvements

Updated:

In this article, you’ll learn why std::initializer_list has a bad reputation in C++. Is passing values using is as efficient as “emplace”, how can we use non-copyable types? You’ll also see how to fix some of the problems. Let’s start with the issues first: 1. Referencing local array   If you recall from the previous article, std::initializer_list expands to some unnamed local array of const objects.

READ MORE...

C++ at the end of 2022

Updated:

I must admit that some previous years for C++ might feel a bit “boring” and “stable”. New features, new standard every three years, meetings, conferences… life as usual (apart from some additional World/Economy/public Health events…). This year seems different as it looks like a “breakpoint” in the history of C++… and who knows where it will lead us.

READ MORE...

See My New Book: C++ Initialization Story

Updated:

I’m happy to announce that my new book on C++ Initialization is published and finished! Have a look at the background story and how to get it. Updates: Go to the latest updates from 23rd Dec here, 30 new pages added! Note: Initially, the book was called “Data Member Initialization in Modern C++”, but in September 2022, I updated it heavily and changed the title.

READ MORE...

Structured bindings in C++17, 5 years later

Updated:

Structured bindings are a C++17 feature that allows you to bind multiple variables to the elements of a structured object, such as a tuple or struct, in a single declaration. This can make your code more concise and easier to read, especially when working with complex data structures. In this blog post, we will look at the basic syntax of this cool feature, its use cases, and even some real-life code examples.

READ MORE...

C++ in 2022 - Survey

Updated:

It’s almost the end of the year! As usual, I started writing my “year” summary that I will publish on the 31st of December. The survey has completed, thank your for 649 votes! Stay tuned for the annual summary article on Dec 31st! Yet, this article won’t be possible without your input!

READ MORE...

Summary of Non-Regular Data Members in C++

Updated:

If you have a class with a regular data member like an integer or string, you’ll get all special member functions out of the box. But how about different types? In this article, we’ll look at other categories of members like unique_ptr, raw pointers, references, or const members. Introduction   In my book on “C++ Initialization” I recently wrote a chapter about so-called non-regular data members.

READ MORE...

Smaller C++20 Features - My Presentation

Updated:

In September and October, I had the pleasure of running two meetings about C++20 features for my local Cracow C++ User Group! Here are the slides and additional comments from the presentation. The Talk   Initially I did one presentation using my article on smaller C++ 20 features (20 Smaller yet Handy C++20 Features - C++ Stories).

READ MORE...