added stats to boost::unordered_flat_map

This commit is contained in:
joaquintides 2024-04-28 18:44:40 +02:00
parent e712c37e9f
commit 05b66e1034

View File

@ -76,6 +76,10 @@ namespace boost {
using iterator = typename table_type::iterator;
using const_iterator = typename table_type::const_iterator;
#if defined(BOOST_UNORDERED_ENABLE_STATS)
using stats = typename table_type::stats;
#endif
unordered_flat_map() : unordered_flat_map(0) {}
explicit unordered_flat_map(size_type n, hasher const& h = hasher(),
@ -654,6 +658,15 @@ namespace boost {
void reserve(size_type n) { table_.reserve(n); }
#if defined(BOOST_UNORDERED_ENABLE_STATS)
/// Stats
///
stats get_stats() const { return table_.get_stats(); }
void reset_stats() { table_.reset_stats(); }
#endif
/// Observers
///