Why can an aggreggate struct be brace-initialized, but not emplaced using the same list of arguments as in the brace initialization?
问题 It seems like this code: #include <string> #include <vector> struct bla { std::string a; int b; }; int main() { std::vector<bla> v; v.emplace_back("string", 42); } could be made to work properly in this case, but it doesn't (and I understand why). Giving bla a constructor solves this, but removes the aggregateness of the type, which can have far-reaching consequences. Is this an oversight in the Standard? Or am I missing certain cases where this will blow up in my face, or is it just not as