This can actually be handled quite cleanly in C++ using template function overloading: declare one version of the function as template <typename T> and the other as template <typename T, typename U>. The compiler will introspect on the argument types and determine which version of the function to call.
(no subject)
Date: 2008-11-10 06:15 pm (UTC)I think I'm officially too geeky to live.