c++ switch only works for constants in the case clauses.