In following example (C++):
FIX::Group grp2(92, 93, FIX::message_order(93, 95, 94, 0));
grp2.setField(93, "Original");
grp2.setField(94, "BBB");
grp2.setField(95, "AAA");
std::string lctmp;
cout << "Original: " << grp2.calculateString(lctmp) << '\n';
FIX::Group lc(grp2);
lc.setField(93, "Copy");
cout << "Copy: " << lc.calculateString(lctmp) << '\n';
the expected output would be
Original:92=1 93=Original 95=AAA 94=BBB
Copy: 92=1 93=Copy 95=AAA 94=BBB
Please refer to the order 95<94. If you run the code the copy looks like
Copy: 92=1 93=Copy 94=BBB 95=AAA
It looks like that the assignment FIX::Group lc(grp2) doesn't work as
expected. Field/delim are correctly copied, but message_order is lost
somehow in the copy assignment.
Is there a way to copy a group?
Thanks, Robert
|