41 #ifndef PB_DS_LU_POLICY_HPP 42 #define PB_DS_LU_POLICY_HPP 57 template<
typename _Alloc = std::allocator<
char> >
61 typedef _Alloc allocator_type;
68 typedef typename detail::rebind_traits<_Alloc, metadata_type>::reference
74 {
return s_metadata; }
90 template<std::
size_t Max_Count = 5,
typename _Alloc = std::allocator<
char> >
95 typedef _Alloc allocator_type;
96 typedef typename allocator_type::size_type size_type;
113 typedef typename detail::rebind_traits<_Alloc, metadata_type>::reference
119 {
return base_type::operator()(
max_count); }
125 {
return base_type::operator()(r_data,
max_count); }
metadata_type operator()() const
Creates a metadata object.
metadata_type operator()() const
Creates a metadata object.
A list-update metadata type that moves elements to the front of the list based on the counter algorit...
detail::rebind_traits< _Alloc, metadata_type >::reference metadata_reference
Reference to metadata on which this functor operates.
Base class for list-update counter policy.
Represents no type, or absence of type, for template tricks.
When some element is accessed this number of times, it will be moved to the front of the list...
bool operator()(metadata_reference r_metadata) const
Decides whether a metadata object should be moved to the front of the list.
detail::lu_counter_metadata< size_type > metadata_type
Metadata on which this functor operates.
bool operator()(metadata_reference r_data) const
Decides whether a metadata object should be moved to the front of the list.
null_type metadata_type
Metadata on which this functor operates.
GNU extensions for policy-based data structures for public use.
detail::rebind_traits< _Alloc, metadata_type >::reference metadata_reference
Reference to metadata on which this functor operates.