Default function template arguments# Programming - 葵花宝典
n*d
1 楼
"You can provide default arguments for template parameters in class
templates, but not function templates."
the words are from "Thinking in C++" V2. The first part is easy understood,
which is something like this
template class Stack {...}
But how to understand the 2nd part, "not funtion templates". Is it something
like this, which should be illegal according to this rule?
template T sum(T* a) {...}
templates, but not function templates."
the words are from "Thinking in C++" V2. The first part is easy understood,
which is something like this
template
But how to understand the 2nd part, "not funtion templates". Is it something
like this, which should be illegal according to this rule?
template