Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Done that before...had a variable that was formerly an int:

  int foo = 0;
But got changed into a non-integral type:

  Thing foo = 0;
Turns out Thing had a copy constructor roughly like:

  Thing::Thing(Thing* old)
      : field(old->field)
  {
  }
Needless to say, my program was not very happy.


Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: