Hacker News new | ask | show | jobs
by koenigdavidmj 5509 days ago
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.