Static polymorphism is the use of templates to write code that works with every type satisfying its requirements, where the operation to run for each type is chosen at compile time, during instantiation. It is opposed to the subtype polymorphism of Chapter 3, chosen at run time through a dispatch table.
qsort is compiled once for every type, so it can only call the comparison through a pointer it receives; std::sort is instantiated for int and the lambda’s type, and the comparison becomes part of its own loop.