this post was submitted on 18 Jun 2023
8 points (100.0% liked)
C++
1763 readers
1 users here now
The center for all discussion and news regarding C++.
Rules
- Respect instance rules.
- Don't be a jerk.
- Please keep all posts related to C++.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
This sounds like a solution that warrants a big huge comment or the next guy to refactor will remove it and break stuff...
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.
This is actually what I did. I declared it and left a comment to explain why it needed to be left unimplemented.