Change 'class' to 'typename'.
Change every occurance of 'NULL' to 'nullptr'.