Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 14-7-1 and templates that must be specialized
#2
The rule could be made clearer, but the intent was definitely to only cover templates that *are* instantiatable. Therefore, this could be seen as a false positive against a tool as there is no definition of SomeClass.

However, given modern C++ techniques, the presence of templates that are not intended to be instantiated (with or without definitions) makes this kind of rule Undecidable at best, with questionable value.

With this in mind, the rule is under consideration of the next version.
Posted by and on behalf of
the MISRA C++ Working Group
Reply


Messages In This Thread
RE: Rule 14-7-1 and templates that must be specialized - by misra cpp - 13-05-2022, 01:51 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)