Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
3-2-4 and pure virtual functions
#1
Hi!

Rule 3-2-4 states:


Quote:An identifier with external linkage shall have exactly one definition.


This would also apply to pure virtual functions of abstract base classes. I have personally never seen anyone use that feature and gather from reading up about it that it is questionable design to supply definitions for those. In most cases, these functions would be empty and collide with rules about unused code anyway.

Was this intended or an oversight? I propose to add an exception for pure virtual functions.

Also, I propose to replace "An" with "All". Otherwise, it would be enough to add one variable somewhere and provide a definition for it.

Thanks!
Reply


Messages In This Thread
3-2-4 and pure virtual functions - by Tobias Loose - 10-04-2022, 06:19 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)