TDPL Errata site is down

Andrej Mitrovic and.mitrovic at hotmail.com
Fri Jul 23 17:26:31 PDT 2010


Andrej Mitrovic Wrote:

> Andrei Alexandrescu Wrote:
> 
> > Andrej Mitrovic wrote:
> > > Or, it has some database problems. 
> > > 
> > > http://erdani.com/tdpl/errata/index.php?title=Errata_for_%22The_D_Programming_Language%22_book
> > > 
> > > Luckily the cached version works fine:
> > > http://webcache.googleusercontent.com/search?q=cache:nIyQeOaM1hAJ:erdani.com/tdpl/errata/index.php%3Ftitle%3DErrata_for_%2522The_D_Programming_Language%2522_book+the+d+programming+language+errata&cd=3&hl=en&ct=clnk
> > 
> > Yes, I noticed only this morning. Thanks! The database is gone, but I 
> > saved the google cache of the errata and will reenter the data tonite.
> > 
> > Thanks again,
> > 
> > Andrei
> 
> No problem :)
> 
> Btw, where can we ask questions regarding the examples in the book?
> 
> There's this line on page 11:
> assert(binarySearch!(int)([1, 3, 6, 7, 9, 15], 6));
> 
> But I'm getting a compiler error:
> binarysearch1.d(21): Error: template binarysearch1.binarySearch(T) does not match any function template declaration
> binarysearch1.d(21): Error: template binarysearch1.binarySearch(T) cannot deduce template function from argument types !()(bool,int)
> 
> That should work with the example code, right?

Ouch! That wasn't the error, it was the line before it, specifically the second line here:

assert(binarySearch([1, 3, 6, 7, 9, 15], 6));
assert(binarySearch(![1, 3, 6, 7, 9, 15], 5));
assert(binarySearch!(int)([1, 3, 6, 7, 9, 15], 6));

I put the exclamation mark in the wrong position. Doh!(!). :p


More information about the Digitalmars-d mailing list