Tag Archives: performance

A moved-from optional

This post is in response to claims, that I have heard number of times, that the semantics of optional’s move operations are wrong: Some people are surprised that the second assert holds: the unfulfilled expectation is that moving from an … Continue reading

Posted in programming | Tagged , , , | 1 Comment

Efficient optional values

In this post we will see a library for storing nullable/optional values that can in certain situations replace and outperform Boost.Optional.

Posted in programming | Tagged , , , , | 9 Comments

Handling short codes — part I

In my work, we often deal with codes: country codes, airport codes, airline codes, aircraft codes, and more. The thing they have in common is that they are really short. Sometimes 2-letter long, sometimes 3-letter long, sometimes a bit longer. … Continue reading

Posted in programming | Tagged , , , | 32 Comments

String’s interface

What I have to say today is fairly obvious, and you probably know about it. But because I have observed the following pattern in my project’s code fairly frequently, I feel it needs to be recorded. Consider this code: Can … Continue reading

Posted in programming | Tagged , , | 24 Comments