Conditional based on variable type?

Don't put function definitions in a .h file, just the signatures. The definitions belong in the associated .cpp file. Otherwise you risk multiple definitions for the same function.