mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-29 19:07:15 +02:00
added stats to the rest of open-addressing containers
This commit is contained in:
@ -72,6 +72,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_set() : unordered_flat_set(0) {}
|
||||
|
||||
explicit unordered_flat_set(size_type n, hasher const& h = hasher(),
|
||||
@ -474,6 +478,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
|
||||
///
|
||||
|
||||
|
@ -115,6 +115,10 @@ namespace boost {
|
||||
using insert_return_type =
|
||||
detail::foa::insert_return_type<iterator, node_type>;
|
||||
|
||||
#if defined(BOOST_UNORDERED_ENABLE_STATS)
|
||||
using stats = typename table_type::stats;
|
||||
#endif
|
||||
|
||||
unordered_node_map() : unordered_node_map(0) {}
|
||||
|
||||
explicit unordered_node_map(size_type n, hasher const& h = hasher(),
|
||||
@ -749,6 +753,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
|
||||
///
|
||||
|
||||
|
@ -105,6 +105,10 @@ namespace boost {
|
||||
using insert_return_type =
|
||||
detail::foa::insert_return_type<iterator, node_type>;
|
||||
|
||||
#if defined(BOOST_UNORDERED_ENABLE_STATS)
|
||||
using stats = typename table_type::stats;
|
||||
#endif
|
||||
|
||||
unordered_node_set() : unordered_node_set(0) {}
|
||||
|
||||
explicit unordered_node_set(size_type n, hasher const& h = hasher(),
|
||||
@ -563,6 +567,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