Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

EndianProtocol doesn't compile

Moderators: kris

Posted: 07/01/08 00:24:36

I wanted to create a ticket for this, but I get a bad request. Here it is:

See method write of class It defines:

alias void function (void* dst, uint bytes) Swapper;

void write (int mask, Swapper mutate) {

// ...


and somewhere below that:

write (~1, &ByteSwap?.swap16);

being ByteSwap?.swap16 definition:

final static void swap16 (void[] dst) {

// ...


It's "void function(void[])" versus "void function(void*, unit)", which clearly doesn't match.

How did you get to compile that file? :-P (it's just curiosity)

Author Message

Posted: 07/01/08 00:27:50

look a little further in the ByteSwap module ;)