One main and obvious meaning, found in the standard library - "initializing a collection with a list of its elements":
std::vector<int> v = {1, 2, 3};
Another meaning can be found behind the link on std::bitset below - "the single value is assembled from elements of initializer_list".
The third example in the standard library is std::piecewise_constant_distribution, but I hesitate to say what semantic it has, not exactly a collection of elements.
What are other use cases for std::initializer_list constructors? If possible, with examples from real code.
It's actually a question about class design.
Because of some pecularities of list-initialization adding an std::initializer_list constructor to already existing class can easily an surprisingly be a breaking change, so when writing a new class you should always know in advance if it will ever need an std::initializer_list constructor.
So, I'm trying to simulate the ability to see the future by writing out use cases for std::initializer_list constructors.
The primary question is: How do I determine that my class will probably have (not surprising for users) std::initializer_list constructors in the future to write correct non-std::initializer_list constructors now?