__GNU_PBDS::DETAIL::SYNTH_ACCESS_TRAITS(3cxx)

πŸ’… NAME

okay so welcome to __gnu_pbds::detail::synth_access_traits< Type_Traits, Set, _ATraits > β€” it's the Synthetic element access traits, and yes bestie, this is one of those template-y little guys that does a lot of quiet heavy lifting. This page is from the 3cxx manual, part of libstdc++. 🫢


✨ SYNOPSIS

first things first, pull it in with:

#include <synth_access_traits.hpp>

and heads up: this struct inherits _ATraits β€” it's literally built on top of it, no cap. πŸ¦‹

πŸŽ€ Public Types

  • base_type β€” typedef _ATraits base_type β€” the parent traits type, renamed so everything reads cute.
  • const_iterator β€” typedef base_type::const_iterator const_iterator β€” the const iterator, straight borrowed from base_type.
  • const_reference β€” typedef type_traits::const_reference const_reference β€” const reference type, courtesy of type_traits.
  • key_const_reference β€” typedef type_traits::key_const_reference key_const_reference β€” const reference to a key, also from type_traits.
  • type_traits β€” typedef Type_Traits type_traits β€” the Type_Traits template parameter, wearing a lowercase name. πŸ’œ

🌸 Public Member Functions

  • synth_access_traits (const base_type &) β€” constructor that takes a const base_type &. that's it, that's the whole vibe.
  • bool cmp_keys (key_const_reference, key_const_reference) const β€” compares two keys, returns bool. πŸ”₯
  • bool cmp_prefixes (const_iterator, const_iterator, const_iterator, const_iterator, bool compare_after=false) const β€” compares a pair of prefix ranges, with an optional bool compare_after that defaults to false. note that default, bestie, it's false here. πŸ‘€
  • bool equal_keys (key_const_reference, key_const_reference) const β€” are the two keys equal? returns bool. simple, iconic.
  • bool equal_prefixes (const_iterator, const_iterator, const_iterator, const_iterator, bool compare_after=true) const β€” checks whether prefixes are equal, with bool compare_after defaulting to true. ⚠️ highkey different default from cmp_prefixes β€” true here, false there. do not mix them up, i'm begging.

⭐ Static Public Member Functions

  • static key_const_reference extract_key (const_reference) β€” static, so you don't need an instance to pull the key out of a reference. slay. ✨

🌈 Detailed Description

the actual declaration, in all its glory:

template<typename Type_Traits, bool Set, typename _ATraits>
    struct __gnu_pbds::detail::synth_access_traits< Type_Traits, Set, _ATraits >

Synthetic element access traits. that's the whole description. it's giving "synthetic", it's giving "element access traits", it's giving exactly what it says on the tin. πŸŽ€

template parameters to keep straight: Type_Traits, bool Set, and _ATraits. three of them. don't lose one. πŸ’€

πŸ‘‘ Author

Generated automatically by Doxygen for libstdc++ from the source code. so nobody hand-wrote this one, the robot did it. πŸ™ˆ

that's the whole page, bestie β€” synth_access_traits< Type_Traits, Set, _ATraits > from libstdc++, 3cxx manual, straight out of Doxygen's source-code-generated pipeline. go forth and synth your access traits πŸ’…πŸŒΈπŸ’–