Home
Sandor Dargo's Blog
Cancel

What are string_views and why should we use them?

std::string_view has been introduced by C++17 and its purpose is to provide read-only access to character sequences. It potentially replaces const string& parameters and offers a significant pe...

Won't extend it more than once!

A few months ago I changed teams and I started to work on a library that helps its users to perform cryptographic operations. Those operations need a so-called Hardware Security Module (HSM) that i...

C++: standardized

In this article, let’s step back from coding a little bit. We are going to discuss how C++ was born and how it’s been evolving ever since. We’ll only have a brief overview of what happened in the l...

Bitwise enumerations

In C++ the size of a bool is 1 byte. That’s the case despite that it can only have two values, true or false which can be represented on one single bit. This might not be a concern all the time, bu...

C++23: Narrowing contextual conversions to bool

In the previous article discussing new language features of C++23, we discussed if consteval. Today, we’ll slightly discuss if constexpr and also static_assert. Andrzej Krzemieński proposed a paper...

The Evolution of Cooperation by Robert Axelrod

How to maximize the benefits of cooperation? Is it better to cooperate with others or to defect? How to decide? How to react when you’re a good person but you’re taken advantage of? Can we avoid es...

Smart pointers and their deleters

Bjarne Stroustrup, the father of C++ once said that “C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off.” Why did he say so? What makes...

C++23: Consteval if to make compile time programming easier

Let’s continue our exploration of C++23 features! This week we discuss how to call consteval functions from not explicitly constant evaluated ones. This paper, this new feature is also a good exam...

C++23: Literal suffix for (signed) size_t

Let’s continue our exploration of C++23 features! This week we discuss the extended language support for literal suffixes. What is a literal suffix? Literals can have an optional suffix which ind...

The Tech Resume Inside Out by Gergely Orosz

I’ve been interested in how to write a good resume. Both because I keep one up to date and also because I saw a few ones recently as I helped my managers with technical interviews. I definitely saw...