How C++17 Benefits from the Boost Libraries

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

READ MORE...

How to Convert Numbers into Text with std::to_char in C++17

In this post, I’ll show you how to use the newest, low-level, conversion routines form C++17. With the new functionality, you can quickly transform numbers into text and have super performance compared to previous techniques. Intro Until C++17, we had several ways of converting numbers into strings: sprintf / snprintf stringstream to_string itoa and 3rd-party libraries like boost - lexical cast And with C++17 we get another option: std::to_chars (along with the corresponding method from_chars) !

READ MORE...

Lazy initialisation in C++ and Multi-threading

In the previous post about lazy initialisation, we showed examples and differences between using raw pointers, unique_ptr and std::optional to store the object and create it later. However, we implemented the samples from the perspective of single-threaded scenarios. In this post, we’ll try to fill the gap and show you how to make your lazy objects available in a multithreading environment.

READ MORE...

Lazy Initialisation in C++

Lazy initialisation is one of those design patterns which is in use in almost all programming languages. Its goal is to move the object’s construction forward in time. It’s especially handy when the creation of the object is expensive, and you want to defer it as late as possible, or even skip entirely.

READ MORE...

IIFE for Complex Initialization

What do you do when the code for a variable initialization is complicated? Do you move it to another method or write inside the current scope? In this blog post, I’d like to present a trick that allows computing a value for a variable, even a const variable, with a compact notation.

READ MORE...

C++ Ecosystem: Compilers, IDEs, Tools, Testing and More

To write a professional C++ application, you not only need a basic text editor and a compiler. You require some more tooling. In this blog post, you’ll see a broad list of tools that make C++ programming possible: compilers, IDEs, debuggers and other. Last Update: 14th October 2019. Note: This is a blog post based on the White Paper created by Embarcadero, see the full paper here: C++ Ecosystem White Paper.

READ MORE...

C++17 In Detail - Print Version!

Last week was an important milestone for my book: it got a print version available at Amazon! In this post, I’ll share some details behind the event and the plans. The Print (on Demand) Since March 2019, I’ve been testing a few platforms that offer print on demand. One book came from Lulu.

READ MORE...