__gnu_pbds...ate_policy(3)

πŸ“¦
version 16.2.1+r23+gd564253eb6c8 Β· 6 versions
, in arch rolling, fedora 44

πŸ’– __gnu_pbds::sample_update_policy πŸ’–

okay bestie, welcome to the Library Functions Manual β€” yes this is a real manpage, yes it's from libstdc++, and yes we're gonna get through it together. this one's about a lil class called sample_update_policy. it's a sample list-update policy. that's the whole vibe. let's go πŸ¦‹


✨ NAME ✨

__gnu_pbds::sample_update_policy β€” a sample list-update policy, periodt.


✨ SYNOPSIS ✨

#include <sample_update_policy.hpp>

🌸 Public Member Functions

  • sample_update_policy() β€” default constructor, no thoughts, just vibes.
  • sample_update_policy(const sample_update_policy &) β€” copy constructor, it's giving "twin where have you been".
  • void swap(sample_update_policy &other) β€” swaps content. trading places, lowkey iconic.

🌸 Protected Types

  • typedef some_metadata_type metadata_type β€” the metadata that this functor operates on. protected, so it's iykyk only.

🌸 Protected Member Functions

  • metadata_type operator()() const β€” creates a metadata object. baby metadata born.
  • bool operator()(metadata_reference) const β€” decides whether a metadata object should be moved to the front of the list. a list-update based containers object will call this method to decide whether to move a node to the front of the list. the method shoule return true if the node should be moved to the front of the list. (yes bestie, "shoule" β€” that's what it says, I don't make the rules πŸ’€)

✨ Detailed Description ✨

A sample list-update policy. that's it. that's the whole description. short queen. πŸ‘‘


✨ Member Typedef Documentation ✨

πŸ’œ typedef some_metadata_type __gnu_pbds::sample_update_policy::metadata_type

[protected]

Metadata on which this functor operates. it's protected so don't go poking at it from outside, we respect boundaries in this house 🫢


✨ Constructor & Destructor Documentation ✨

πŸ’œ __gnu_pbds::sample_update_policy::sample_update_policy()

Default constructor.

Referenced by sample_update_policy(), and swap(). so it's out here being referenced by itself and by swap() β€” main character energy fr fr ✨

πŸ’œ __gnu_pbds::sample_update_policy::sample_update_policy(const sample_update_policy &)

Copy constructor.

References sample_update_policy(). it literally references its own default constructor, that's so self-aware of it πŸ’…


✨ Member Function Documentation ✨

πŸ’œ metadata_type __gnu_pbds::sample_update_policy::operator()() const

[protected]

Creates a metadata object. that's the job. one job. does it well. 🌟

πŸ’œ bool __gnu_pbds::sample_update_policy::operator()(metadata_reference) const

[protected]

Decides whether a metadata object should be moved to the front of the list. A list-update based containers object will call this method to decide whether to move a node to the front of the list. The method shoule return true if the node should be moved to the front of the list.

so real talk: you get handed a metadata_reference, you look at it, and you go "bestie... front of the list? yes or no?" return true and the node gets bumped to the front. return not-true and it stays where it is. that's the whole decision-making arc. no cap. πŸ”₯

πŸ’œ void __gnu_pbds::sample_update_policy::swap(sample_update_policy &other)

[inline]

Swaps content.

References sample_update_policy(). inline, because it's efficient like that. slay.


✨ Author ✨

Generated automatically by Doxygen for libstdc++ from the source code. not a human, just a robot doing its little documentation dance πŸ€–βœ¨


heads up bestie: this whole page is auto-generated by Doxygen, so don't @ the author about typos β€” there isn't one, there's a robot. πŸ™ˆ

and that's the page!! πŸŽ€ this was __gnu_pbds...ate_policy(3) from the Library Functions Manual, brought to you by libstdc++ β€” mwah, love u, go read some more manpages, you're doing amazing sweetie πŸ’–πŸŒˆβ­

πŸ“¦ where this page comes from
  • arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
  • fedora 44: libstdc++-docs 16.0.1-0.10.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • fedora 44: libstdc++-docs 16.2.1-2.fc44
  • fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms