In CRTP to avoid dynamic polymorphism, the following solution is proposed to avoid the overhead of virtual member functions and impose a specific interface:
temp
In your replacement code you can't "polymorphically" call foo on a base.
foo
base