¡@

Home 

c++ Programming Glossary: refnop

corrupted const reference to a temporary object (life time)

http://stackoverflow.com/questions/17236007/corrupted-const-reference-to-a-temporary-object-life-time

sum But in the following example the const reference refnop refers to a destroyed temporary object. I wonder why #include.. return a.m m int main A a a.init A const ref A a A const refnop A a .nothing int ret 0 if a ref ret 2 if a refnop ret 4 return.. A const refnop A a .nothing int ret 0 if a ref ret 2 if a refnop ret 4 return ret Tested using GCC 4.1.2 and MSVC 2010 it returns..