the correct routines are chosen by using a combination of overloading and partial specialization.