Referring to the sample code above, what is the type of T2 in the object ::f?

Q

template<class T = int> class Foo {
public:
template<class T2 = T> class InnerFoo {
T2 t2;
};
static InnerFoo<long> *f;
};
Foo<double> f;

Referring to the sample code above, what is the type of T2 in the object ::f?

1) double
2) t2
3) char
4) int
5) long

✍: Guest

A
(This question has not been answered yet. If you know the answer, please share it in a comment below.)

2012-04-20, 2558👍, 0💬