AppLayerLabs / bdk-cpp

MIT License
7 stars 12 forks source link

Add custom iterators to SafeUnorderedMap #98

Closed fcecin closed 6 months ago

fcecin commented 6 months ago

This patch hides the std::unordered_map iterators that were exposed, and replaces them with new SafeUnorderedMap::iterator and SafeUnorderedMap::const_iterator.

As part of the proposed changes, some SafeUnorderedMap methods had to be removed. We can re-implement them later without exposing internal details, if it turns out that we will be needing them.

Added tests for the new features, and also some additional tests to make sure all of the insert/emplace/erase methods from the template type get instantiated at least once.