AutosarC++17_10-A2.6.1ΒΆ

Digraphs shall not be used

Required inputs: IR

Rationale

The digraphs are: <%, %>, <:, :>, %:, %:%:.

The use of digraphs may not meet developer expectations.

Example
//% $Id: A2-6-1.cpp 289436 2017-10-04 10:45:23Z michal.szczepankiewicz $
class A {
public:
  void F2() {}
};
// void fn1(A* a<:10:>) // Non-compliant
// <%
//    a<:0:>->f2();
// %>
void Fn2(A *a[10]) // Compliant, equivalent to the above
{
  a[0]->F2();
}
See Also
  • MISRA C++ 2008 [6]: advisory 2-5-1 Digraphs should not be used.
  • JSF December 2005 [7]: 4.4.1 AV Rule 12 The following digraphs will not be used.
  • HIC++ v4.0 [8]: 2.2.1 Do not use digraphs or trigraphs.

Possible Messages

Key

Text

Severity

Disabled

digraph_use

Digraph used.

None

False

Options