Copy-constructs elements of an iterated output sequence of a given size using a copy of a supplied value.
- Template Parameters
-
ForwardIterator | An output forward iterator used to iterate over a sequence of uninitialized memory buffers, in which the function constructs copies of value . |
T | A type of the value used to copy-construct all elements of the output sequence. |
- Parameters
-
start | An iterator associated with the first buffer to hold a copy-constructed element. |
size | A number of elements to initialize in the output sequence. |
value | A sample to parameterize all invocations of copy-constructors to produce elements of the output sequence. |
- Exceptions
-
Any | exceptions thrown as a result of invoking copy-construction to initialized the output sequence of elements. |
The function does not invoke any destructors or assignment operators discarding prior contents of the output memory. To replace existing elements with copies of value
rather than construct new elements in uninitialized space, use the fill_n function.