I have this situation:
#include <vector>
template<typename T>
T f() { return T(); }
template<>
template<typename T>
std::vector<T> f<std::vector<T>>() {
return { T() };
}
int main(){
f<std::vector<int>>();
}
I'm trying to specialize the template for std::vector<T>
, but I'm getting this error:
error: too many template-parameter-lists
std::vector<T> f<std::vector<T>>() {
How can I specialize for std::vector<T>
?