How could Reflection be applied to Modern C++?
Reflection is commonplace in other contemporary programming languages, but support for it in C++ is virtually non-existent. In this article we’re going to summarize what reflection is and how existing...
View ArticleMaking algorithms faster
It is possible to write poor-quality code in any programming language, and this often stems from sub-optimal algorithms being used. Most of the execution time in modern software is spent in loops, so...
View ArticleWhen to use std::string_view
C++17 brought us the class std::string_view in the standard library, which was touted as a lightweight, non-owning string-like entity which could be passed cheaply as a function parameter. In this...
View ArticleC++ Concurrency 101
Utilizing the potential of multi-core CPUs as found in virtually all modern hardware can only be achieved by writing multi-threaded programs. Code which is multi-threaded allows multiple threads to run...
View ArticleAdditional Unicode support in C++
Unicode is so prevalent these days that it is difficult to imagine any modern programming language not supporting it. C++ has made a number of attempts to provide language and library support for...
View ArticleOperator Overloading in Modern C++ (1)
OO (or OOP) has previously been commonly used to mean “Object-Oriented (Programming)”, but there is another use of the acronym OO which is: “Operator Overloading”. Simply put this involves creating...
View ArticleOperator Overloading in Modern C++ (2)
Having looked at how to create a class representing a three-dimensional vector in the previous article, we’re going to look at how to add more operator-related functionality to it. We’ll start off with...
View ArticleOperator Overloading in Modern C++ (3)
Having looked at how to overload common math operators in previous articles, in this article we’re going to look at how to overload some “special” operators (unary * and ->) as well as increment and...
View ArticleMove Semantics in Modern C++ (1)
The title for this mini-series may seem to be ambitious for two reasons: move semantics have been available for a long time (since C++11 in fact, so not very “Modern”), and it is a large subject (there...
View ArticleMove Semantics in Modern C++ (2)
Now that we’ve looked at how std::move() can be applied to Standard Library types, such as std::string, in this article we’re going to look at creating our own “move-aware” type. We want it to have at...
View ArticleMove Semantics in Modern C++ (3)
In the previous two articles we looked at how to transfer “move-aware” objects, such as std::string, between variables, and also how to create a Movable class which logs all copy and move operations...
View ArticleMove Semantics in Modern C++ (4)
In previous articles we’ve discussed how to make objects “move-aware” so that moves are more efficient than copies, and also how to forward objects efficiently between different scopes. In this article...
View Article