AutosarC++17_03-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 266557 2017-02-07 13:08:19Z piotr.tanski $
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