Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 6.7.2 variable templates
#2
In the introduction to the rules, there's the requirement:

"3.7.3 Templates
Unless otherwise stated, the guidelines shall only be applied to fully instantiated templates"

For a template variable, each instantiation has to be considered separately. So your example with <const int> is compliant, but if it were replaced by <int> it would be non-compliant
Posted by and on behalf of
the MISRA C++ Working Group
Reply


Messages In This Thread
Rule 6.7.2 variable templates - by gdavis - 24-07-2025, 06:55 PM
RE: Rule 6.7.2 variable templates - by misra cpp - 01-08-2025, 11:49 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)