Pointer aliasing- in C++0x

Posted by DeadMG on Stack Overflow See other posts from Stack Overflow or by DeadMG
Published on 2011-01-01T15:48:35Z Indexed on 2011/01/01 15:54 UTC
Read the original article Hit count: 225

Filed under:

I'm thinking about (just as an idea) disjointed pointer aliasing in C++0x. I was thinking about seeing if it could be implemented similarly to const correctness- that is, enforced by the compiler. What would be the requirements for such a thing? As this is more of a thought experiment, I'm perfectly happy to look at solutions that destroy legacy code or redefine half the language and that kind of thing.

What I'd really rather not do is have, say, restrict from C99 where the programmer just promises it. It should be enforced.

© Stack Overflow or respective owner

Related posts about c++0x