//Unsafe code example // run with vagrind -q a.out #include #include int main(void) { std::vector v(1); int& r = v[0]; r = 1; // ok, the reference is valid std::cout<<"v[0]="<