when writing a template I sometimes need to initialize an attribute of a given template parameter type. This may be any class or even a pointer type. F.e.:
1 2 3 4 5 6 7 8 9 10 11
template<typename T> class A
{
private:
T _a;
public:
A() :
_a()
{}
} /* A */;
I think this works well in case of f.e.:
A<string> a;
creating a with an empty string _a. But does the initializer of line 8 set _a to NULL if T is of any pointer type as f.e. in: