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));

...

Risk Assessment

Using invalid iterators yields undefined results.

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

STL30-C

Component

Value

Severity

1 (low)

Likelihood

2 (probable) Remediation cost

1 (high)

P2

L3

References

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

...