Menu

[solved] – Question 9859

I have a template class where I instantiate templates for int, unsigned. I have declared constructors with the template type type as one of the arguments.

Now I want to include a constructor with same set of arguments but want to implenet it differently.

Eg: Constructor : radius is of type either unsigned or signed int.

template<class area, class radius>const1(radius rad1)

now I want to implement a constr

const2(int check_area){ // here the implementation will be different when the radius is of type int.}

But the problem is constructor is getting overloaded with some signature and that is not acceptable.

Is there any solution to this problem.

Thanks in advance,

-Nilesh

Expert Answer


OR


Leave a Reply

Your email address will not be published. Required fields are marked *