The C++23 standard provides several new range adaptors in the ranges library. These include join_with, zip, and zip_transform. In this post, I will briefly show how these should work.
Category: Uncategorized
A custom C++20 range view
Some time ago, I wrote a short post about the C++20 ranges library with examples of how it can simplify our code. Let me take a brief example. Give a sequence of numbers, print the last two even numbers, but in reverse order.
Highlights from Microsoft Build 2020
The Microsoft Build 2020 event happened this week, and, unlike all previous editions, it was a digital event only. Moreover, it was also free, so everybody could attend the 48 hours marathon. Microsoft made a lot of announcements and released various products and services for Windows, Azure, Office, Visual Studio, Edge, and more. In this post, I will summarize the things that I found the most interesting for me.
C++20 designated initializers
The C++20 standard provides new ways to initialize aggregates. These are:
- list initialization with designated initializers, that has the following forms:
T object = { .designator = arg1 , .designator { arg2 } ... }; T object { .designator = arg1 , .designator { arg2 } ... };
- direct initialization, that has the following form:
T object (arg1, arg2, ...);
In this article, we will see how list initialization with designated initializers work.
Slides from recent talks
moneycpp – a C++ library for handling monetary values
I have been working lately on a C++ library for handling monetary values, currencies, rounding and other related features. It is called moneycpp and it’s a C++ 17 header-only, cross-platform library available on GitHub.
The library is intended for being used in a variety of types of application including ERP systems, banking, finance, insurance, games, and others.
The following is a list of its core requirements:
Visual Studio 2017 Releases
Microsoft recently announced that it released version 15.5 of Visual Studio 2017 (and Visual Studio for Mac version 7.3). There are various improvements to performance and diagnostics (such as cutting the solution load times for large C# and VB projects by half), new features for C#, C++, F# development, and others. You can read the…
But why?
Today I wanted to rework an example that I wrote years ago. I was a client-server example using the C++ REST SDK. I haven’t worked with the library for a while, so I needed to install the latest version first. If you go to the C++ REST SDK project page it says you need to…
My book Modern C++ Programming Cookbook has been published
I am pleased to announce that my book on modern C++ programming has been published by PacktPub. The book is called Modern C++ Programming Cookbook and can be ordered at packtpub.com and Amazon. The ISBN of the book is 9781786465184. The complete table of contents is available below. The book is organized in recipes, much…
New standard library features in Visual C++ 2017 RC
The new Visual C++ 2017, currently in release candidate phase, provides a series of updates and fixes to both the C++ compiler and the standard library. A comprehensive list of these improvements is available at What’s New for Visual C++ in Visual Studio 2017 RC. In this article, I want to shortly look at the…