Demonstrates usage of the make_generating_input_iterator function.
#include <vector>
#include <iterator>
std::vector<unsigned> fill_generate(std::size_t count)
{
std::vector<unsigned> v;
unsigned val = 0;
return v;
}
#include <iostream>
int main(int argc, char** argv)
{
auto v = fill_generate(10);
for (const auto& elem:v)
std::cout << elem << ' ';
std::cout << '\n';
return 0;
}
Advanced functionality and C++ objects for working with memory.
auto make_generating_input_iterator(GeneratingFunctor generator)
A helper function used to create a generating iterator of type generating_input_iterator with deducti...
Definition: chsvmemex.h:833
OutputIterator copy_n(InputIterator input, std::size_t size, OutputIterator output) noexcept(std::is_nothrow_copy_assignable< typename std::iterator_traits< OutputIterator >::value_type >::value)
Copy-assigns a given number of elements starting from one referred to by an input iterator to a place...
Definition: chsvmemex.h:2291
A namespace of functions and components used to work with memory.
Definition: chsvmem.h:71