uninitialized_fill

Prototype

Description

In C++, the operator new allocates memory for an object and then
creates an object at that location by calling a constructor. Occasionally,
however, it is useful to separate those two operations. [1] If each iterator
in the range [first, last) points to uninitialized
memory, then uninitialized_fill creates copies of x
in that range. That is, for each iterator i in the range [first, last),
uninitialized_fill creates a copy of x in
the location pointed to i by calling construct(&*i, x).

Definition

Defined in the standard header memory, and in the nonstandard
backward-compatibility header algo.h.