His lifetime is the duration of the program. And no matter how many times you write typeid(x) , it will return the same type_info object every time, for the same type.
I.e
T x, y; const type_info & xinfo = typeid(x); const type_info & yinfo = typeid(y);
The xinfo and yinfo both refer to the same object. So try to print the address to check it:
cout << &xinfo << endl;
Output:
0x80489c0 0x80489c0
Note: for your run, the address may differ from the above, but whatever it is, it will be the same!
Demo: http://www.ideone.com/jO4CO
Nawaz source share