+ 1

function templates question

The question is in this code: https://code.sololearn.com/cU8MTv4W733j/?ref=app This code wasn't written by me. It was a solution to a question I had. I added the comment.

5th Feb 2019, 5:11 AM
Daniel Cooper
Daniel Cooper - avatar
1 Answer
+ 1
Basically the compiler can infer the correct type when possible, so you can leave those arguments out. Read this article https://en.cppreference.com/w/cpp/language/template_argument_deduction
8th Feb 2019, 2:48 AM
Jhon
Jhon - avatar