struct A { int *p = nullptr; A& operator=(int i) { *p = i; return *this; } }; int main(void) { A a; a = 1; /* boom! */ return 0; }