Moderators: david ward, misra cpp
- Posts: 15
- Joined: Wed May 14, 2014 1:02 pm
- Company: Axivion GmbH
More concretely, is the following code a violation?
Code: Select all
typedef void **my_t;
void f(my_t& x)
x = NULL;
- Posts: 151
- Joined: Mon Jun 02, 2008 1:55 pm
- Company: MISRA
References are not a level of indirection.
The rule is trying to limit the complexity when accessing / understanding multiple levels of pointers - a reference simply creates an alias for an object and does not add any further levels of indirection
Posted by and on behalf of
the MISRA C++ Working Group