Boy, std.bitmanip.bigEndianToNative is annoying to use

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Fri May 22 12:57:57 PDT 2015


On 5/22/15 12:48 PM, Jonathan M Davis wrote:
> On Friday, 22 May 2015 at 19:44:59 UTC, H. S. Teoh wrote:
>> On Fri, May 22, 2015 at 12:39:12PM -0700, H. S. Teoh via Digitalmars-d
>> wrote:
>> [...]
>>>     face.palm();
>>>     head.hang!inShame();
>>>     self.crawlBackTo(hole);
>> [...]
>>
>> Truth be told, though, the error message was very unhelpful about it. It
>> just says no templates were matched, no indication about the fact that
>> the problem was caused by mismatched type lengths.
>
> Well, I'm not sure how we could fix that. That's a general problem with
> template constraints. You know that they aren't passing, but you don't
> know _why_ they aren't passing. Though maybe in this case, the docs
> could be improved to make it clearer that if you're getting compilation
> errors, there's a decent chance that you got the type sizes wrong.

Yah, improving the documentation has maximum impact here. Navigating to 
github.com/pulls?user=D-Programming-Language... F5... F5... F5... F5... 
-- Andrei



More information about the Digitalmars-d mailing list