I wrote the following source
#include <iostream> using namespace std; template <class T> class AAA { public: void f() { cout << T() << " "; } }; int main ( void ) { AAA<int*> a; AAA<int> b; af(); /// in this case, T() == NULL?? bf(); return 0; }
and console printing - 00000000 0. (in visual studio 2010)
if T is int *, T () == NULL? and is it always so?
source share