__GNU_PBDS::LU_COUNTER_POLICY(3cxx)

πŸ’– NAME πŸ’–

okay so bestie, we're in the 3cxx manual, and the page header is the extremely truncated __gnu_pbds::lu_...Count, _Alloc >(3cxx) β€” it literally prints that same truncated title twice, no cap 😭. The actual main character is __gnu_pbds::lu_counter_policy< Max_Count, _Alloc >.

✨ SYNOPSIS ✨

#include <list_update_policy.hpp>

Inherits __gnu_pbds::detail::lu_counter_policy_base< _Alloc::size_type >.

🌸 Public Types 🌸

  • enum { max_count }
  • typedef _Alloc allocator_type
  • typedef detail::rebind_traits< _Alloc, metadata_type >::reference metadata_reference β€” the reference type for the metadata this functor operates on.
  • typedef detail::lu_counter_metadata< size_type > metadata_type β€” the metadata type this functor operates on.
  • typedef allocator_type::size_type size_type

🫢 Public Member Functions 🫢

  • metadata_type operator() () const β€” creates a metadata object.
  • bool operator() (metadata_reference r_data) const β€” decides whether a metadata object should be moved to the front of the list.

πŸ™ˆ Private Member Functions πŸ™ˆ

  • bool operator() (Metadata_Reference r_data, size_type m_max_count) const
  • lu_counter_metadata< size_type > operator() (size_type max_size) const

πŸ‘‘ Detailed Description πŸ‘‘

template<std::size_t Max_Count = 5, typename _Alloc = std::allocator<char>>
class __gnu_pbds::lu_counter_policy< Max_Count, _Alloc >

The class describes itself as: β€œA list-update policy that moves elements to the front of the list based on the counter algorithm.”

πŸŽ€ Member Typedef Documentation πŸŽ€

template<std::size_t Max_Count = 5, typename _Alloc  = std::allocator<char>>
  • typedef detail::rebind_traits<_Alloc,metadata_type>::reference __gnu_pbds::lu_counter_policy< Max_Count, _Alloc >::metadata_reference β€” the reference type pointing at the metadata this functor operates on.
  • typedef detail::lu_counter_metadata<size_type> __gnu_pbds::lu_counter_policy< Max_Count, _Alloc >::metadata_type β€” the metadata type this functor operates on.

⭐ Member Enumeration Documentation ⭐

template<std::size_t Max_Count = 5, typename _Alloc  = std::allocator<char>>
anonymous enum
  • max_count β€” when some element gets accessed this number of times, it will be moved to the front of the list.

πŸ”₯ Member Function Documentation πŸ”₯

πŸ’… operator() () const

template<std::size_t Max_Count = 5, typename _Alloc  = std::allocator<char>>
metadata_type __gnu_pbds::lu_counter_policy< Max_Count, _Alloc >::operator() () const [inline]

Creates a metadata object.

References __gnu_pbds::lu_counter_policy< Max_Count, _Alloc >::max_count.

πŸ’… operator() (metadata_reference r_data) const

template<std::size_t Max_Count = 5, typename _Alloc  = std::allocator<char>>
bool __gnu_pbds::lu_counter_policy< Max_Count, _Alloc >::operator() (metadata_reference r_data) const [inline]

Decides whether a metadata object should be moved to the front of the list.

References __gnu_pbds::lu_counter_policy< Max_Count, _Alloc >::max_count.

πŸ’œ Author πŸ’œ

Generated automatically by Doxygen for libstdc++ from the source code.


and that's the sign-off, bestie 🫢 the footer is the truncated libst__gnu_pbds::lu_...Count, _Alloc >(3cxx) line. Source/version is libstdc++, generated from the source code, and there's no date printed on the footer β€” so I'm not inventing one 😭. Byeeee πŸ¦‹