"How does one use that template? Can you show me a function that takes anything with a do() method? Like this?:"
It should work without the template parameter: do(a), do(b)
"Can I take any arbitrary type with an "int do()" method and use that with do?"
Yes.