Everyone creates std::vector
from std::initializer_list
, but what about the other way around?
eg. if you use a std::initializer_list
Apparently no, it is not possible. There is no such constructor (and I believe for good reasons), std::initializer_list
is a weird creature.
What you could do instead is to change someThing()
to accept a pair of iterators. In that way you get what you want, provided you can change the signature of that function (it isn't in a third party library, etc).