Greetings, everyone!
Examining my own code, I came up to this interesting line:
const CString &refStr = ( CheckCondition() ) ? _T(\"foo\") : _T(\"bar
I can see now, that while CheckCondition() is executed, refStr exists, but still not initialized.
From a language lawyer point of view, this is wrong. During initialization, refStr
doesn't exist yet. I'd guess that your visual debugger is giving you misleading hints.
If the code inside the initialization leads to an error condition, refStr
will not exist, and will not ever have existed.