Adding functions as template parameters