MFC Collection Utilities library

This project has been moved to GitHub. New location: https://github.com/mariusbancila/mfccollectionutilities C++11 has provided support for range-based for loops. They allow iterating over the elements of a range without using an index. std::vector<int> v = {1, 2, 3, 4, 5}; for(auto& e : v) e *= 2; However, if you try the following MFC code you … Read more

Extension methods in C++

A few days ago Bjarne Stroustrup has published a proposal paper (N4174) to the C++ standard committee called Call syntax: x.f(y) vs. f(x,y). The following excerpt from the paper summarizes the proposal: The basic suggestion is to define x.f(y) and f(x,y) to be equivalent. In addition, to increase compatibility and modularity, I suggest we explore … Read more

The C++ Ten Commandments

This article presents a list of good practices for C++ development. Obviously there are many other good practices that one should adhere to and perhaps some of them are more important than the ones in this list. The following list is a personal recommendation and should be taken as is. Thou shalt follow the Rule … Read more