Frank Benoit wrote:
KennyTM~ schrieb:
Frank Benoit wrote:
Or how about making it a single method?
bool empty=(bool* value){
if( value ) _empty = *value;
return _empty;
}
The compiler rewrites the calling code to either pass the address or
null.
So properties can't be used in SafeD?
Hm, right pointers are not allowed there. So the "in" operator for AAs
is also disallowed? That surprises me.
You could allow pointers in SafeD. You just can't allow pointer
arithmetic, unless a pointer carries information on the upper and lower
bounds of the memory block.
By the way, the -safe in dmd2 switch doesn't seem to do anything yet and
allows unsafe pointer operations.