Using function pointers for key copy and key compare