Error in 'The D Programming Language' (2010)?

Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jan 11 16:36:15 PST 2016


On 01/11/2016 04:28 PM, asdfa wrote:

 > Both DMD and GDC complain, saying
 > Error: template instance sort!((a, b)
 > {
 > return freqs[a] > freqs[b];
 > }
 > ) template 'sort' is not defined

That issue is already in the errata:

   http://erdani.com/tdpl/errata/

Add the following line to fix:

import std.algorithm;

Ali



More information about the Digitalmars-d-learn mailing list