After working 15 years in C++ I found that I don\'t understand references completely...
class TestClass
{
public:
TestClass() : m_nData(0)
{
}
T
TestClass& c = TestClass(); // TestClass() temporary doesn't persist beyond this expression.
c.Dump();
TestClass() creates a temporary and you cannot take the reference of it.
const TestClass& c = TestClass();
const qualification extends the life time of the temporary being created until the scope of the object c.