#include <iterator>
#include <numeric>
#include <iostream>

class Example
{
private:
  int id;
public:
  Example(int i=0): id(i){std::cout<<"ctor: "<<i<<std::endl;}
  ~Example(){std::cout<<"dtor: "<<id<<std::endl;}
};

int main() {
    Example e[10];
    std::cout<<"call iota"<<std::endl;
    std::iota(std::begin(e), std::end(e), 0);
    std::cout<<"call iota finished"<<std::endl;
    return 0;
}  