i'd prefer a boost numerical cast, but if you're trying to avoid boost, static_cast would be more idiomatic