Familiar Template Syntax IILEs

A lot has already been said in the blogosphere about the use of immediately-invoked lambda expressions (IILEs) for initialization, and they’re certainly very useful. In C++20, P0428 gives us “familiar template syntax” for lambdas. Now, instead of writing a regular generic lambda: we have the option to use “familiar template syntax” to name the template… Continue reading Familiar Template Syntax IILEs

Published
Categorized as C++

Remember the Vasa! or, plus ça change, plus c’est la même chose

I’ve been programming in C++ for almost a quarter of a century now. I grew up, professionally, with C++, and in many ways, it grew up along with me. For someone who is used to C++, even used to recently-standardised C++, it’s hard not to feel apprehension when looking at C++20. Modules, coroutines, ranges, concepts… Continue reading Remember the Vasa! or, plus ça change, plus c’est la même chose

Published
Categorized as C++

Thoughts on Modern C++ and Game Dev

TL;DR: The C++ committee isn’t following some sort of agenda to ignore the needs of game programmers, and “modern” C++ isn’t going to become undebuggable. — Over the past week there has been an ongoing conversation on Twitter about how many people — especially those in the games industry — feel that the current direction… Continue reading Thoughts on Modern C++ and Game Dev

Published
Categorized as C++

Pointer-to-member-functions can be tricky

Note: the following applies to Microsoft’s compiler only — not to GCC or Clang. Pointers-to-member-functions (PMFs) are a bit off the beaten track in C++. They aren’t very syntactically pleasing, and they aren’t as easy to deal with as regular pointers-to-free-functions (PFFs). But they still see use, particularly in pre-C++11 codebases or where people choose… Continue reading Pointer-to-member-functions can be tricky

Published
Categorized as C++

C++Now 2018 Trip Report

Last week, a little fewer than 150 C++ programmers gathered in Aspen, CO for C++Now 2018. This year the conference was scheduled before Mother’s Day, so with it being quite a bit earlier than usual, I was half-expecting snow and travel delays. In fact last week turned out to be uniformly lovely, for the most… Continue reading C++Now 2018 Trip Report

Published
Categorized as C++

10 Non-C++ Book Recommendations for C++ Programmers

So you’ve learned enough C++ to function. You’ve read a bunch of the usual recommendations: Meyers, Stroustrup, maybe even Alexandrescu and Stepanov. You know enough to recommend Lippman et al. to newbies rather than the other “C++ Primer.” The internet has lots of C++-related book recommendations to make — for example, you should absolutely read… Continue reading 10 Non-C++ Book Recommendations for C++ Programmers

CppCon 2017 Trip Report

Last week in Bellevue, WA, around 1100 C++ programmers got together for CppCon. I love this conference – it’s a chance to meet up with my existing C++ community friends and make new ones, to learn new techniques and explore parts of C++, and to get excited about where C++ is headed in the next… Continue reading CppCon 2017 Trip Report

Published
Categorized as C++

Thoughts on Default Construction

What does default construction mean? Why do we write default constructors? When and why should we require them? I’ve been pondering these questions lately. One of the great things that C++ gets right is that it grants programmers the ability to create types that behave like built-in types. Many languages don’t offer this feature, treating… Continue reading Thoughts on Default Construction

Published
Categorized as C++

Development of an Algorithm

Here’s an exercise: given a nice piece of code sitting in a file, how do you take that code and make it generic, in the style of an STL algorithm? For our example, let’s consider an algorithm that isn’t (yet) in the STL. First, the problem it solves. Imagine that you have a set (in… Continue reading Development of an Algorithm

Published
Categorized as C++