take a look at what all is undefined
notable ones:
*do not use pointer values to create a. you can't cast a pointer to an integer to use as a hash value. this means that you can't make a hash table that uses pointers as keys.
*the result of comparing 2 pointers with <, >, <=, >= is undefined because in a copy collector the heap can be moved around and the value of pointers changed. D dose not this but still qualifies it as undefined. this means that something like std::map would be undefined for pointers.
*if you preform arithmetic on a pointer such that the result pointers to a location out side of the original range allocated on the heap, you have undefined behavior. this means that C++'s idea of end iterators would be undefined in D
*you can't use byte by byte memory copies such as memcpy to copy arrays of pointers as mists of coping a pointer can be lost because as 1 byte changes the whole value changes. not a huge deal though as using the '=' operator is just as efficient. still, it's limiting
*a structure can not be directly referential of itself as the member will not be updated if the pointer is moved(i don't have a clue why this is though)
the rest you wouldn't even do in C++ and most likely not even in C
This post has been edited by ishkabible: 09 December 2011 - 01:54 PM

New Topic/Question
This topic is locked







MultiQuote





|