~ubuntu-branches/ubuntu/utopic/mir/utopic-proposed

« back to all changes in this revision

Viewing changes to guides/cppguide.xml

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release
  • Date: 2014-03-10 19:28:46 UTC
  • mto: This revision was merged to the branch mainline in revision 63.
  • Revision ID: package-import@ubuntu.com-20140310192846-rq9qm3ec26yrelo2
Tags: upstream-0.1.6+14.04.20140310
ImportĀ upstreamĀ versionĀ 0.1.6+14.04.20140310

Show diffs side-by-side

added added

removed removed

Lines of Context:
1060
1060
          be private</a>.
1061
1061
        </p>
1062
1062
        <p>
1063
 
          When redefining an inherited virtual function, explicitly
1064
 
          declare it <code>virtual</code> in the declaration of the
1065
 
          derived class.  Rationale: If <code>virtual</code> is
1066
 
          omitted, the reader has to check all ancestors of the
1067
 
          class in question to determine if the function is virtual
1068
 
          or not.
 
1063
          When redefining an inherited virtual method (both pure
 
1064
          and non-pure), explicitly declare it <code>override</code>
 
1065
          in the declaration of the derived class. Rationale: using
 
1066
          <code>override</code> allows the compiler to consistently
 
1067
          detect attempts to override methods that have been changed
 
1068
          or completely removed. It also makes it straightforward for
 
1069
          a reader to determine if a method is virtual or not.
1069
1070
        </p>
1070
1071
      </DECISION>
1071
1072
    </BODY>