Home
Sandor Dargo's Blog
Cancel

The rule of 5 and inheritance

Last week, we talked about the rule of five and we discovered what it means for move operations if we only declare a destructor and not the rest of the special member functions. In that case, move ...

Once more about the rule of 5

Arne Mertz talked about misused guidelines at C++OnSea. Among those, there was the rule of 5. Which made me think about a pattern I’ve seen. Let’s first repeat what the rule of 5 says. The Rule...

5 reasons why politics will ruin your career hopes

I’m not apolitical, I do have my opinion and quite a strong one. Yet, I don’t let it interfere with my job. I don’t think that one should talk about his or her political agenda at work or that one ...

What to do if you don't want a default constructor?

Do we need a default constructor? What does it mean to have a default constructor? What happens if we don’t have one? Those are the questions we are going after in this article. A default construc...

Trip report: C++ On Sea 2024

Last week, between the 3rd and 5th of July, I had the privilege to attend and present at C++ on Sea 2024 for the 5th time in a row! I’m grateful that the organizers accepted me not simply as a spe...

C++23: further small changes

In this article, let’s get back to exploring C++23. We are going to have a look at some unrelated small changes in the standard, including the rarest species of changes. Deprecations! Printing vol...

Member ordering and binary sizes

While I have been preparing my presentation for C++ On Sea, I realized that something is missing from How to keep your binaries small. The importance of member ordering! I remember learning at a p...

Did you do what I asked for or not?

Any resemblance to reality is pure coincidence. This story has nothing to do with my current or previous employers. I wouldn’t look for such troubles. A notification popped up in the top-right cor...

Limit the number of library dependencies

First, let’s discuss what a dependency is. When we talk about dependencies, we can talk about different approaches. When hearing the word “dependency”, many people first think about dependency inj...

The limits of `[[maybe_unused]]`

The codebase I work with defines a utility macro called UNUSED. Its implementation is straightforward, it takes a variable (let’s call it x) as a parameter and expands it as ((void)x). The reason w...