• burrito82@feddit.de
    link
    fedilink
    arrow-up
    3
    ·
    2 years ago

    What can you do? Declare the move constructor, but don’t implement it.

    This sounds like a solution that warrants a big huge comment or the next guy to refactor will remove it and break stuff…

    • gracicot
      link
      fedilink
      arrow-up
      2
      ·
      2 years ago

      This is actually what I did. I declared it and left a comment to explain why it needed to be left unimplemented.

    • caleb-vincent@kbin.social
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      That’s how we would have to do non-copyable classes before C++11. Older code bases are still filled with unimplemented copy constructors and assignment operators with comments. If you were extra thorough they’d also be private. PC Lint hated both of those tactics.