copy constructor of symbols does not do a deep copy?
James Walker <[email protected]> Mon, 3 Apr 2023 13:50:47 -0700
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <[email protected]> |
If I run code like this
boost::spirit::qi::symbols<char, double> syms1;
boost::spirit::qi::symbols<char, double> syms2( syms1 );
syms1.at("x") = 0.0;
syms2.at("x") = 99.5;
std::cout << "In syms1, x=" << syms1.at("x") <<
" while in syms2, x=" << syms2.at("x") << std::endl;
I get the output "In syms1, x=99.5 while in syms2, x=99.5". Why didn't x stay at 0.0 in syms1?