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:

01 June 2020

C++ Lambdas, Threads, std::async and Parallel Algorithms

C++ Lambdas and multithreading, async

In articles about lambda expression (like this one from last week on my page), it’s easy to show examples where the lambda runs on the same thread as the caller. But how about asynchronous cases? What if your lambda is called on a separate thread? What problems you might encounter there.

Read on and let’s explore this topic.

25 May 2020

5 Advantages of C++ Lambda Expressions and How They Make Your Code Better

Lambda Expressions, C++, Advantages

[](){}

The mixture of brackets in the preceding line become one of the most noticeable indications of Modern C++.
Yep.
Lambda Expressions!
It might sound like I’m trying to create a new blog post about something that everyone knows. Is that true? Do you know all the details of this modern C++ technique?

In this article, you’ll learn five advantages of Lambdas. Let’s start.

18 May 2020

Spaceship Generator for May the 4th in C++ - Results!

Spaceship Random Generator, C++

Two weeks ago, I announced a little game on my blog! Today I’d like to present some of the solutions you sent me and discuss a few things from various aspects of Modern C++.

04 May 2020

Spaceship Generator for May the 4th in C++ - Enter The Game!

Spaceship Random Generator, C++

4th May is the Star Wars Day so why not join the celebration and build some space ships? Of course in C++ :)

Read on and see how to join the game and get a chance to win some extras!

27 April 2020

How to Use C++ for Azure Storage

How to Use C++ for Azure Storage

Blob storage is an object storage service you use in Azure. It is designed for storing large volumes of unstructured data, including text, binary data, images, and text. In this service, your data is stored in containerized blobs with a directory-like structure. You can use blob storage to ensure flexible access to storage, high availability, and data consistency. Read on to learn how you can use C++ with Azure storage.

20 April 2020

Notes on C++ SFINAE, Modern C++ and C++20 Concepts

Starting with C++ SFINAE

What is SFINAE? Where can you use this metaprogramming technique? Are there any better alternatives in Modern C++? And how about Concepts from C++20?

Read on to find out!

14 April 2020

How to Add Notes and Navigation Metadata Directly in Source Code in Visual Studio

Visual Assist HashTabs

Comments in code might not only be some text floating around the functions, variables and classes, but they might contain some extra semantic information. With this improvement, you can navigate through projects much faster or even organize your knowledge. In this blog post, I’ll show you two ways on how to add extra metadata to comments in Visual Studio.

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

std::format

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

Indicators

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!

© 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.