core: replace template with function_ref

1 job for test in 1 minute and 39 seconds (queued for 1 second)