August 2015

Have you ever seen a codebase crawling with `DWORD_PTR`, `HANDLE` and similar types? I bet it was a Windows application which never has been (and probably never will be) ported to another operating System, because it had fallen victim to a leaky or nonexistent encapsulation of WinAPI.

In my last post I have written about braced-or-equal-initializers for class members, a feature that enables simpler constructors through default values for members. Today’s post is about two related features that can simplify the writing of constructors even further.

Don’t get me wrong. Unit tests are your friends when developing a class. But they should not be that class’ `friend`. Here’s why.