Date
2016-10-08.04:58:13
Message id
8546

Content

Proposed resolution:

This wording is relative to N4606.

  1. Change [string.copy] as indicated:

    size_type copy(charT* s, size_type n, size_type pos = 0) const;
    

    -?- Let rlen be the smaller of n and size() - pos.

    -2- Throws: out_of_range if pos > size().

    -?- Requires: [s, s + rlen) is a valid range.

    -3- Effects: Determines the effective length rlen of the string to copy as the smaller of n and size() - pos. s shall designate an array of at least rlen elements.Equivalent to: traits::copy(s, data() + pos, rlen). [Note: This does not terminate s with a null object. — end note]

    The function then replaces the string designated by s with a string of length rlen whose elements are a copy of the string controlled by *this beginning at position pos.

    The function does not append a null object to the string designated by s.

    -4- Returns: rlen.

  2. Change [string.view.ops] as indicated:

    size_type copy(charT* s, size_type n, size_type pos = 0) const;
    

    -1- Let rlen be the smaller of n and size() - pos.

    -2- Throws: out_of_range if pos > size().

    -3- Requires: [s, s + rlen) is a valid range.

    -4- Effects: Equivalent to: copy_n(begin() + pos, rlen, s)traits::copy(s, data() + pos, rlen)

    -5- Returns: rlen.

    -6- Complexity: 𝒪(rlen).