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 Dave
That is very very strange. Removing const should not change anything. If it
does... well... black magic?
The debugging link Dave provided is very important if you must compile debug
versions. I remember something about not mixing debug/release versions of
python but I just avoid the issue by never
zaexage wrote:
>
> I got a 'class Manager' which contains a std::set of shared_ptr;
> and 'class Entity' has a auto_ptr as member
> and 'class StateMachine' needs shared_ptr as member variable to
> access some functions outside.
>
> So, in order to break cyclic reference, I make the StateM
Hi,
I just tried your example and could not reproduce the "feature". I made a
few minor modifications like fixing typos and adding a cout statement in the
constructor of A but nothing that should affect the result.
A few things that could cause you problems:
* Passing shared_ptr by reference and