Visual D 0.3.26 released

Derek derekbrowncmu at gmail.com
Thu Apr 10 22:14:55 PDT 2014


On Friday, 11 April 2014 at 04:55:58 UTC, evilrat wrote:
> if they are templates try make them plain function
They're not, they're just ordinary functions:

// Links.
uint MAKELONG(ushort a, ushort b) {
	return cast(uint) ((b << 16) | a);
}

// Does not link.
uint MAKELONG(uint a, uint b) {
     assert((a & 0xFFFF0000) == 0);
     assert((b & 0xFFFF0000) == 0);
     return MAKELONG(cast(ushort)a, cast(ushort)b);
}

// Does not link.
ushort LOWORD(ulong l) {
	return cast(ushort) l;
}

// Does not link.
ushort HIWORD(ulong l) {
	return cast(ushort) (l >>> 16);
}


I grepped to see if MAKELONG was defined somewhere else as well, 
but it's not.


More information about the Digitalmars-d-ide mailing list