Did you already try using the new initialization syntax with STL containers?
vector<string> va {"three", "element", "vector"};
vector<string> vb {"vector"};
vector<string> vc {};
This works as you might have expected:
assert (va.size() == 3); assert (vb.size() == 1); assert (vc.size() == 0);
The above initialization works because the constructs use the new initializer-list constructor. Well, not really… Continue reading
