Currently, I am confused with the following statement: although this statement would give an error at compile time, but it is not.
// statement 1:
someclass* q(someclass());
I understand if this statement was that way
// statement 2:
someclass* q(&someclass());
I would like to know why statment 1 does not generate an error, or even if it is valid (is there anything that I am missing behind the curtains?)
source
share