More like

    uint64_t subsidy = GetBlockValue(nHeight, 0) * 1000;
    BOOST_CHECK((nSum + subsidy) >= nSum);
    nSum += subsidy;

It's a pity that C++ still doesn't have a way to flag or raise exceptions on overflow.