mirror of
https://github.com/boostorg/unordered.git
synced 2025-05-11 21:44:01 +00:00
added stats to boost::unordered_flat_map
This commit is contained in:
parent
e712c37e9f
commit
05b66e1034
@ -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
|
||||
///
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user