Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 11.3 pointer to array of const element
#2
Adding const/volatile is always safe and permitted by 11.3 because it applies to unqualified types only:

Quote:the rule applies to the unqualified types. It does not prevent type qualifiers from being added...

The non-compliant example at the bottom of 11.3 is very poorly chosen, because it has two levels of indirection, not one:
pointer to const pointer to int vs pointer to const pointer to const int

Your example is compliant IMHO, because it just adds const using one level of indirection.
I am curious about an official answer though.
<t></t>


Messages In This Thread

Forum Jump:


Users browsing this thread: 5 Guest(s)