I am wrapping a C++ fn of the form
foo(input, std::initializer_list<Option> options);
I need to construct a list of options from data in another format, and pass them into foo. I can't see a way of constructing a std::initializer_list programmatically – is this right? (It would make sense if one was forced to use a more standard container, but I would like to check before re-factoring.)
std::initializer_list<int> list{1,2,3};what did you try?