Consider the following:
struct mystruct { int i; int j; }; int main(int argc, char* argv[]) { mystruct foo{45, foo.i}; std::cout <<
how can I get the initial behavior (if it was well-defined behavior) with a user-defined constructor?
Passing parameter by reference for that parameter which refers to previously initialized parameter of being constructed object, as follows:
mystruct(int i, int& j):i(i),j(j)