The key is in

//------vv return T();

For example, you can test the following, which is equivalent:

int x = int(); std::cout << x;

x will always be 0 in this case. The same is applied for the pointer - it's zero-initialized, "making" it NULL .

This is value initialization, "caused" by the parenthesis.