J
jfindlay
Is it possible to populate a container with an initializer list? I am
not too particular about how hackish or ugly any suggestions might be,
I'm simply interested in investigating possible elegancies (or
perversities) for an initializer list.
const container<double> array = mitigating_struct<double>() = {pi, e,
phi, gamma, 0.0042};
// container is magically filled with initalizer list members
Of course, something without an explicit temporary would be more ideal,
but perhaps beyond the realm of C++.
Justin
not too particular about how hackish or ugly any suggestions might be,
I'm simply interested in investigating possible elegancies (or
perversities) for an initializer list.
const container<double> array = mitigating_struct<double>() = {pi, e,
phi, gamma, 0.0042};
// container is magically filled with initalizer list members
Of course, something without an explicit temporary would be more ideal,
but perhaps beyond the realm of C++.
Justin