Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 6.9.2: Are non-top level users of basic types permitted in an alias?
#1
Hi,

The first exception for Rule 6.9.2 permits the use of a basic type to define a type alias.  I guess the wording may be more broad than intended.  For example,is the following permitted?

Code:
#include <list>
typedef std::list<int> int_list;

Thank you!
Reply
#2
The short answer is 'Yes',  your example is compliant (but its possible you'll get violations when you try to put objects into or take them out of a int_list).

This is a rule we are planning to review for the next version
Posted by and on behalf of
the MISRA C++ Working Group
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)