test template instantiation for sort