In 2012, Martinho Fernandes coined the Rule of Zero in a blog post. In 2014, Scott Meyers wrote a blog post about a concern with that rule and proposed a Rule of Five Defaults. In this post I am going to wrap up my thoughts about the two posts and propose a “Rule of All or Nothing”.

In C++ there are two ways of type conversions: implicit and explicit type conversions. The latter are called type casts and they are what this post is about.

In a few occasions I have seen functions that allocate certain local variables on the heap instead of using variables with automatic storage. In this post I explain what you should do with those variables.