Skip to main content

IAR Embedded Workbench for RX 5.20

MISRAC++2023-4.1.2_k (C++ only)

In this section:
Synopsis

(Advisory) Deprecated features should not be used

Enabled by default

No

Severity/Certainty

Low/Low

lowlow.png
Full description

Deprecated feature found [depr.iterator.primitives]

Coding standards

This check does not correspond to any coding standard rules.

Code examples

The following code example fails the check and will give a warning:

#include <iterator>

struct ex_iterator : public std::iterator<
                            std::input_iterator_tag, // iterator_category
                            long,                    // value_type
                            long,                    // difference_type
                            const long*,             // pointer
                            long                     // reference
>{};

void example() {
  ex_iterator itr;
}

The following code example passes the check and will not give a warning about this issue:

void example() {
  // std::iterator has no replacement in std.
}