In a non-const member function, I want to pass 'this' to a function, but the function takes a shared_ptr. When I try to pass it like this:
std::shared_ptr<Piece>(this)
I get weird exceptions saying: "Chess.exe has triggered a breakpoint"
Am I converting from 'this' to shared_ptr in the wrong way?