C++17 In Detail

Hi there!

My name is Bartek, I'm a programmer from Cracow/Poland. This is my blog about C++ and native coding.

Quick jump links:

06 April 2020

Runtime Polymorphism with std::variant and std::visit

std::variant and std::visit polymorphism

Runtime polymorphism usually connects with v-tables and virtual functions. However, in this blog post, I’ll show you a modern C++ technique that leverages std::variant and std::visit. This C++17 technique might not only offer better performance and value semantics, but also interesting design patterns.

23 March 2020

Vector of Objects vs Vector of Pointers And Memory Access Patterns

Memory access patterns are one of the key factors for writing efficient code that runs over large data sets. In this blog post, you’ll see why there might be a perf difference of almost 2.5x (in both directions!) when working with a vector of pointers versus a vector of value types.

Let’s jump in.

09 March 2020

Const collection of unique_ptr, options and design choices

Today I have one use case for you: how to declare a const collection of unique pointers of polymorphic types? Can we use std::vector? or maybe std::array? What are the options here? What if we’d like to have such collection as a class member? Have a look in the article.

02 March 2020

In-class Member Initialisation: From C++11 to C++20

With modern C++ and with each revision of the standard we get more comfortable way to initialise fields of a class: both static and non-static: there’s non-static data member initialisation (from C++11) and also inline variables (for static members since C++17).

In this blog post, you’ll learn how to use the syntax and how it changed over the years from C++11, through C++14, C++17 until C++20.

17 February 2020

An Extraterrestrial Guide to C++20 Text Formatting


In C++20, we have a new and cool way to do text formatting. It’s more like Python style and combines C-Style printf and with modern C++ type-safety. In this guest post written by the author of the proposal - Victor Zverovich - you’ll learn how to use this new technique!

10 February 2020

Five Awesome C++ Papers for the Prague ISO Meeting and C++20 Status

Prague 2020 ISO C++ Meeting

Continuing the tradition for other ISO C++ Meetings, I prepared a blog post where you’ll learn about:

  • The current status of C++20
  • an overview about the Prague ISO C++ Meeting (10th till 15th February 2020)
  • a few interesting papers that are worth reading

Let’s start!

03 February 2020

Activity Indicators - Example of a Modern C++ Library


In this blog post, we’ll show you how to write a library that displays a task activity indication for multithreading applications. Have a look at several essential Modern C++ techniques and how to combine them to write good code.

Let’s dive in!

27 January 2020

C++20 Reference Card

While the C++20 Standard is still being finalised and polished, we know all of its core features. At first, the new specification of the language might sound complex and overwhelming. That’s why, if you want to have an overview of the core elements and get the bigger picture, you can have a look at my new reference card.

20 January 2020

"Use the Force, Luke"... or Modern C++ Tools

Use Modern C++ Tools

In this blog post, I’d like to show you how I could quickly improve my old project with Modern C++. Thanks to using the newest compilers and free code analysis checkers you can cover and modernise a lot of code.

13 January 2020

2 Lines Of Code and 3 C++17 Features - The overload Pattern

the overload patter C++17

While I was doing research for my book and blog posts about C++17 several times I stumbled upon this pattern for visitation of std::variant:

template<class... Ts> struct overload : Ts... { using Ts::operator()...; };
template<class... Ts> overload(Ts...) -> overload<Ts...>;

With the above pattern, you can provide separate lambdas “in-place” for visitation.

It’s just two lines of compact C++ code, but it packs a few interesting concepts.

Let’s see how this thing works and go through the three new C++17 features that make this patter possible.

06 January 2020

A Gentle Intro to Developing C++ Apps for AWS and S3

A Gentle Intro to Developing C++ Apps for AWS and S3

Amazon Web Services (AWS) provide multiple tools for developing a native cloud application. In particular, the Software Development Kit (SDK) for C++ programming language enables developers to build powerful and efficient AWS applications for any platform. This includes Android, iOS, Linux and Windows apps.

This article introduces the basic concepts of C++ app development for AWS and S3, including real code examples.

31 December 2019

C++ at the end of 2019

C++ at the end of 2019

2019 is almost over. Let’s reflect on how C++ changed during this time! What were some significant events, how the Standard progressed, how tools changed and many more.

Let’s have a look!

23 December 2019

C++ at the End of 2019, Survey

It’s almost the end of the year!

I prepared a quick survey, so we can learn about our experience with the language.

16 December 2019

How C++17 Benefits from the Boost Libraries

Boost, C++17

In today’s article, I’ll show you battle-tested features from the well-known Boost libraries that were adapted into C++17.

With the growing number of elements in the Standard Library, supported by experience from Boost you can write even more fluent C++ code.

Read on and learn about the cool things in C++.

© 2017, Bartlomiej Filipek, Blogger platform
Disclaimer: Any opinions expressed herein are in no way representative of those of my employers. All data and information provided on this site is for informational purposes only. I try to write complete and accurate articles, but the web-site will not be liable for any errors, omissions, or delays in this information or any losses, injuries, or damages arising from its display or use.
This site contains ads or referral links, which provide me with a commission. Thank you for your understanding.