| Home | Libraries | People | FAQ | More

##### overwrite

###### Prototype

    template<
        class SinglePassRange1,
        class SinglePassRange2
        >
    void overwrite(const SinglePassRange1& from,
                   SinglePassRange2& to);

###### Description

`overwrite` assigns the values from the range `from` into the range `to`.

###### Definition

Defined in the header file `boost/range/algorithm_ext/overwrite.hpp`

###### Requirements

1. `SinglePassRange1` is a model of the Single Pass Range Concept.
2. `SinglePassRange2` is a model of the Single Pass Range Concept.
3. `SinglePassRange2` is mutable.
4. `distance(SinglePassRange1) <= distance(SinglePassRange2)`
5. `SinglePassRange1`'s value type is convertible to `SinglePassRange2`'s value type.

###### Complexity

Linear. `distance(rng1)` assignments are performed.