__GNU_PBDS::LU_MOVE_TO_FRONT_POLICY(3cxx)

okay so bestie, welcome to the 3cxx manual page for __gnu_pbds::lu_move_to_front_policy< _Alloc > β€” yes, the whole title is a mouthful, and yes, it's iconic. πŸ’…

πŸ’– NAME πŸ’–

__gnu_pbds::lu_move_to_front_policy< _Alloc > β€” that's the name, no cap.

✨ SYNOPSIS ✨

First thing's first, include this header:

#include <list_update_policy.hpp

Then you get the public types and public member functions, and they're lowkey the whole vibe.

🌸 Public Types 🌸

  • typedef _Alloc allocator_type β€” the allocator type. It's giving "bring your own allocator, slay."
  • typedef detail::rebind_traits< _Alloc, metadata_type >::reference metadata_reference β€” a reference to metadata on which this functor operates. 🫢
  • typedef null_type metadata_type β€” metadata on which this functor operates. Yes, the metadata type is literally null_type.

πŸŽ€ Public Member Functions πŸŽ€

  • metadata_type operator() () const β€” creates a metadata object. Cute, simple, done.
  • bool operator() (metadata_reference r_metadata) const β€” decides whether a metadata object should be moved to the front of the list. The drama of it all.

πŸ¦‹ Detailed Description πŸ¦‹

Here's the big template energy:

template<typename _Alloc = std::allocator<char>>
class __gnu_pbds::lu_move_to_front_policy< _Alloc >

And the description is literally: "A list-update policy that unconditionally moves elements to the front of the list. A null type means that each link in a list-based container does not actually need metadata."

So yeah β€” unconditionally. It does not ask questions. It does not do a vibe check. It moves elements to the front, periodt. And the null type situation means each link in a list-based container does not actually need metadata. ✨

🌈 Member Typedef Documentation 🌈

  • metadata_reference β€” here's the exact typedef:
template<typename _Alloc  = std::allocator<char>> typedef
detail::rebind_traits<_Alloc,metadata_type>::reference
__gnu_pbds::lu_move_to_front_policy< _Alloc >::metadata_reference

It's a reference to metadata on which this functor operates. Obsessed with a clear reference type, honestly. πŸŽ€

  • metadata_type β€” and the exact typedef for this one:
template<typename _Alloc  = std::allocator<char>> typedef null_type
__gnu_pbds::lu_move_to_front_policy< _Alloc >::metadata_type

It's the metadata on which this functor operates. Short, sweet, and null-type coded. πŸ¦‹

πŸ“ Member Function Documentation πŸ“

  • operator() () const β€” the no-argument version:
template<typename _Alloc  = std::allocator<char>> metadata_type
__gnu_pbds::lu_move_to_front_policy< _Alloc >::operator() () const

[inline] β€” creates a metadata object. It's a little factory moment. πŸ’–

  • operator() (metadata_reference r_metadata) const β€” the decision-making version:
template<typename _Alloc  = std::allocator<char>> bool
__gnu_pbds::lu_move_to_front_policy< _Alloc >::operator()
(metadata_reference r_metadata) const

[inline] β€” decides whether a metadata object should be moved to the front of the list. Main character behavior, fr fr. πŸ‘‘

πŸ‘‘ Author πŸ‘‘

The author section is literally:

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

So it's a Doxygen-generated baddie. We respect the automation. πŸ’…


Bye bestie 🫢 β€” this page was generated automatically by Doxygen for libstdc++ from the source code, and it's serving manual-section 3cxx energy. The footer stamp reads libstd__gnu_pbds::lu...olicy< _Alloc >(3cxx); no separate date was shown in this copy. Slay, and stay hydrated. 🌈✨