I would prefer a single return statement in this instance. For example you could perform the operation following this line if rows.size() != 1 and in both cases return the same value (i.e., boost::lexical_cast<unsigned int>(rows.at(0).at(0))).