Hmmm... right... so is that because in that case, o already is a pointer and therefore allocated on the heap, whereas an object allocated on the stack has to be copied into the heap before using a shared_ptr can make any sense and by that time it's obviously referring to a different part of memory?
I hope I explained that right...
EDIT: Whereas raw pointers work because they just point to memory without asking any questions and don't care if they're pointing to stack memory, unlike shared_ptr which specifically avoids it?