Ticket #13015: shadowed_members.patch

File shadowed_members.patch, 3.5 KB (added by thimo.neubauer@…, 5 years ago)

Patch relative to Boost 1.60.0

  • MAIN/Third_Party_Libraries/Boost/include/boost/random/shuffle_order.hpp

    old new  
    200200    }
    201201
    202202    /** Returns true if the two generators will produce identical sequences. */
    203     BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(shuffle_order_engine, x, y)
    204     { return x._rng == y._rng && x.y == y.y && std::equal(x.v, x.v+k, y.v); }
     203    BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(shuffle_order_engine, _x, _y)
     204    { return _x._rng == _y._rng && _x.y == _y.y && std::equal(_x.v, _x.v+k, _y.v); }
    205205    /** Returns true if the two generators will produce different sequences. */
    206206    BOOST_RANDOM_DETAIL_INEQUALITY_OPERATOR(shuffle_order_engine)
    207207
  • MAIN/Third_Party_Libraries/Boost/include/boost/random/subtract_with_carry.hpp

    old new  
    244244     * Returns true if the two generators will produce identical
    245245     * sequences of values.
    246246     */
    247     BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(subtract_with_carry_engine, x, y)
     247    BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(subtract_with_carry_engine, _x, _y)
    248248    {
    249249        for(unsigned int j = 0; j < r; ++j)
    250             if(x.compute(j) != y.compute(j))
     250            if(_x.compute(j) != _y.compute(j))
    251251                return false;
    252252        return true;
    253253    }
     
    268268
    269269    friend struct detail::subtract_with_carry_discard;
    270270
    271     IntType do_update(std::size_t current, std::size_t short_index, IntType carry)
     271    IntType do_update(std::size_t current, std::size_t short_index, IntType _carry)
    272272    {
    273273        IntType delta;
    274         IntType temp = x[current] + carry;
     274        IntType temp = x[current] + _carry;
    275275        if (x[short_index] >= temp) {
    276276            // x(n) >= 0
    277277            delta =  x[short_index] - temp;
    278             carry = 0;
     278            _carry = 0;
    279279        } else {
    280280            // x(n) < 0
    281281            delta = modulus - temp + x[short_index];
    282             carry = 1;
     282            _carry = 1;
    283283        }
    284284        x[current] = delta;
    285         return carry;
     285        return _carry;
    286286    }
    287287    /// \endcond
    288288
     
    478478    }
    479479
    480480    /** Returns true if the two generators will produce identical sequences. */
    481     BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(subtract_with_carry_01_engine, x, y)
     481    BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(subtract_with_carry_01_engine, _x, _y)
    482482    {
    483483        for(unsigned int j = 0; j < r; ++j)
    484             if(x.compute(j) != y.compute(j))
     484            if(_x.compute(j) != _y.compute(j))
    485485                return false;
    486486        return true;
    487487    }
     
    498498
    499499    friend struct detail::subtract_with_carry_discard;
    500500
    501     RealType do_update(std::size_t current, std::size_t short_index, RealType carry)
     501    RealType do_update(std::size_t current, std::size_t short_index, RealType _carry)
    502502    {
    503         RealType delta = x[short_index] - x[current] - carry;
     503        RealType delta = x[short_index] - x[current] - _carry;
    504504        if(delta < 0) {
    505505            delta += RealType(1);
    506             carry = RealType(1)/_modulus;
     506            _carry = RealType(1)/_modulus;
    507507        } else {
    508             carry = 0;
     508            _carry = 0;
    509509        }
    510510        x[current] = delta;
    511         return carry;
     511        return _carry;
    512512    }
    513513    /// \endcond
    514514    std::size_t k;