I'm having trouble building libmorton with gcc 6.3.0 on Ubuntu 16.04.
error: there are no arguments to 'max' that depend on a template parameter, so a declaration of 'max' must be available [-fpermissive] checkbits = min(static_cast<unsigned long>(checkbits), max(x_max, y_max) + 1ul);
I'm having trouble building libmorton with gcc 6.3.0 on Ubuntu 16.04.
error: there are no arguments to 'max' that depend on a template parameter, so a declaration of 'max' must be available [-fpermissive] checkbits = min(static_cast<unsigned long>(checkbits), max(x_max, y_max) + 1ul);
Including
<alogorithm>
fixes this for me.