#include <iterator>
#include <numeric>
class Example
{
private:
  int id;
public:
  Example(int i): id(i){}
};

int main() {
    Example e[10];
    std::iota(std::begin(e), std::end(e), 0);
    return 0;
}  