Date
2010-10-21.18:28:33
Message id
2999

Content

Proposed resolution:

  1. Change [partial.sum]/1 as indicated:

    Effects: Let VT be InputIterator's value type. For a nonempty range, initializes an accumulator acc of type VT with *first and performs *result = acc. For every iterator i in [first + 1, last) in order, acc is then modified by acc = acc + *i or acc = binary_op(acc, *i) and is assigned to *(result + (i - first)). Assigns to every element referred to by iterator i in the range [result,result + (last - first)) a value correspondingly equal to

    
    ((...(*first + *(first + 1)) + ...) + *(first + (i - result)))
    

    or

    
    binary_op(binary_op(...,
       binary_op(*first, *(first + 1)),...), *(first + (i - result)))
    
  2. Change [partial.sum]/3 as indicated:

    Complexity: Exactly max((last - first) - 1, 0) applications of binary_opthe binary operation.

  3. Change [partial.sum]/4 as indicated:

    Requires: VT shall be constructible from the type of *first, the result of acc + *i or binary_op(acc, *i) shall be implicitly convertible to VT, and the result of the expression acc shall be writable to the result output iterator. In the ranges [first,last] and [result,result + (last - first)] [..]

  4. Change [adjacent.difference]/1 as indicated:

    Effects: Let VT be InputIterator's value type. For a nonempty range, initializes an accumulator acc of type VT with *first and performs *result = acc. For every iterator i in [first + 1, last) in order, initializes a value val of type VT with *i, assigns the result of val - acc or binary_op(val, acc) to *(result + (i - first)) and modifies acc = std::move(val). Assigns to every element referred to by iterator i in the range [result + 1, result + (last - first)) a value correspondingly equal to

    
    *(first + (i - result)) - *(first + (i - result) - 1)
    

    or

    
    binary_op(*(first + (i - result)), *(first + (i - result) - 1)).
    

    result gets the value of *first.

  5. Change [adjacent.difference]/2 as indicated:

    Requires: VT shall be MoveAssignable ([moveassignable]) and shall be constructible from the type of *first. The result of the expression acc and the result of the expression val - acc or binary_op(val, acc) shall be writable to the result output iterator. In the ranges [first,last] [..]

  6. Change [adjacent.difference]/5 as indicated:

    Complexity: Exactly max((last - first) - 1, 0) applications of binary_opthe binary operation.