What type can be used to replace templates from this function?
template<class T, class U>
T func(T a, T b, U c)
{
if(c == '+' || c){
return a+b;
}
else if(c == '-' || !c){
return a-b;
}
}
template<class T, class U>
T func(T a, T b, U c)
{
if(c == '+' || c){
return a+b;
}
else if(c == '-' || !c){
return a-b;
}
}A. replace templates T, U with auto keyword
B. replace templates T, U with generic keyword
C. replace templates T, U with temp keyword
D. replace templates T, U with GEN_TEMP keyword
Answer: Option A

Join The Discussion