mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-30 03:17:15 +02:00
added stats to boost::unordered_flat_map
This commit is contained in:
@ -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
|
||||
///
|
||||
|
||||
|
Reference in New Issue
Block a user