== Why is this an issue?

Postfix increment and decrement typically involves making a copy of the object being incremented or decremented, whereas its prefix form does not. Therefore the prefix form is usually the more efficient form, and should be preferred.

This rule raises an issue if a postfix increment or decrement operator is used, but its return value is not read.

=== Noncompliant code example

[source,cpp]
----
void myFunc(int lim)
{
  int i;
  for (i = 0; i < lim; i++)
  {
    // do something
  }
}
----


=== Compliant solution

[source,cpp]
----
void myFunc(int lim)
{
  int i;
  for (i = 0; i < lim; ++i)
  {
    // do something
  }
}
----


ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

=== Message

Use prefix (increment|decrement)


endif::env-github,rspecator-view[]
