"Use the Force, Luke"... or 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...
View ArticleC++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...
View ArticleActivity 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...
View ArticleFive Awesome C++ Papers for the Prague ISO Meeting and C++20 Status
Continuing the tradition for other ISO C++ Meetings, I prepared a blog post where you’ll learn about:The current status of C++20an overview about the Prague ISO C++ Meeting (10th till 15th February...
View ArticleAn 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...
View ArticleIn-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...
View ArticleConst 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...
View ArticleVector 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...
View ArticleRuntime Polymorphism with std::variant and std::visit
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...
View ArticleHow to Add Notes and Navigation Metadata Directly in Source Code in Visual...
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...
View ArticleNotes on C++ SFINAE, Modern C++ and C++20 Concepts
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!Read more...
View ArticleHow 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...
View ArticleSpaceship Generator for May the 4th in C++ - Enter The Game!
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!Read more...
View ArticleSpaceship Generator for May the 4th in C++ - Results!
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++.Read more...
View Article5 Advantages of C++ Lambda Expressions and How They Make Your Code Better
[](){}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...
View ArticleC++ Lambdas, Threads, std::async and Parallel Algorithms
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...
View ArticleThe C++ Lambda Story Book
Lambda Expressions appeared in C++11, and since then they become one of the most distinguishing features of Modern C++. What’s more, with each revision of the Standard the ISO Committee improved the...
View ArticlePolymorphic Allocators, std::vector Growth and Hacking
The concept of a polymorphic allocator from C++17 is an enhancement to standard allocators from the Standard Library.It’s much easier to use than a regular allocator and allows containers to have the...
View Article5 Curious C++ Lambda Examples: Recursion, constexpr, Containers and More
Please have a look at my quick blog post where I’ll show you a few interesting lambda examples. Do you know how to write a recursive lambda? Store them in a container? Or invoke at compile time?See in...
View ArticleSee My Talk: Empty Base Class Optimisation, [[no_unique_address]] and other...
Last Tuesday, 21th July, I had a pleasure to talk about [[no_unique_address]] on our Cracow C++ User Group online meeting.Here are the slides and additional comments from the presentation.Read more...
View Article