Please turn JavaScript on
header-image

C++ Stories

Subscribe in seconds and receive C++ Stories's news feed updates in your inbox, on your phone or even read them from your own news page here on follow.it.

You can select the updates using tags or topics and you can add as many websites to your feed as you like.

And the service is entirely free!

Follow C++ Stories: C++ Stories

Is this your feed? Claim it!

Publisher:  Unclaimed!
Message frequency:  0.17 / week

Message History

Before C++20, <chrono> gave us a solid foundation for working with clocks, durations, and time points - but it didn’t really know anything about the civil calendar. If you needed to represent “March 15”, check whether a date is valid, compute “the third Monday of November”, or add a few months to a date, you had to rely on custom utilities, std::tm, or exte...

Read full story

In part 1 of this mini-series, we looked at the basics of iterating over a std::tuple using index_sequence and fold expressions. In part 2, we simplified things with std::apply...

Read full story

In the previous article on the tuple iteration, we covered the basics. As a result, we implemented a function template that took a tuple and could nicely print it to the output. There was also a version with operator <<.

Today we can go further and see some other techniques. The first one is with std::apply from C++17, a helper function for tuples. T...

Read full story

Structured binding is a C++17 feature that allows you to bind multiple variables to the elements of a structured object, such as a tuple or struct. This can make your code more concise and easier to read, especially when working with complex data structures. On this blog, we already covered this functionality, but we&rsquo;ll talk about some good C++26 additions and real ...

Read full story

In this blog post, we&rsquo;ll look at static variables defined in a function scope. We&rsquo;ll see how they are implemented and how to use them. What&rsquo;s more, we&rsquo;ll discuss several cases where we can avoid extra thread-safety cost.

Let&rsquo;s start.

Introduction

Read full story