Category cpp_nibble

#082 – Using std::tuple for heterogeneous data grouping

The need to return or pass several values of different types comes up often enough that almost every C++ programmer has, at some point, written a one-off struct just to bundle them together. std::tuple is the generic answer to that recurring problem: a fixed-size sequence of…

#081 – The typename keyword in nested template types

The typename keyword has two jobs in C++ that look unrelated until you recognise they’re the same job at different depths. The familiar use is in template parameter lists — template <typename T> — where it announces a type parameter. The trickier use is…