Return of the Guru: Sutter Back for C++14


Image of Guru-Nanak-Dev-Jayanti

Due to the requirements of a long-running project, I’ve been behind the times in C++ compiler technology. I’ll soon be emerging from this cave, which is why I’m glad to discover that Herb Sutter is again picking up Guru of The Week (GotW).

I don’t think there are many who care about C++ who haven’t found their way to GotW before, but for those unfamiliar, Herb poses a set of questions about a C++ fragment he provides. He starts with a simple question for the junior gurus, and each question after is more difficult.  After readers have some time to come up with their own answers, he posts his solutions which are frequently sublime.
For those who are already familiar, the past GotWs are now being updated, making this a valuable refresher course. He’s adding entirely new questions to educate us as well.
With the many new features and changes in the latest C++ standard, and compilers becoming more complete as we speak, it’s the perfect time for GotW’s reemergence. Even more pleasing is the fact that he has decided to do this not for the C++11 standard, but to instead focus on the upcoming C++14 standard. He notes that C++14 is feature complete, and will soon be current; in fact, some compilers are already implementing its features. Besides, as he says, “C++14 is a small delta, a minor release aimed mainly at ‘completing C++11.’ And it does complete C++11…”
In any case, this is a good resource for picking up best practices, such as avoiding temporary objects or the differences in the many new initialization styles. He’s only three posts in, now is a great time to pick it up.
GotW #1

+ more

Accurate Timing

Accurate Timing

In many tasks we need to do something at given intervals of time. The most obvious ways may not give you the best results. Time? Meh. The most basic tasks that don't have what you might call CPU-scale time requirements can be handled with the usual language and...

read more