I am trying to declare an iterator of type `std::initializer_list` as it is described in [this answer](https://stackoverflow.com/questions/643617/passing-a-list-of-numbers-to-a-function-in-c-without-building-array-first/643668#643668).

But I always get this error:

```
error: 'iterator' is not a member of 'std::initializer_list<int>'

```

How do I declare an iterator of type `std::initializer_list`?

The following code for example will not work. In addition, the compiler that I use supports the new standard draft.

```
int findCommon(std::initializer_list<int> nums)
{
    std::initializer_list<int>::iterator it;
    for (it = nums.begin() ; it != nums.end() ; ++it)
    {
        std::cout << *it << std::endl;
    }
    return 1;
}

```