Templates, CRTP, and Modern C++

CRTP (Curiously Recurring Template Pattern)

  • static polymorphism
  • calls inlined at compile time

C++20 Concepts

  • requires constraints on template parameters

C++20 Coroutines

  • co_yield
  • Generator

Ranges

  • k-way merge as ranges pipeline

mmap vs read()

  • when each wins (random 4KB reads from 1GB file)