Compile time constants are an important part of C++. They contribute to program correctness and allow the optimizer to do a better job. Today I will deal with what is possible […]
“Is there some documentation how I have to configure my IDE to integrate and debug those components?” – “Yes. Have a look at the Wiki. Or maybe there is some […]
Recently I received a question on Twitter whether to prefer RAII over Exceptions. I have seen similar questions being asked again and again over time, so there seems to be […]
You may be working on a small open source project or on a large corporate team. In either case you will probably have new team members coming in the future. […]
Covariance can be a useful concept, e.g. when implementing the abstract factory design pattern. However, in modern C++, we should return smart pointers that are not recognized to be covariant like […]
In my last post I showed the Visitor design pattern in its fully object oriented implementation. In the post before that I wrote about moving from enums to class hierarchies. I […]
If you have read the “Gang of Four” book about design patterns or just have been long enough in software development, you will have heard of the Visitor pattern. In its fully […]
When an enum controls the behavior of a class, that behavior can sometimes be expressed by class hierarchies.
Sometimes, a fixed set of string values is allowed as input. Often these string values are then stored, used for control flow etc. Enumerators are a better alternative.
I’ll try something new today: I pick a piece of code from the web and see what improvements I would make to it, using small refactoring steps.