You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When vec.erase(vec.begin()) is called, instead of vec 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.
The text was updated successfully, but these errors were encountered:
This is likely a duplicate of #721, and that issue is probably easier to test with.
rr-mark
changed the title
YAML::Node is incompatible with std::vector::erase
YAML::Nodes alias rather than moving when using std::vector::erase, std::iter_swap and similar methods.
Aug 9, 2023
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.
The text was updated successfully, but these errors were encountered: