Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Distinction between rule 6.8.1 and 6.8.4
#3
In addition, we intend to clarify "explicitly designates" with the following example (or something similar):

int arr[10];
 
struct A {
  int m_a;
 
  const int &a() const { // compliant - the return expression references m_a, but does not designate it.
    return arr[m_a];
  }
};
Posted by and on behalf of
the MISRA C++ Working Group
Reply


Messages In This Thread
RE: Distinction between rule 6.8.1 and 6.8.4 - by misra cpp - 25-01-2026, 01:12 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)