#include <iostream>
#include <vector>
struct S {
//std::vector<int> ns(1); //ERROR!
std::vector<int> ns = std::vector<int>(1);
};
int main() {
S s;
std::cout << (s.ns[0] = 123) << std::endl;
return 0;
}
Using the parentheses initializer seems to be an error. What is the purpose behind this.