Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
double data[5] = { 2.3, 3.7, 1.4, 0.8, 9.6 };
deque<double> d;

transform(data, data+5,
    inserter(d,d.begin()),
    bind2nd(plus<int>(), 41));

Priority: P2 Level: L3

Using invalid iterators yields undefined results.

Component

Value

Severity

1 (low)

Likelihood

2 (probable)

Remediation cost

1 (high)

References

  • Meyers 01 Item 43: Prefer algorithm calls to hand-written loops.

...