// types of temperature measurements
class C { }; // Celsius
class K { }; // Kelvin
class F { }; // Fahrenheit

// types of timing scales
class Secs { };
class Mins { };
class Hrs { };

// generic function: type of time & temperature vary
template <class Time, class R>
R PreHeat(const Time& t, const R& r) { return r; }

// partial specialization: temperature type fixed
template <class Time>
C PreHeat(const Time& t, const C& c) { return c; }

// all specialized: fixed time and temperature types
template <>
C PreHeat<Mins,C>(const Mins& m,const C& c){ return c; }

int main()
{
     Hrs h;
     K k;
     k = PreHeat(h, k);

C c;
     Secs s;
     c = PreHeat(s, c);

return 0;
}