Open rr-mark opened 11 months ago
Some other std::vector operations fail in the same way, including
std::iter_swap(vec.begin(), vec.begin()+1);
This is likely a duplicate of https://github.com/jbeder/yaml-cpp/issues/721, and that issue is probably easier to test with.
I think this issue will be resolved by https://github.com/jbeder/yaml-cpp/pull/810
The following unit test fails
When
vec.erase(vec.begin())
is called, instead ofvec
containing names{"b", "c"}
, it instead contains names{"c", "c"}
.My guess is that this is something to do with aliasing rather than copying when the vector elements are moved. This is likely an issue with the move constructor or move assignment of the Node.
I am using libcpp-yaml0.6, as I am currently limited to Ubuntu 20.04.