Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

Wiki MarkupIt is often recommended that class objects be initialized using direct constructors rather than assignment. \ [[Meyers 01|AA. Bibliography#Meyers 01] \] Direct constructors avoids construction, copying, and destruction of a temporary copy of the object. To wit, object should be constructed this way:

Code Block
bgColor#ccccff
langcpp
Widget w( /* constructor arguments */);

...

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

OOP31-CPP

low

likely

low

P9

L2

Bibliography

...

  • \[[Meyers 01|AA. Bibliography#Meyers 01] \] Item 6: Be alert for C+\+'s most vexing parse.

...

OOP30-CPP. Do not invoke virtual functions from constructors or destructors      13. Object Oriented Programming (OOP)      OOP33-CPP. Do not slice polymorphic objects