mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-30 11:27:15 +02:00
Move index functions into place
This commit is contained in:
@ -707,10 +707,6 @@ template <class K, class T, class H, class P, class A> class unordered_map
|
|||||||
hasher hash_function() const;
|
hasher hash_function() const;
|
||||||
key_equal key_eq() const;
|
key_equal key_eq() const;
|
||||||
|
|
||||||
mapped_type& operator[](const key_type&);
|
|
||||||
mapped_type& at(const key_type&);
|
|
||||||
mapped_type const& at(const key_type&) const;
|
|
||||||
|
|
||||||
// lookup
|
// lookup
|
||||||
|
|
||||||
iterator find(const key_type&);
|
iterator find(const key_type&);
|
||||||
@ -732,6 +728,10 @@ template <class K, class T, class H, class P, class A> class unordered_map
|
|||||||
std::pair<const_iterator, const_iterator> equal_range(
|
std::pair<const_iterator, const_iterator> equal_range(
|
||||||
const key_type&) const;
|
const key_type&) const;
|
||||||
|
|
||||||
|
mapped_type& operator[](const key_type&);
|
||||||
|
mapped_type& at(const key_type&);
|
||||||
|
mapped_type const& at(const key_type&) const;
|
||||||
|
|
||||||
// bucket interface
|
// bucket interface
|
||||||
|
|
||||||
size_type bucket_count() const BOOST_NOEXCEPT
|
size_type bucket_count() const BOOST_NOEXCEPT
|
||||||
@ -1563,27 +1563,6 @@ unordered_map<K, T, H, P, A>::key_eq() const
|
|||||||
return table_.key_eq();
|
return table_.key_eq();
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class K, class T, class H, class P, class A>
|
|
||||||
typename unordered_map<K, T, H, P, A>::mapped_type&
|
|
||||||
unordered_map<K, T, H, P, A>::operator[](const key_type& k)
|
|
||||||
{
|
|
||||||
return table_.try_emplace_impl(k).first->second;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class K, class T, class H, class P, class A>
|
|
||||||
typename unordered_map<K, T, H, P, A>::mapped_type&
|
|
||||||
unordered_map<K, T, H, P, A>::at(const key_type& k)
|
|
||||||
{
|
|
||||||
return table_.at(k).second;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class K, class T, class H, class P, class A>
|
|
||||||
typename unordered_map<K, T, H, P, A>::mapped_type const&
|
|
||||||
unordered_map<K, T, H, P, A>::at(const key_type& k) const
|
|
||||||
{
|
|
||||||
return table_.at(k).second;
|
|
||||||
}
|
|
||||||
|
|
||||||
// lookup
|
// lookup
|
||||||
|
|
||||||
template <class K, class T, class H, class P, class A>
|
template <class K, class T, class H, class P, class A>
|
||||||
@ -1641,6 +1620,27 @@ unordered_map<K, T, H, P, A>::equal_range(const key_type& k) const
|
|||||||
return table_.equal_range(k);
|
return table_.equal_range(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <class K, class T, class H, class P, class A>
|
||||||
|
typename unordered_map<K, T, H, P, A>::mapped_type&
|
||||||
|
unordered_map<K, T, H, P, A>::operator[](const key_type& k)
|
||||||
|
{
|
||||||
|
return table_.try_emplace_impl(k).first->second;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class K, class T, class H, class P, class A>
|
||||||
|
typename unordered_map<K, T, H, P, A>::mapped_type&
|
||||||
|
unordered_map<K, T, H, P, A>::at(const key_type& k)
|
||||||
|
{
|
||||||
|
return table_.at(k).second;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class K, class T, class H, class P, class A>
|
||||||
|
typename unordered_map<K, T, H, P, A>::mapped_type const&
|
||||||
|
unordered_map<K, T, H, P, A>::at(const key_type& k) const
|
||||||
|
{
|
||||||
|
return table_.at(k).second;
|
||||||
|
}
|
||||||
|
|
||||||
template <class K, class T, class H, class P, class A>
|
template <class K, class T, class H, class P, class A>
|
||||||
typename unordered_map<K, T, H, P, A>::size_type
|
typename unordered_map<K, T, H, P, A>::size_type
|
||||||
unordered_map<K, T, H, P, A>::bucket_size(size_type n) const
|
unordered_map<K, T, H, P, A>::bucket_size(size_type n) const
|
||||||
|
Reference in New Issue
Block a user