initializer_list is wrapper (proxy) to allow passing arrays as curly braces. according to link, it can be used for class constructor to initialize class with arrays.

#include <initializer_list>
#include <iostream>
using namespace std;

class cls
{
public:
    void func(std::initializer_list<int> ins)
    {
        for (auto in : ins)
            cout << in << endl;
    }
};

int main()
{
    cls c;
    c.func({1, 2, 3});
    return 0;
}