fill |
Set every item in a range to a particular value.
Assign value
to each element in the range [ first ...
last ). Return an iterator equal to result +
n where n =
last - first
.
#include <algorithm>
template< class ForwardIterator, class T >
void fill
(
ForwardIterator first,
ForwardIterator last,
const T& value
);
Time complexity is linear as (
last - first )
assignments are performed. Space complexity is constant.
Copyright©1994-2026 Recursion Software LLC
All Rights Reserved - For use by licensed users only.