martinus / unordered_dense

A fast & densely stored hashmap and hashset based on robin-hood backward shift deletion
MIT License
898 stars 72 forks source link

[BUG] Copy constructor fails to compile when using custom container #39

Closed antoine-fresse closed 2 years ago

antoine-fresse commented 2 years ago

Hello, I was experimenting with the custom container feature and encountered a bug. The copy constructor fails to compile when specifying a custom container for the AllocatorOrContainer template parameter Here is a simple repro case : https://godbolt.org/z/619WbTqxs

Thank you !

martinus commented 2 years ago

Hi, thanks for the reproducer! I'll have a look what's wrong

martinus commented 2 years ago

Can you give this a try if it works for you? https://raw.githubusercontent.com/martinus/unordered_dense/2022-10-fix-custom-allocator-api/include/ankerl/unordered_dense.h

antoine-fresse commented 2 years ago

Yes it compiles now, thank you !

martinus commented 2 years ago

fixed by #40

martinus commented 2 years ago

I released v2.0.0 with that fix https://github.com/martinus/unordered_dense/releases/tag/v2.0.0