Function pointers can be used as template arguments : demo