-
Notifications
You must be signed in to change notification settings - Fork 380
Closed
Description
I often use the GCC option -Weffc++
in my projects which:
Warn about violations of the following style guidelines from Scott Meyers’ Effective C++ series of books:
- Define a copy constructor and an assignment operator for classes with dynamically-allocated memory.
- Prefer initialization to assignment in constructors.
- Have operator= return a reference to *this.
- Don’t try to return a reference when you must return an object.
- Distinguish between prefix and postfix forms of increment and decrement operators.
- Never overload &&, ||, or ,.
This option also enables -Wnon-virtual-dtor, which is also one of the effective C++ recommendations. However, the check is extended to warn about the lack of virtual destructor in accessible non-polymorphic bases classes too.
`
But unfortunately CLI11 throws a couple of warnings when this is enabled. I think it would be a nice-to-have to enable -Weffc++
and get rid of those warnings
henryiii and sergeyklay
Metadata
Metadata
Assignees
Labels
No labels