Over the past couple weeks, I’ve been working to update Sauce to take advantage of a couple of the features of “modern C++”. While the time investment has been pretty significant, I feel that the new features are substantial improvements.
First, I converted all of our enums to be scoped enums (introduced in C++11). This was more time consuming than I had expected, but well worth the effort.
I wrote up a detailed account in a separate post: Scoped Enums.
Also, I replaced all instances of
nullptr (introduced in C++11).
Similar to many other C++ code bases, our forced include file
NULL to 0. Unfortunately, since this is simply an integer and not an actual null pointer, using
NULL can hide bugs. In fact, during the transition to
nullptr, I found a few silent issues lurking in our code base.
Further discussion can be found in this post: Nullptr.