c++ get type of variable at compile time