Introducing: “Modern C++ Programming Cookbook” – Master modern C++ including the latest features of C++23 with 140+ practical recipes, Third Edition – By Marius Bancila

Meetup session page: san-diego-cpp

Recording (sdcppmu Youtube Channel):

San Diego C++ meetup #62

I continued using “google meet” where I can share the slides directly from my google drive, record a session, chat with attendances and it works beautifully!

Recent session introduced Marius’ newly published book which is really a good one (as usual :)!

The session started with a warm up, c++quiz Question #287. A bit of a tricky one. If you cannot remember the exact constructor diffs of std::string, you are out of luck 🙁

The main session/talk was on “Implementing the higher-order functions map and fold“. Taken from chapter 3 from the book (just part of the chapter). Oh – and we had a raffle of 3 ebooks!

Minutes:

  1. Map, fold implementation.
  2. Various overloads to support different containers that might behave a bit differently in the way we iterate over the items (std::queue<> is one example).
  3. The difference between the presented fold() and “C++17 fold expressions”.
  4. Composing(composing(composing(functions))) – with many examples.
  5. Fold left/right functions.
  6. Functions as first class citizens. Returning functions and composing a chain of functions.
  7. Overload operator* as a syntactic sugar when composing.

That’s it for this session. Next session should be a really nice one. Working on bringing a new speaker with an interesting topic!

Take care,

Kobi

Leave a Reply