Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Use of STL, friend, reinterpret_cast etc..
#1
MISRA C++ Guidelines does not clearly mention about the following C++ constructs:
1. Use of STL (cstring, vector etc) which are internally based on dynamic allocations
2. Use of friend keyword to access private members of another class
3. Use of reinterpret_cast
4. Use of struct rather than classes - in case the set of data does not have specific operations on it, hence no need to encapsulate them in a class
5. Casting from struct to byte pointer - usually needed to send set of data like array of struct
6. Use of string functions which are not unbounded, e.g. strncpy, memcpy, bcopy, memset etc. All these functions accept size as an argument and access only the given area in memory.

Can you pl. clarify the guidelines on the above?
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)