c++ - Wrong number of template arguments error -
i'm new templates , trying use functions out of class adapt generic programming. wenn this:
template<int c, int d> class a{ ... } float function(number<int c, int d> value);
it leads following error:
error: wrong number of template arguments (1, should 2) float function(number<int c, int d> value); ^
am missing here?
you need define template arguments on function , forward them type:
template<int c, int d> float function(number<c, d> value);
Comments
Post a Comment