-
Start modelling your class such value-type i.e.
intand benefitrule of zero. -
Prefer composition over inheritance.
-
Prefer non-member non-friend function over member functions. Provide those
nonmember non-friendfunctions in the same namespace of the class. -
Defining/disabling one of
copy ctor,move ctoranddestructor, disables implicit definition of others so if you have to define/disable one them, define/disable remaining ones. -
Consider support for a non-throwing swap
-
Avoid providing implicit conversions.