[C++-sig] why does the "shared_ptr<X> const&" silently become 0xCCCCCCCC
athor
thorena at gmail.com
Fri Mar 13 09:57:03 CET 2009
I just reproduced the behaviour. Out of habit, I compiled with release the
last time. Using a debug build, I get the same behaviour (using const&,
non-const& etc).
I'm guessing this is a case of "undefined behaviour" resulting from mixing
Debug/Release dll's. Changing to Release (or reading Daves link) should
help.
Passing shared_ptr by value and not by ref is still recommended though :)
--
View this message in context: http://www.nabble.com/why-does-the-%22shared_ptr%3CX%3E-const-%22-silently-become-0xCCCCCCCC-tp22449314p22492427.html
Sent from the Python - c++-sig mailing list archive at Nabble.com.
More information about the Cplusplus-sig
mailing list