In other formulation,
Compare
is not a "class" (aggregate of data and functions related to them) but a "template parameter". It is something that at compile time is replaced with the parameter you specify (
mycomparison
, in your case).
So their internal code that in source may looks like this:
...
Comapre comp;
if(comp(a,b))
{ ... }
...
after the template instantiation becomes like this:
...
mycomparison comp;
if(comp(a,b))
{ ... }
...
that is perfectly translatable into machine code, since all the expression have a definition.