#include int main(int argc, char **argv) { std::shared_ptr s(new int); *s = 3; std::weak_ptr w = s; return *s; // Set break point at this line. }