I don't think this template function should be in any way authoritative, so let's namespace it.
If you had ambiguous code, and specified an invalid type, this could sneak through and become a runtime error, instead of a compile-time error. We fix this and add a test.