I'm defining this variadic template function that I want to use use for parameter validation:
class Text
{
template <typename ... T> friend void strfmt(char *dest,int size,const T & ... v)
{sprintf_s(dest,size,_valchk(v) ...);}
public:
// other functions in class
};
_valchk
is a set of private member functions of same class.
When I use strfmt, with any kind of parameter, compiler issues an error.
Example:
char buf[10];
strfmt(buf,sizeof(buf),"%d",10);
strfmt: unknown identifier
Why?