Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
5-2-7 and void pointer conversions
#1
Are conversions between pointers to void and pointers to object types a violation of rule 5-2-7? It isn't clear what "object with pointer type" means here (or "unrelated pointer type" for that matter). Specifically, are either of the casts below a violation of Rule 5-2-7?

Code:
void bar(int *ip, void *vp) {
    ip = static_cast(vp);
    vp = static_cast(ip);
}
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)