c++: is it safe to cast pointer to functions?
I'm wondering if it's safe to cast a `double (*)(double)` to `double(*)(...)`, this is going to be used to generalize a code which may have pointers to multiple functions.

so far I've stored every thing that is going to be passed to the function in a vector, and I'm wondering if there is a way to call a function (while passing the correct number of arguments) in a generalized code? I mean something this:

	//while initializing
	mFunction = sin;
	//later in code
	double (*generalized)(...) = mFunction;
	for(i=0;i<args.size();i++)
		pusharg(args[i]);
	call(generalized);
c++: is it safe to cast pointer to functions?
===

I'm wondering if it's safe to cast a `double (*)(double)` to `double(*)(...)`, this is going to be used to generalize a code which may have pointers to multiple functions.

so far I've stored every thing that is going to be passed to the function in a vector, and I'm wondering if there is a way to call a function (while passing the correct number of arguments) in a generalized code? I mean something this:

	//while initializing
	mFunction = sin;
	//later in code
	double (*generalized)(...) = mFunction;
	for(i=0;i<args.size();i++)
		pusharg(args[i]);
	call(generalized);