mattreecebentley / plf_colony

An unordered C++ data container providing fast iteration/insertion/erasure while maintaining pointer/iterator validity to non-erased elements regardless of insertions/erasures. Provides higher-performance than std:: library containers for high-modification scenarios with unordered data.
https://plflib.org/colony.htm
zlib License
398 stars 33 forks source link

move-insert does not move in some cases #38

Closed mikezackles closed 3 years ago

mikezackles commented 3 years ago

Hi, I have been looking forward to trying out your library! Unfortunately I immediately ran into an issue which at first glance seems like a bug.

Several lines in the the move-insert code look like this: https://github.com/mattreecebentley/plf_colony/blob/abd54bdafb85f0a167635793c04950f7b8a798ea/plf_colony.h#L2340 So it seems they try to copy instead of move, which breaks with move-only types.

I may be misunderstanding things as I just started playing with the library, so apologies if I'm mistaken. I've (hopefully) fixed things in my fork so that I can keep experimenting, so I'll go ahead and submit a pull request.

Thanks!

mattreecebentley commented 3 years ago

Yes sorry, this is a bug. I don't know how that slipped through. at any rate, will be uploading a new version today/tomorrow witht eh bug fixed and some other stuff. thanks for pointing it out.

mikezackles commented 3 years ago

Great, thanks! I will close the pull request then.