Modern C++ Features – auto for Functions
A few posts ago I have written about `auto` for variables. This time will be about the same keyword for a different use: `auto` as return type for functions.
A few posts ago I have written about `auto` for variables. This time will be about the same keyword for a different use: `auto` as return type for functions.
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.
One of the less discussed but nevertheless useful features in C++11 is the possibility to provide initializers for class members right in the class definition.
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.
Today I came across the video of a talk of Bjarne Stroustrup, where, among other things, he states that C++ is not an object oriented language. This contradicts what many […]
Here we go again with two features that have been added in C++11 that can greatly simplify the code we write.
This is my second post of a series on new C++ features, where new means C++11 and up. Keyword `auto` for variable type deduction is one of the most known […]
With this post I’ll start a series on new C++ features, where new means C++11 and up. I usually won’t go into too much technical details of the features, because […]
It’s been almost six months now that I started this blog, and the resonance is better than I would have dreamed back then.