std(3)
💖 NAME 💖
Okay so bestie, this is std(3) from the Library Functions Manual, and it's literally about std — the ISO C++ entities toplevel namespace is std. That's the whole name, main character energy from the jump, no cap. ✨
✨ SYNOPSIS ✨
The synopsis is giving "here's the whole cast list," so let's go. We got namespaces and classes, and we are not skipping anybody. 💅
🫶 Namespaces 🫶
These are the namespaces in the house. The source doesn't give extra descriptions for them, so we're just naming them with love:
namespace __debug— present and accounted for 🫶namespace __detail— present and accounted for 🫶namespace __parallel— present and accounted for 🫶namespace chrono— present and accounted for ⏰namespace placeholders— present and accounted for 🎀namespace regex_constants— present and accounted for 🧚namespace rel_ops— present and accounted for 💜namespace this_thread— present and accounted for 🧵namespace tr1— present and accounted for 🌈
👑 Classes 👑
Okay, this is the long part, but we're not skipping a single one. Every class and struct below is exactly as the source lists it. Some have descriptions, some are just names and vibes. Also, a bunch of these descriptions end with a literal " in the source — we're keeping those, fr fr.
class __codecvt_abstract_base— common base forcodecvtfunctions 💅class __ctype_abstract_base— common base forctypefacet ✨struct __is_location_invariant— no extra description in the source, just the name, periodtstruct __is_member_pointer_helper—is_member_pointerstruct __numeric_limits_base— part ofstd::numeric_limits🔥struct _Base_bitset— source gives no extra description, but it's herestruct _Base_bitset< 0 >— the zero specialization, iconicstruct _Base_bitset< 1 >— the one specialization, also iconicclass _Deque_base— no extra description in the source, just the namestruct _Deque_iterator— adeque::iterator👑struct _Derives_from_binary_function— determines if the type_Tpderives frombinary_function💀struct _Derives_from_unary_function— determines if the type_Tpderives fromunary_function💀struct _Fnv_hash— dummy generic implementation (forsizeof(size_t) != 4, 8)class _Function_base— base class of all polymorphic function object wrappers 👑struct _Function_to_function_pointer— turns a function type into a function pointer typestruct _Fwd_list_base— base class forforward_liststruct _Fwd_list_const_iterator— aforward_list::const_iteratorstruct _Fwd_list_iterator— aforward_list::iteratorstruct _Fwd_list_node— a helper node class forforward_list. This is just a linked list with a data value in each node. There is a sorting utility method. 🧚struct _Fwd_list_node_base— a helper basic node class forforward_list. This is just a linked list with nothing inside it. There are purely list shuffling utility methods here. 💀class _Has_result_type_helper— no extra description in the source, just the namestruct _Index_tuple— here for the vibes, no extra descriptionclass _List_base— seebits/stl_deque.h's_Deque_basefor an explanation (that's what the source says, bestie)struct _List_const_iterator— alist::const_iteratorstruct _List_iterator— alist::iteratorstruct _List_node— an actual node in the liststruct _List_node_base— common part of a node in the liststruct _Maybe_get_result_type— if we have found aresult_type, extract it 🫶struct _Maybe_unary_or_binary_function— no extra description in the source, just the namestruct _Maybe_unary_or_binary_function< _Res, _T1 >— derives fromunary_function, as appropriatestruct _Maybe_unary_or_binary_function< _Res, _T1, _T2 >— derives frombinary_function, as appropriatestruct _Maybe_wrap_member_pointer— no extra description in the source, just the namestruct _Maybe_wrap_member_pointer< _Tp _Class::* >— the member-pointer specializationclass _Mem_fn< _Res(_Class::*)(_ArgTypes...) const >— implementation ofmem_fnfor const member function pointersclass _Mem_fn< _Res(_Class::*)(_ArgTypes...) const volatile >— implementation ofmem_fnfor const volatile member function pointersclass _Mem_fn< _Res(_Class::*)(_ArgTypes...) volatile >— implementation ofmem_fnfor volatile member function pointersclass _Mem_fn< _Res(_Class::*)(_ArgTypes...)>— implementation ofmem_fnfor member function pointersclass _Mu< _Arg, false, false >— no extra description in the sourceclass _Mu< _Arg, false, true >— no extra description in the sourceclass _Mu< _Arg, true, false >— no extra description in the sourceclass _Mu< reference_wrapper< _Tp >, false, false >— no extra description in the sourcestruct _Placeholder— the type of placeholder objects defined by libstdc++struct _Reference_wrapper_base— no extra description in the sourcestruct _Result_of_impl< false, _Functor()>— no extra description in the sourcestruct _Result_of_impl< false, _Functor(_ArgTypes...)>— no extra description in the sourcestruct _Result_of_impl< true, _Functor(_ArgTypes...)>— we already know the result type forFunctor; use it 🔥struct _Safe_tuple_element— no extra description in the sourcestruct _Safe_tuple_element_impl— no extra description in the sourcestruct _Safe_tuple_element_impl< __i, _Tuple, false >— no extra description in the sourceclass _Temporary_buffer— no extra description in the sourcestruct _Tuple_impl< _Idx >— no extra description in the sourcestruct _Tuple_impl< _Idx, _Head, _Tail...>— no extra description in the sourcestruct _Vector_base— seebits/stl_deque.h's_Deque_basefor an explanationstruct _Weak_result_type— no extra description in the sourcestruct _Weak_result_type_impl— no extra description in the sourcestruct _Weak_result_type_impl< _Res(&)(_ArgTypes...)>— retrieve the result type for a function referencestruct _Weak_result_type_impl< _Res(*)(_ArgTypes...)>— retrieve the result type for a function pointerstruct _Weak_result_type_impl< _Res(_ArgTypes...)>— retrieve the result type for a function typestruct _Weak_result_type_impl< _Res(_Class::*)(_ArgTypes...) const >— retrieve result type for a const member function pointerstruct _Weak_result_type_impl< _Res(_Class::*)(_ArgTypes...) const volatile >— retrieve result type for a const volatile member function pointerstruct _Weak_result_type_impl< _Res(_Class::*)(_ArgTypes...) volatile >— retrieve result type for a volatile member function pointerstruct _Weak_result_type_impl< _Res(_Class::*)(_ArgTypes...)>— retrieve result type for a member function pointerstruct add_const—add_const(same name, no extra tea)struct add_cv—add_cvstruct add_lvalue_reference—add_lvalue_referencestruct add_pointer—add_pointerstruct add_rvalue_reference—add_rvalue_referencestruct add_volatile—add_volatilestruct adopt_lock_t— assume the calling thread has already obtained mutex ownership and manage it 🔒struct alignment_of—alignment_ofclass allocator— the 'standard' allocator, as per[20.4]. Further details:http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt04ch11.html."(yes, literal quote in the source)class allocator< void >—allocator<void>specializationstruct array— a standard container for storing a fixed size sequence of elements 🎀struct atomic—atomic29.4.3, generic atomic type, primary class templatestruct atomic< _Tp * >— partial specialization for pointer typesstruct atomic< bool >— explicit specialization forboolstruct atomic< char >— explicit specialization forcharstruct atomic< char16_t >— explicit specialization forchar16_tstruct atomic< char32_t >— explicit specialization forchar32_tstruct atomic< int >— explicit specialization forintstruct atomic< long >— explicit specialization forlongstruct atomic< long long >— explicit specialization forlong longstruct atomic< short >— explicit specialization forshortstruct atomic< signed char >— explicit specialization forsigned charstruct atomic< unsigned char >— explicit specialization forunsigned charstruct atomic< unsigned int >— explicit specialization forunsigned intstruct atomic< unsigned long >— explicit specialization forunsigned longstruct atomic< unsigned long long >— explicit specialization forunsigned long longstruct atomic< unsigned short >— explicit specialization forunsigned shortstruct atomic< void * >— explicit specialization forvoid*struct atomic< wchar_t >— explicit specialization forwchar_tclass auto_ptr— a simple smart pointer providing strict ownership semantics 💅struct auto_ptr_ref— no extra description in the sourceclass back_insert_iterator— turns assignment into insertion 🔥class bad_alloc— exception possibly thrown bynew.bad_alloc(or classes derived from it) is used to report allocation errors from the throwing forms ofnew."(literal quote in the source)class bad_cast— thrown during incorrect typecasting. If you attempt an invaliddynamic_castexpression, an instance of this class (or something derived from this class) is thrown."(literal quote in the source)class bad_exception— no extra description in the sourceclass bad_function_call— exception class thrown when class templatefunction'soperator()is called with an empty targetclass bad_typeid— thrown when aNULLpointer in atypeidexpression is usedclass basic_filebuf— the actual work of input and output (for files). This class associates both its input and output sequence with an external disk file, and maintains a joint file position for both sequences. Many of its semantics are described in terms of similar behavior in the Standard C Library'sFILEstreams."(literal quote in the source)class basic_fstream— controlling input and output for files. This class supports reading from and writing to named files, using the inherited functions fromstd::basic_iostream. To control the associated sequence, an instance ofstd::basic_filebufis used, which this page refers to assb."(literal quote in the source)class basic_ifstream— controlling input for files. This class supports reading from named files, using the inherited functions fromstd::basic_istream. To control the associated sequence, an instance ofstd::basic_filebufis used, which this page refers to assb."(literal quote in the source)class basic_ios— virtual base class for all stream classes. Most of the member functions called dispatched on stream objects (e.g.,std::cout.foo(bar);) are consolidated in this class."(literal quote in the source)class basic_iostream— mergingistreamandostreamcapabilities. This class multiply inherits from the input and output stream classes simply to provide a single interface."(literal quote in the source)class basic_istream— controlling input. This is the base class for all input streams. It provides text formatting of all builtin types, and communicates with any class derived frombasic_streambufto do the actual input."(literal quote in the source)class basic_istringstream— controlling input forstd::string. This class supports reading from objects of typestd::basic_string, using the inherited functions fromstd::basic_istream. To control the associated sequence, an instance ofstd::basic_stringbufis used, which this page refers to assb."(literal quote in the source)class basic_ofstream— controlling output for files. This class supports reading from named files, using the inherited functions fromstd::basic_ostream. To control the associated sequence, an instance ofstd::basic_filebufis used, which this page refers to assb."(literal quote in the source; yes, it says "reading" here, we're not fixing it)class basic_ostream— controlling output. This is the base class for all output streams. It provides text formatting of all builtin types, and communicates with any class derived frombasic_streambufto do the actual output."(literal quote in the source)class basic_ostringstream— controlling output forstd::string. This class supports writing to objects of typestd::basic_string, using the inherited functions fromstd::basic_ostream. To control the associated sequence, an instance ofstd::basic_stringbufis used, which this page refers to assb."(literal quote in the source)class basic_regex— no extra description in the sourceclass basic_streambuf— the actual work of input and output (interface)class basic_string— managing sequences of characters and character-like objects 🦋class basic_stringbuf— the actual work of input and output (forstd::string). This class associates either or both of its input and output sequences with a sequence of characters, which can be initialized from, or made available as, astd::basic_string. (Paraphrased from[27.7.1]/1.)."(literal quote in the source)class basic_stringstream— controlling input and output forstd::string
...and bestie, what this class does is let you read from and write to objects of type std::basic_string, using the functions it inherited from std::basic_iostream. 💖
to keep tabs on the associated sequence it spins up an instance of std::basic_stringbuf, which this page is gonna call sb the whole time. iykyk 🫶
okay, now the big roll-call of classes and structs — buckle up, there's like a million of them and they're all iconic in their own way ✨
class bernoulli_distribution— a Bernoulli random number distribution. yes bestie, randomness, but make it named. 🎲struct bidirectional_iterator_tag— the tag for bidirectional iterators, which support a superset of forward iterator operations. so, forward but extra 🌸struct binary_function— okay so the page literally gives no blurb here. it's just... there. main character of being undescribed 💀class binary_negate— one of the negation functors. 🎀class binder1st— one of the binder functors. 🎀class binder2nd— one of the binder functors. yes, the second one, they're siblings 🙈class binomial_distribution— a discrete binomial random number distribution. 🔥class bitset— thebitsetclass represents a fixed-size sequence of bits. fixed. size. no take-backs. ⭐struct char_traits— the basis for explicit traits specializations. 🧚struct char_traits< __gnu_cxx::character< V, I, S > >— thechar_traits<__gnu_cxx::character>specialization. 🦋struct char_traits< char >— this is the21.1.3.1 char_traits specializationssituation, fr.struct char_traits< wchar_t >— and this one's the21.1.3.2 char_traits specializations. 🌈class codecvt—class codecvt [22.2.1.5]. NB: Generic, mostly useless implementation.and honestly? the page said it, not me 💀💀 it's giving self-aware.class codecvt< _InternT, _ExternT, encoding_state >— thecodecvt<InternT, _ExternT, encoding_state>specialization. 💅class codecvt< char, char, mbstate_t >— thecodecvt<char, char, mbstate_t>specialization. 🍓class codecvt< wchar_t, char, mbstate_t >— thecodecvt<wchar_t, char, mbstate_t>specialization. 👑class codecvt_base— an empty base class for the codecvt facet [22.2.1.5]. empty but still serving looks ✨class codecvt_byname—class codecvt_byname [22.2.1.6].🎀class collate— the facet for localized string comparison. comparison, but make it international 🌍class collate_byname—class collate_byname [22.2.4.2].🦋struct complex— again, the page gives zero description. no blurb, no problem, still here 😭class condition_variable— the page says:condition_variable. that's the whole description. short queen 💅class condition_variable_any— and the description is literallycondition_variable_any. matching energy 🫶class const_mem_fun1_ref_t— one of the adaptors for member pointers. 🌸class const_mem_fun1_t— one of the adaptors for member pointers. 🌸class const_mem_fun_ref_t— one of the adaptors for member pointers. 🌸class const_mem_fun_t— one of the adaptors for member pointers. (yes there are four of them, they're a whole squad) 🎀class ctype— the template ctype facet. ⭐class ctype< char >— thectype<char>specialization. 💖class ctype< wchar_t >— thectype<wchar_t>specialization. 💜struct ctype_base— the base class for ctype. 🧚class ctype_byname—class ctype_byname [22.2.1.2].🎀class ctype_byname< char >— this is the22.2.1.4 Class ctype_byname specializationsone, slay.struct default_delete— the primary template,default_delete. 🔥struct default_delete< _Tp[]>— the specialization,default_delete. array-flavored 😌struct defer_lock_t— do not acquire ownership of the mutex. read that again bestie. DO NOT. 🚨class deque— a standard container that uses fixed-size memory allocation and gives you constant-time manipulation of elements at either end. both ends!! 👑class discard_block— no description on this one either. it's mysterious, it's elusive, we respect it 🙈struct divides— one of the math functors. ➗class domain_error— also no blurb on the page. it just exists, and honestly same 😭struct equal_to— one of the comparison functors. 🎀class error_category— the description is justerror_category. circular but valid 💅struct error_code— description:error_code. immaculate self-titling ✨struct error_condition— description:error_condition. keeping the trio consistent 🫶class exception— the base class for all library exceptions. the mother of them all, the blueprint, the origin story 👑class exponential_distribution— an exponential continuous distribution for random numbers. continuous, not discrete, don't mix them up bestie 🌈struct extent— description:extent. that's it, that's the entry 🦋struct forward_iterator_tag— forward iterators support a superset of input iterator operations. so, input++, literally 🌸class forward_list— a standard container with linear time access to elements, but fixed time insertion/deletion at any point in the sequence. linear access, constant insert/delete, look at her go 🔥class fpos— the class representing stream positions. where you at, in stream form 📍class front_insert_iterator— turns assignment into insertion. at the front. sneaky and iconic 🎀class function< _Res(_ArgTypes...)>— description:class function. she named herself 💅class gamma_distribution— a gamma continuous distribution for random numbers. 🍓class geometric_distribution— a discrete geometric random number distribution. 🧚struct greater— one of the comparison functors. ⭐struct greater_equal— one of the comparison functors. ⭐class gslice— the class that defines a multi-dimensional subset of an array. multi-dimensional!! she contains multitudes 🦋class gslice_array— a reference to a multi-dimensional subset of an array. reference, not a copy, don't come for her 🌸struct has_virtual_destructor— description:has_virtual_destructor. self-explanatory queen 💜struct hash— the class templatehash. 🔥struct hash< _Tp * >— the partial specializations for pointer types. pointers get their own version, periodt 👑class indirect_array— a reference to an arbitrary subset of an array. arbitrary!! she's spontaneous 💅class initializer_list— description:initializer_list. the braces vibe, iykyk 🎀struct input_iterator_tag— marking input iterators. just marking them. tagging them in the group chat 🏷️class insert_iterator— turns assignment into insertion. the general-purpose one, no front or back about it 🫶struct integral_constant— description:integral_constant. constant and integral, what more do you want ⭐class invalid_argument— no description given on the page. it's giving "you know what you did" 😭class ios_base— the base of the entire I/O class hierarchy. the root, the ancestor, the foundation of the whole I/O family tree 👑🌳
ios_base — okay so this class defines everything that can be defined about I/O that does not depend on the type of characters being input or output. Most people will only see ios_base when they need to specify the full name of the various I/O flags (e.g., the openmodes). (yes there's a lone " sitting at the end of that sentence in the original — we love a quirky typesetting moment 💅)
struct is_abstract— description is literally justis_abstract. No blurb, no notes, the name is doing all the work 🫶struct is_arithmetic—is_arithmetic. Same deal, girl said nothing else.struct is_array—is_array. Bestie the page just repeats the name back at you 😭struct is_bind_expression— this one determines if the given type_Tpis a function object that should be treated as a subexpression when evaluating calls to function objects returned bybind(). [TR1 3.6.1]struct is_bind_expression< _Bind< _Signature > >— class template_Bindis always a bind expression, no cap.struct is_bind_expression< _Bind_result< _Result, _Signature > >— and class template_Bind_resultis always a bind expression too. Periodt.struct is_class—is_class. That's the whole entry ✨struct is_compound—is_compound. Nothing else, moving on 💨struct is_const—is_const. No description given, keep scrolling.struct is_empty—is_empty. (the entry is also kinda empty, fitting tbh)struct is_enum—is_enum. Name only bestie.struct is_error_code_enum—is_error_code_enum. That's it.struct is_error_condition_enum—is_error_condition_enum. Also that's it.struct is_floating_point—is_floating_point. Self-titled, no notes.struct is_function—is_function. Just the name.struct is_fundamental—is_fundamental. Same energy.struct is_integral—is_integral. Yep.struct is_lvalue_reference—is_lvalue_reference. That's the entry 🌸struct is_member_function_pointer—is_member_function_pointer. Nothing more.struct is_member_object_pointer—is_member_object_pointer. Also nothing more.struct is_object—is_object. The doc is on strike for this one 💀struct is_placeholder— determines if the given type_Tpis a placeholder in abind()expression and, if so, which placeholder it is. [TR1 3.6.2]struct is_placeholder< _Placeholder< _Num > >— listed with no description attached, just the signature and vibes 🔥struct is_pointer—is_pointer. Name only.struct is_polymorphic—is_polymorphic. Name only.struct is_reference—is_reference. Name only.struct is_rvalue_reference—is_rvalue_reference. Name only.struct is_same—is_same. Name only.struct is_scalar—is_scalar. Name only.struct is_union—is_union. Name only.struct is_void—is_void. Name only.struct is_volatile—is_volatile. Name only — and that's the end of theis_*parade 🎀
class istream_iterator— provides input iterator semantics for streams ✨class istreambuf_iterator— provides input iterator semantics for streambufs.struct iterator— the common iterator class. That's the blurb, short and sweet.struct iterator_traits— no description here, just the name sitting pretty 🦋class length_error— again, no description, name only.struct less— one of the comparison functors.struct less_equal— one of the comparison functors too.class linear_congruential— a model of a linear congruential random number generator. Love a random era 🎲class list— a standard container with linear time access to elements, and fixed time insertion/deletion at any point in the sequence. Iconic behaviour honestly.class locale— container class for localization functionality.class lock_error— thrown to indicate errors with lock operations.class lock_guard— scoped lock idiom. Short, chic, does the job.class logic_error— one of two subclasses of exception.struct logical_and— one of the Boolean operations functors.struct logical_not— one of the Boolean operations functors.struct logical_or— one of the Boolean operations functors.class map— a standard container made up of(key,value)pairs, which can be retrieved based on a key, in logarithmic time. Main character container energy 👑class mask_array— reference to selected subset of an array.class match_results— the results of a match or search operation.class mem_fun1_ref_t— one of the adaptors for member pointers.class mem_fun1_t— one of the adaptors for member pointers.class mem_fun_ref_t— one of the adaptors for member pointers.class mem_fun_t— one of the adaptors for member pointers.class messages— facet for handling message catalogs.struct messages_base— messages facet base class providing catalog typedef.class messages_byname— the page says, and I quote:class messages_byname [22.2.7.2].💀struct minus— one of the math functors.struct modulus— one of the math functors.class money_base— money format ordering data.class money_get— facet for parsing monetary amounts. Get that bag 💸class money_put— facet for outputting monetary amounts.class moneypunct— facet for formatting data for money amounts.class moneypunct_byname— quoted verbatim:class moneypunct_byname [22.2.6.4].class move_iterator— no description, just vibes and a name 🌈class multimap— a standard container made up of(key,value)pairs, which can be retrieved based on a key, in logarithmic time. Same blurb asmap, she's consistent.struct multiplies— one of the math functors.class multiset— a standard container made up of elements, which can be retrieved in logarithmic time.class mutex— description:mutex. That's it. Circular but iconic 🙈struct negate— one of the math functors.class normal_distribution— a normal continuous distribution for random numbers. Very on brand for a normal queen.struct not_equal_to— one of the comparison functors.class num_get— facet for parsing number strings.class num_put— facet for converting numbers to strings.struct numeric_limits— properties of fundamental types. Big one, and here come the specializations ⭐struct numeric_limits< bool >— thenumeric_limits<bool>specialization.struct numeric_limits< char >— thenumeric_limits<char>specialization.struct numeric_limits< char16_t >— thenumeric_limits<char16_t>specialization.struct numeric_limits< char32_t >— thenumeric_limits<char32_t>specialization.struct numeric_limits< double >— thenumeric_limits<double>specialization.struct numeric_limits< float >— thenumeric_limits<float>specialization.struct numeric_limits< int >— thenumeric_limits<int>specialization.struct numeric_limits< long >— thenumeric_limits<long>specialization.struct numeric_limits< long double >— thenumeric_limits<long double>specialization.struct numeric_limits< long long >— thenumeric_limits<long long>specialization.struct numeric_limits< short >— thenumeric_limits<short>specialization.struct numeric_limits< signed char >— thenumeric_limits<signed char>specialization.struct numeric_limits< unsigned char >— thenumeric_limits<unsigned char>specialization.struct numeric_limits< unsigned int >— thenumeric_limits<unsigned int>specialization.struct numeric_limits< unsigned long >— thenumeric_limits<unsigned long>specialization.struct numeric_limits< unsigned long long >— thenumeric_limits<unsigned long long>specialization.struct numeric_limits< unsigned short >— thenumeric_limits<unsigned short>specialization.struct numeric_limits< wchar_t >— thenumeric_limits<wchar_t>specialization. And that's the whole family, all accounted for 💖class numpunct— numpunct facet.class numpunct_byname— quoted as written:class numpunct_byname [22.2.3.2].struct once_flag— description:once_flag. Once. Flag. That's the entry 😭class ostream_iterator— provides output iterator semantics for streams.class ostreambuf_iterator— provides output iterator semantics for streambufs.class out_of_range— no description, name only.struct output_iterator_tag— marking output iterators.class overflow_error— no description, name only.struct pair—pairholds two objects of arbitrary type. Two besties, one struct 🫶struct plus— one of the math functors.class pointer_to_binary_function— one of the adaptors for function pointers.class pointer_to_unary_function— one of the adaptors for function pointers.class poisson_distribution— a discrete Poisson random number distribution.class priority_queue— a standard container automatically sorting its contents. It said "I'll sort myself," and honestly? Slay.class queue— a standard container giving FIFO behavior.struct random_access_iterator_tag— random-access iterators support a superset of bidirectional iterator operations.class random_device— no description, name only 🌸class range_error— no description, name only.struct rank— description:rank. Nothing else, friends.struct ratio— provides compile-time rational arithmetic. Math but make it compile-time ✨struct ratio_add—ratio_add. Name only.struct ratio_divide—ratio_divide. Name only.struct ratio_equal—ratio_equal. Name only.struct ratio_greater—ratio_greater. Name only.struct ratio_greater_equal—ratio_greater_equal. Name only.struct ratio_less—ratio_less. Name only.struct ratio_less_equal—ratio_less_equal. Name only.struct ratio_multiply—ratio_multiply. Name only.struct ratio_not_equal—ratio_not_equal. Name only.struct ratio_subtract—ratio_subtract. Name only. Wholeratio_*squad, all blurbless 💅class raw_storage_iterator— no description, just a name and a dream.class recursive_mutex— description:recursive_mutex. It recursed into its own description and found nothing 🌀class recursive_timed_mutex— description:recursive_timed_mutex. Same bit, now with timing.class reference_wrapper— description:reference_wrapper. Name only.class regex_error— a regular expression exception class.
The regular expression library throws objects of this class on error. 🫠 that's it, that's the whole personality — it's the error object the regex library yeets at you when something goes wrong, no notes.
class regex_iterator— no blurb given, she's mysterious 💅class regex_token_iterator— also no blurb, matching energystruct regex_traits— describes aspects of a regular expression ✨struct remove_all_extents—remove_all_extentsstruct remove_const—remove_conststruct remove_cv—remove_cvstruct remove_extent—remove_extentstruct remove_pointer—remove_pointerstruct remove_reference—remove_referencestruct remove_volatile—remove_volatile
(okay the remove_* squad all describe themselves with their own name, which is lowkey iconic of them. no cap.)
class result_of< _Functor(_ArgTypes...)>— no description, but the signature is right there bestieclass reverse_iterator— no blurb 🦋class runtime_error— one of two subclasses of exceptionclass set— a standard container made up of unique keys, which can be retrieved in logarithmic time 🔥class slice— class defining one-dimensional subset of an arrayclass slice_array— reference to one-dimensional subset of an arrayclass stack— a standard container giving FILO behaviorclass sub_match— no description 🌸class system_error— thrown to indicate error code of underlying systemclass thread—threadclass time_base— time format ordering dataclass time_get— facet for parsing dates and timesclass time_get_byname—class time_get_byname [22.2.5.2].class time_put— facet for outputting dates and timesclass time_put_byname—class time_put_byname [22.2.5.4].class timed_mutex—timed_mutexstruct try_to_lock_t— try to acquire ownership of the mutex without blocking 👀class tuple—tupleclass tuple< _T1, _T2 >— tuple (2-element), with construction and assignment from a pairstruct tuple_element< 0, tuple< _Head, _Tail...> >— no blurb, it's giving mysterystruct tuple_element< __i, tuple< _Head, _Tail...> >— also no blurbstruct tuple_size< tuple< _Elements...> >—class tuple_sizeclass type_info— part of RTTIstruct unary_function— no description 🎀class unary_negate— one of the negation functorsclass underflow_error— no blurb, just vibesclass uniform_int— uniform discrete distribution for random numbers. A discrete random distribution on the range$[min, max]$with equal probability throughout the range. literally every value in the range gets the same chance, slay ⭐class uniform_real— uniform continuous distribution for random numbersclass unique_lock—unique_lockclass unique_ptr—20.7.12.2 unique_ptr for single objects.class unique_ptr< _Tp[], _Tp_Deleter >—20.7.12.3 unique_ptr for array objects with a runtime lengthclass unordered_map— a standard container composed of unique keys (containing at most one of each key value) that associates values of another type with the keys 💜class unordered_multimap— a standard container composed of equivalent keys (possibly containing multiple of each key value) that associates values of another type with the keysclass unordered_multiset— a standard container composed of equivalent keys (possibly containing multiple of each key value) in which the elements' keys are the elements themselvesclass unordered_set— a standard container composed of unique keys (containing at most one of each key value) in which the elements' keys are the elements themselvesclass valarray— smart array designed to support numeric processing 🧚class variate_generator— no description, she said nothing and leftclass vector— a standard container which offers fixed time access to individual elements in any orderclass vector< bool, _Alloc >— a specialization of vector for booleans which offers fixed time access to individual elements in any orderclass xor_combine— no blurb, we move 🌈
✨ Typedefs ✨
bestie. sit down. this is the nickname list — a whole wall of typedefs where the library goes "this long thing? yeah we call her that now." every single one, coming right up, no skipping 💖
typedef struct std::__atomic_flag_base __atomic_flag_basetypedef FILE __c_filetypedef __locale_t __c_localetypedef __gthread_mutex_t __c_locktypedef unsigned long _Bit_typetypedef atomic_short atomic_int_fast16_ttypedef atomic_int atomic_int_fast32_ttypedef atomic_llong atomic_int_fast64_ttypedef atomic_schar atomic_int_fast8_ttypedef atomic_short atomic_int_least16_ttypedef atomic_int atomic_int_least32_ttypedef atomic_llong atomic_int_least64_ttypedef atomic_schar atomic_int_least8_ttypedef atomic_llong atomic_intmax_ttypedef atomic_long atomic_intptr_ttypedef atomic_long atomic_ptrdiff_ttypedef atomic_ulong atomic_size_ttypedef atomic_long atomic_ssize_ttypedef atomic_ushort atomic_uint_fast16_ttypedef atomic_uint atomic_uint_fast32_ttypedef atomic_ullong atomic_uint_fast64_ttypedef atomic_uchar atomic_uint_fast8_ttypedef atomic_ushort atomic_uint_least16_ttypedef atomic_uint atomic_uint_least32_ttypedef atomic_ullong atomic_uint_least64_ttypedef atomic_uchar atomic_uint_least8_ttypedef atomic_ullong atomic_uintmax_ttypedef atomic_ulong atomic_uintptr_t
that's the whole atomic_* glow-up collection — fast, least, max, ptr, size, ssize, the gang's all here 👑
typedef ratio< 1, 1000000000000000000 > attotypedef ratio< 1, 100 > centitypedef match_results< const char * > cmatchtypedef regex_iterator< const char * > cregex_iteratortypedef regex_token_iterator< const char * > cregex_token_iteratortypedef sub_match< const char * > csub_matchtypedef ratio< 10, 1 > decatypedef ratio< 1, 10 > decitypedef ratio< 1000000000000000000, 1 > exatypedef integral_constant< bool, false > false_typetypedef ratio< 1, 1000000000000000 > femtotypedef basic_filebuf< char > filebuftypedef basic_fstream< char > fstreamtypedef ratio< 1000000000, 1 > gigatypedef ratio< 100, 1 > hectotypedef basic_ifstream< char > ifstreamtypedef basic_ios< char > iostypedef basic_iostream< char > iostreamtypedef basic_istream< char > istreamtypedef basic_istringstream< char > istringstreamtypedef ratio< 1000, 1 > kilotypedef ratio< 1000000, 1 > megatypedef enum std::memory_order memory_ordertypedef ratio< 1, 1000000 > microtypedef ratio< 1, 1000 > millitypedef linear_congruential< unsigned long, 48271, 0, 2147483647 > minstd_randtypedef linear_congruential< unsigned long, 16807, 0, 2147483647 > minstd_rand0typedef mersenne_twister< unsigned long, 32, 624, 397, 31, 0x9908b0dful, 11, 7, 0x9d2c5680ul, 15, 0xefc60000ul, 18 > mt19937typedef ratio< 1, 1000000000 > nanotypedef void(* new_handler )()typedef basic_ofstream< char > ofstreamtypedef basic_ostream< char > ostreamtypedef basic_ostringstream< char > ostringstreamtypedef ratio< 1000000000000000, 1 > petatypedef ratio< 1, 1000000000000 > picotypedef discard_block< subtract_with_carry< unsigned long,(1UL<< 24), 10, 24 >, 223, 24 > ranlux3typedef discard_block< subtract_with_carry_01< float, 24, 10, 24 >, 223, 24 > ranlux3_01typedef discard_block< subtract_with_carry< unsigned long,(1UL<< 24), 10, 24 >, 389, 24 > ranlux4typedef discard_block< subtract_with_carry_01< float, 24, 10, 24 >, 389, 24 > ranlux4_01typedef subtract_with_carry_01< double, 48, 5, 12 > ranlux64_base_01typedef subtract_with_carry_01< float, 24, 10, 24 > ranlux_base_01typedef basic_regex< char > regextypedef match_results< string::const_iterator > smatchtypedef regex_iterator< string::const_iterator > sregex_iteratortypedef regex_token_iterator< string::const_iterator > sregex_token_iteratortypedef sub_match< string::const_iterator > ssub_matchtypedef basic_streambuf< char > streambuftypedef long long streamofftypedef fpos< mbstate_t > streampostypedef ptrdiff_t streamsizetypedef basic_string< char > stringtypedef basic_stringbuf< char > stringbuftypedef basic_stringstream< char > stringstreamtypedef ratio< 1000000000000, 1 > teratypedef void(* terminate_handler )()typedef integral_constant< bool, true > true_typetypedef fpos< mbstate_t > u16streampostypedef basic_string< char16_t > u16stringtypedef fpos< mbstate_t > u32streampostypedef basic_string< char32_t > u32stringtypedef void(* unexpected_handler )()typedef match_results< const wchar_t * > wcmatchtypedef regex_iterator< const wchar_t * > wcregex_iteratortypedef regex_token_iterator< const wchar_t * > wcregex_token_iteratortypedef sub_match< const wchar_t * > wcsub_matchtypedef basic_filebuf< wchar_t > wfilebuftypedef basic_fstream< wchar_t > wfstreamtypedef basic_ifstream< wchar_t > wifstreamtypedef basic_ios< wchar_t > wiostypedef basic_iostream< wchar_t > wiostreamtypedef basic_istream< wchar_t > wistreamtypedef basic_istringstream< wchar_t > wistringstreamtypedef basic_ofstream< wchar_t > wofstreamtypedef basic_ostream< wchar_t > wostreamtypedef basic_ostringstream< wchar_t > wostringstreamtypedef basic_regex< wchar_t > wregextypedef match_results< wstring::const_iterator > wsmatchtypedef regex_iterator< wstring::const_iterator > wsregex_iteratortypedef regex_token_iterator< wstring::const_iterator > wsregex_token_iteratortypedef sub_match< wstring::const_iterator > wssub_matchtypedef basic_streambuf< wchar_t > wstreambuftypedef fpos< mbstate_t > wstreampostypedef basic_string< wchar_t > wstringtypedef basic_stringbuf< wchar_t > wstringbuftypedef basic_stringstream< wchar_t > wstringstream
see how the w-prefixed ones are just the char crew but in wchar_t? the way that pattern ate, honestly 🫶 and the ratio< … > ones are your metric-prefix besties from atto all the way up to exa — the whole ladder, glow-up included.
🌈 ENUMERATIONS 🌈
okay bestie, so this is the part of the page where it just... dumps the entire enum roster at you 💅 no prose, no little explanations, just names. and honestly? iconic. so here's the whole lineup, spelled exactly the way it appears — underscores, capital letters, all of it — because if you're gonna grep for one of these, the spelling here is the spelling you want, fr fr.
copied character for character. don't "fix" the leading underscores, they're load-bearing ✨
🎀 the three tiny anonymous ones
nameless enums, one member each, just vibing:
enum { _S_threshold }
enum { _S_chunk_size }
enum { _S_word_bit }
no tag name, no fanfare — it's giving mysterious main character energy 👑
🧚 _Ios_Fmtflags — the formatting buffet
enum _Ios_Fmtflags { _S_boolalpha, _S_dec, _S_fixed, _S_hex,
_S_internal, _S_left, _S_oct, _S_right, _S_scientific, _S_showbase,
_S_showpoint, _S_showpos, _S_skipws, _S_unitbuf, _S_uppercase,
_S_adjustfield, _S_basefield, _S_floatfield, _S_ios_fmtflags_end }
nineteen members, and yes, three of them literally have field in the name — _S_adjustfield, _S_basefield, _S_floatfield — sitting right before the _S_ios_fmtflags_end closer 🫶. the rest read like a mood board: _S_boolalpha, _S_dec, _S_fixed, _S_hex, _S_internal, _S_left, _S_oct, _S_right, _S_scientific, _S_showbase, _S_showpoint, _S_showpos, _S_skipws, _S_unitbuf, _S_uppercase. slay 💅
💀 _Ios_Iostate
enum _Ios_Iostate { _S_goodbit, _S_badbit, _S_eofbit, _S_failbit,
_S_ios_iostate_end }
four bits and an _S_ios_iostate_end. _S_goodbit, _S_badbit, _S_eofbit, _S_failbit — the emotional states of every program I've ever written, honestly 😭
🦋 _Ios_Openmode
enum _Ios_Openmode { _S_app, _S_ate, _S_bin, _S_in, _S_out, _S_trunc,
_S_ios_openmode_end }
six shorties: _S_app, _S_ate, _S_bin, _S_in, _S_out, _S_trunc, plus the _S_ios_openmode_end finisher. short names, big jobs 🌸
🌈 _Ios_Seekdir
enum _Ios_Seekdir { _S_beg, _S_cur, _S_end, _S_ios_seekdir_end }
_S_beg, _S_cur, _S_end, then _S_ios_seekdir_end. yes, _S_end and _S_ios_seekdir_end are two different things living in the same enum — read twice, bestie 👀
🔥 _Manager_operation
enum _Manager_operation { __get_type_info, __get_functor_ptr,
__clone_functor, __destroy_functor }
⚠️ heads up: these are the double-underscore ones. __get_type_info, __get_functor_ptr, __clone_functor, __destroy_functor. not _S_, not single _ — two. copy them exactly or nothing works 💀
🍓 _Rb_tree_color
enum _Rb_tree_color { _S_red, _S_black }
two colours. _S_red and _S_black. that's it, that's the enum 🎀
👑 errc — the big one, the whole mood
okay this is the long one. it's basically a whole poetry collection of things that can go wrong, written out as words instead of shouty macro names. drink some water before you scroll ☕
enum errc { address_family_not_supported, address_in_use,
address_not_available, already_connected, argument_list_too_long,
argument_out_of_domain, bad_address, bad_file_descriptor,
broken_pipe, connection_aborted, connection_already_in_progress,
connection_refused, connection_reset, cross_device_link,
destination_address_required, device_or_resource_busy,
directory_not_empty, executable_format_error, file_exists,
file_too_large, filename_too_long, function_not_supported,
host_unreachable, illegal_byte_sequence,
inappropriate_io_control_operation, interrupted, invalid_argument,
invalid_seek, io_error, is_a_directory, message_size, network_down,
network_reset, network_unreachable, no_buffer_space,
no_child_process, no_lock_available, no_message, no_protocol_option,
no_space_on_device, no_such_device_or_address, no_such_device,
no_such_file_or_directory, no_such_process, not_a_directory,
not_a_socket, not_connected, not_enough_memory,
operation_in_progress, operation_not_permitted,
operation_not_supported, operation_would_block, permission_denied,
protocol_not_supported, read_only_file_system,
resource_deadlock_would_occur, resource_unavailable_try_again,
result_out_of_range, timed_out, too_many_files_open_in_system,
too_many_files_open, too_many_links, too_many_symbolic_link_levels,
wrong_protocol_type }
all sixty-four of them, in order, no skips:
address_family_not_supported,address_in_use,address_not_availablealready_connected,argument_list_too_long,argument_out_of_domainbad_address,bad_file_descriptor,broken_pipeconnection_aborted,connection_already_in_progress,connection_refused,connection_reset,cross_device_linkdestination_address_required,device_or_resource_busy,directory_not_emptyexecutable_format_errorfile_exists,file_too_large,filename_too_long,function_not_supportedhost_unreachableillegal_byte_sequence,inappropriate_io_control_operation,interrupted,invalid_argument,invalid_seek,io_error,is_a_directorymessage_sizenetwork_down,network_reset,network_unreachableno_buffer_space,no_child_process,no_lock_available,no_message,no_protocol_option,no_space_on_device,no_such_device_or_address,no_such_device,no_such_file_or_directory,no_such_process,not_a_directory,not_a_socket,not_connected,not_enough_memoryoperation_in_progress,operation_not_permitted,operation_not_supported,operation_would_blockpermission_denied,protocol_not_supportedread_only_file_system,resource_deadlock_would_occur,resource_unavailable_try_again,result_out_of_rangetimed_out,too_many_files_open_in_system,too_many_files_open,too_many_links,too_many_symbolic_link_levelswrong_protocol_type
the way no_such_device_or_address and no_such_device sit next to each other, and no_such_file_or_directory and no_such_process are right there too... the ordering is doing bits 😭 and resource_deadlock_would_occur is so dramatic, love that for it. permission_denied is my personal villain origin story 🫶
🧚 float_denorm_style
enum float_denorm_style { denorm_indeterminate, denorm_absent,
denorm_present }
three options, no _S_ in sight — denorm_indeterminate, denorm_absent, denorm_present. a little palette cleanser ✨
⭐ float_round_style
enum float_round_style { round_indeterminate, round_toward_zero,
round_to_nearest, round_toward_infinity, round_toward_neg_infinity }
five ways to round: round_indeterminate, round_toward_zero, round_to_nearest, round_toward_infinity, round_toward_neg_infinity. note round_to_nearest breaks the round_toward_ streak — rude of it, but okay 💅
🔥 memory_order
enum memory_order { memory_order_relaxed, memory_order_consume,
memory_order_acquire, memory_order_release, memory_order_acq_rel,
memory_order_seq_cst }
six, all prefixed with memory_order_: memory_order_relaxed, memory_order_consume, memory_order_acquire, memory_order_release, memory_order_acq_rel, memory_order_seq_cst. the last one shortens it to seq_cst and honestly, iykyk 🌈
ngl bestie, this page gives you the names and nothing else — no explanations of what any of these actually do. i'm not about to make things up, so if you need the semantics, that's a different page. i'm just the messenger holding the clipboard 📋💖
okay so the function list keeps going and honestly it's giving "internal plumbing appreciation hour" 💅 — every single one of these has that double-underscore glow-up, which is libstdc++-speak for "bestie this is internals, not the public API, don't @ me." Copying them all out one by one so not a single one gets lost:
template<typename _CharT > _CharT * __add_grouping (_CharT *__s, _CharT __sep, const char *__gbeg, size_t __gsize, const _CharT *__first, const _CharT *__last)— the helper that lays grouping separators into a char buffer and hands back a pointer to where it ended up ✨ takes__s(where to write),__sep(the separator char),__gbeg/__gsize(the grouping pattern), and the__first…__lastrange of chars being grouped.template<typename _RandomAccessIterator , typename _Distance , typename _Tp , typename _Compare > void __adjust_heap (_RandomAccessIterator __first, _Distance __holeIndex, _Distance __len, _Tp __value, _Compare __comp)— heap-fixin' helper for the sorting machinery 🫶 walks the heap from__holeIndexout to__len, moving__valueinto place, and judges everything using__comp.template<typename _RandomAccessIterator , typename _Distance , typename _Tp > void __adjust_heap (_RandomAccessIterator __first, _Distance __holeIndex, _Distance __len, _Tp __value)— the same heap adjustment, but no comparator argument, so it's on the default comparison vibes 🌸template<typename _RandomAccessIterator , typename _Distance > void __advance (_RandomAccessIterator &__i, _Distance __n, random_access_iterator_tag)— iterator-advancing helper, random-access flavour: bumps__iby__nand that's literally it, queen 👑template<typename _BidirectionalIterator , typename _Distance > void __advance (_BidirectionalIterator &__i, _Distance __n, bidirectional_iterator_tag)— the bidirectional lane of the same thing 🦋 steps__iforward or backward by__n.template<typename _InputIterator , typename _Distance > void __advance (_InputIterator &__i, _Distance __n, input_iterator_tag)— the input-iterator lane, which only goes forward, one step at a time 😭volatile __atomic_flag_base * __atomic_flag_for_address (const volatile void *__z) __attribute__((const ))— grabs the atomic flag that belongs to the address__z⭐ and yes it's tagged__attribute__((const )), so the compiler treats the result as depending only on the args.void __atomic_flag_wait_explicit (volatile __atomic_flag_base *, memory_order)— waits on an atomic flag with thememory_orderyou hand it 🔥memory_order __calculate_memory_order (memory_order __m)— takes amemory_orderin and gives you thememory_orderthat actually ends up getting used 💀template<typename _Member , typename _Class > _Mem_fn< _Member _Class::* > __callable_functor (_Member _Class::*const &__p)— wraps aconst-qualified pointer-to-member into a_Mem_fnso it can be called like a functor 🎀template<typename _Member , typename _Class > _Mem_fn< _Member _Class::* > __callable_functor (_Member _Class::*&__p)— the non-const-ref version of that exact same wrapping ✨template<typename _Functor > _Functor & __callable_functor (_Functor &__f)— and for a plain functor it just hands the reference right back to you, no drama 🙈template<typename _Facet > const _Facet & __check_facet (const _Facet *__f)— the little accessor that turns aconst _Facet *into aconst _Facet &for the facet machinery 🦋template<typename _RandomAccessIterator , typename _Distance , typename _Compare > void __chunk_insertion_sort (_RandomAccessIterator __first, _RandomAccessIterator __last, _Distance __chunk_size, _Compare __comp)— the chunked insertion-sort leg of the sort pipeline, chopping__first…__lastinto__chunk_sizepieces and comparing with__comp💅template<typename _RandomAccessIterator , typename _Distance > void __chunk_insertion_sort (_RandomAccessIterator __first, _RandomAccessIterator __last, _Distance __chunk_size)— same chunked insertion sort, default comparison, no__comprequired 🌈template<typename _Tp > _Tp __cmath_power (_Tp, unsigned int)— raises a_Tpto anunsigned intpower, that's the whole assignment ✨template<typename _Tp > _Tp __complex_abs (const complex< _Tp > &__z)— theabsof acomplex< _Tp >, returning a nice real_Tp🍓template<typename _Tp > std::complex< _Tp > __complex_acos (const std::complex< _Tp > &__z)— complexacos, servingstd::complex< _Tp >in and out 👑template<typename _Tp > std::complex< _Tp > __complex_acosh (const std::complex< _Tp > &__z)— complexacosh, same deal, hyperbolic era 🦋template<typename _Tp > _Tp __complex_arg (const complex< _Tp > &__z)— the argument (phase angle) of__z, returned as_Tp⭐template<typename _Tp > std::complex< _Tp > __complex_asin (const std::complex< _Tp > &__z)— complexasin💜template<typename _Tp > std::complex< _Tp > __complex_asinh (const std::complex< _Tp > &__z)— complexasinh🌸template<typename _Tp > std::complex< _Tp > __complex_atan (const std::complex< _Tp > &__z)— complexatan✨template<typename _Tp > std::complex< _Tp > __complex_atanh (const std::complex< _Tp > &__z)— complexatanh🎀template<typename _Tp > complex< _Tp > __complex_cos (const complex< _Tp > &__z)— complexcos💖template<typename _Tp > complex< _Tp > __complex_cosh (const complex< _Tp > &__z)— complexcosh🫶template<typename _Tp > complex< _Tp > __complex_exp (const complex< _Tp > &__z)— complexexp🔥template<typename _Tp > complex< _Tp > __complex_log (const complex< _Tp > &__z)— complexlog🌈template<typename _Tp > complex< _Tp > __complex_pow (const complex< _Tp > &__x, const complex< _Tp > &__y)— complexpow, raising__xto__y💅template<typename _Tp > std::complex< _Tp > __complex_proj (const std::complex< _Tp > &__z)— complexproj, the projection onto the Riemann sphere, iykyk 🌌template<typename _Tp > complex< _Tp > __complex_sin (const complex< _Tp > &__z)— complexsin🍓template<typename _Tp > complex< _Tp > __complex_sinh (const complex< _Tp > &__z)— complexsinh⭐template<typename _Tp > complex< _Tp > __complex_sqrt (const complex< _Tp > &__z)— complexsqrt💜template<typename _Tp > complex< _Tp > __complex_tan (const complex< _Tp > &__z)— complextan🌸template<typename _Tp > complex< _Tp > __complex_tanh (const complex< _Tp > &__z)— complextanh✨int __convert_from_v (const __c_locale &__cloc __attribute__((__unused__)), char *__out, const int __size __attribute__((__unused__)), const char *__fmt,...)— theprintf-style conversion helper that writes into__out(size__size) using the format__fmtand the__c_locale__cloc👑 note both__clocand__sizecarry__attribute__((__unused__)).template<> void __convert_to_v (const char *, long double &, ios_base::iostate &, const __c_locale &)— thelong doublespecialisation that parses text into along doubleand records any failure in theios_base::iostate🦋template<> void __convert_to_v (const char *, double &, ios_base::iostate &, const __c_locale &)— thedoublespecialisation of the same parsing gig 🎀template<> void __convert_to_v (const char *, float &, ios_base::iostate &, const __c_locale &)— and thefloatspecialisation 💖template<typename _Tv > void __convert_to_v (const char *__in, _Tv &__out, ios_base::iostate &__err, const __c_locale &__cloc)— the generic version: read from__in, write into__out, flag trouble in__err, all according to__cloc🌈template<bool _IsMove, typename _II , typename _OI > _OI __copy_move_a (_II __first, _II __last, _OI __result)— the internal copy-or-move engine, switched by the_IsMovetemplate param, running from__first…__lastinto__resultand returning the output iterator ✨template<bool _IsMove, typename _CharT > __gnu_cxx::__enable_if< __is_char< _CharT >::__value, _CharT * >::__type __copy_move_a2 (istreambuf_iterator< _CharT > __first, istreambuf_iterator< _CharT > __last, _CharT *__result)— the char-flavoured__copy_move_a2that drains anistreambuf_iteratorrange straight into a_CharT *🫶template<bool _IsMove, typename _CharT > __gnu_cxx::__enable_if< __is_char< _CharT >::__value, ostreambuf_iterator< _CharT > >::__type __copy_move_a2 (const _CharT *__first, const _CharT *__last, ostreambuf_iterator< _CharT > __result)— the mirror-image one, feeding aconst _CharT *range into anostreambuf_iterator< _CharT >💅template<bool _IsMove, typename _CharT > __gnu_cxx::__enable_if< __is_char< _CharT >::__value, ostreambuf_iterator< _CharT > >::__type __copy_move_a2 (_CharT *__first, _CharT *__last, ostreambuf_iterator< _CharT > __result)— same as above but the source pointers aren'tconst💜template<bool _IsMove, typename _II , typename _OI > _OI __copy_move_a2 (_II __first, _II __last, _OI __result)— the plain generic__copy_move_a2, any input iterator into any output iterator, returns the output iterator ⭐template<bool _IsMove, typename _CharT > __gnu_cxx::__enable_if< __is_char< _CharT >::__value, _CharT * >::__type __copy_move_a2 (istreambuf_iterator< _CharT, char_traits< _CharT > >, istreambuf_iterator< _CharT, char_traits< _CharT > >, _CharT *)— the explicitly-traits'd version of the streambuf-to-pointer copy 🦋template<bool _IsMove, typename _CharT > __gnu_cxx::__enable_if< __is_char< _CharT >::__value, ostreambuf_iterator< _CharT, char_traits< _CharT > > >::__type __copy_move_a2 (const _CharT *, const _CharT *, ostreambuf_iterator< _CharT, char_traits< _CharT > >)— explicitly-traits'dconst _CharT *→ostreambuf_iterator, no parameter names, just vibes 🎀template<bool _IsMove, typename _CharT > __gnu_cxx::__enable_if< __is_char< _CharT >::__value, ostreambuf_iterator< _CharT, char_traits< _CharT > > >::__type __copy_move_a2 (_CharT *, _CharT *, ostreambuf_iterator< _CharT, char_traits< _CharT > >)— and the non-consttwin of that one 🌸template<bool _IsMove, typename _BI1 , typename _BI2 > _BI2 __copy_move_backward_a (_BI1 __first, _BI1 __last, _BI2 __result)— the backwards copy-or-move, same_IsMoveswitch, working from the end of the range back to__resultand returning it 🔥template<bool _IsMove, typename _BI1 , typename _BI2 > _BI2 __copy_move_backward_a2 (_BI1 __first, _BI1 __last, _BI2 __result)— the_a2layer on top of that backwards routine 😭template<typename _RandomAccessIterator , typename _Size , typename _OutputIterator > _OutputIterator __copy_n (_RandomAccessIterator __first, _Size __n, _OutputIterator __result, random_access_iterator_tag)— copies__nelements starting at__firstinto__result, random-access fast lane 🏎️template<typename _InputIterator , typename _Size , typename _OutputIterator > _OutputIterator __copy_n (_InputIterator __first, _Size __n, _OutputIterator __result, input_iterator_tag)— the input-iterator lane of__copy_n, one element at a time 🐢template<typename _CharT , typename _Traits > streamsize __copy_streambufs (basic_streambuf< _CharT, _Traits > *__sbin, basic_streambuf< _CharT, _Traits > *__sbout)— copies from the streambuf__sbininto__sboutand returns astreamsizecount ✨template<> streamsize __copy_streambufs_eof (basic_streambuf< wchar_t > *__sbin, basic_streambuf< wchar_t > *__sbout, bool &__ineof)— thewchar_tspecialisation of the streambuf copier that also reports EOF throughbool &__ineof🦋template<> streamsize __copy_streambufs_eof (basic_streambuf< char > *__sbin, basic_streambuf< char > *__sbout, bool &__ineof)— thecharspecialisation of exactly that 🎀template<typename _CharT , typename _Traits > streamsize __copy_streambufs_eof (basic_streambuf< _CharT, _Traits > *, basic_streambuf< _CharT, _Traits > *, bool &)— the generic__copy_streambufs_eoffallback, traits and all 💖size_t __deque_buf_size (size_t __size)— works out the deque's buffer size given an element__size🌈template<typename _RandomAccessIterator > iterator_traits< _RandomAccessIterator >::difference_type __distance (_RandomAccessIterator __first, _RandomAccessIterator __last, random_access_iterator_tag)— how far apart__firstand__lastare, random-access edition (just subtract, bestie) ⭐template<typename _InputIterator > iterator_traits< _InputIterator >::difference_type __distance (_InputIterator __first, _InputIterator __last, input_iterator_tag)— same distance question in the input-iterator lane, where you have to actually walk it 💀template<typename _II1 , typename _II2 > bool __equal_aux (_II1 __first1, _II1 __last1, _II2 __first2)— the aux equality check comparing__first1…__last1against the range starting at__first2💅template<typename _Tp > __gnu_cxx::__enable_if< __is_byte< _Tp >::__value, void >::__type __fill_a (_Tp *__first, _Tp *__last, const _Tp &__c)— fills__first…__lastwith__c, enabled only when_Tpis a byte type 🫶template<typename _ForwardIterator , typename _Tp > __gnu_cxx::__enable_if<!__is_scalar< _Tp >::__value, void >::__type __fill_a (_ForwardIterator __first, _ForwardIterator __last, const _Tp &__value)— the non-scalar fill path, enabled only when_Tpis not a scalar, filling with__value✨void __fill_bvector (_Bit_iterator __first, _Bit_iterator __last, bool __x)— fills a_Bit_iteratorrange with the bool__x🦋template<typename _Size , typename _Tp > __gnu_cxx::__enable_if< __is_byte< _Tp >::__value, _Tp * >::__type __fill_n_a (_Tp *__first, _Size __n, const _Tp &__c)— fills__nslots starting at__firstwith__c, byte-type enable_if edition and it returns the_Tp *🎀template<typename _OutputIterator , typename _Size , typename _Tp > __gnu_cxx::__enable_if<!__is_scalar< _Tp >::__value, _OutputIterator >::__type __fill_n_a (_OutputIterator __first, _Size __n, const _Tp &__value)— the non-scalar__fill_n_a, filling__nslots with__valueand returning the output iterator 💖template<typename _RandomAccessIterator , typename _Compare > void __final_insertion_sort (_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)— the final insertion-sort pass that wraps up the sort, comparing with__comp🌈template<typename _RandomAccessIterator > void __final_insertion_sort (_RandomAccessIterator __first, _RandomAccessIterator __last)— that final pass again, default comparison this time ⭐template<typename _RandomAccessIterator , typename _Tp > _RandomAccessIterator __find (_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp &__val, random_access_iterator_tag)— hunts for__valin__first…__last, random-access fast lane, returns the iterator where it landed 🔥template<typename _InputIterator , typename _Tp > _InputIterator __find (_InputIterator __first, _InputIterator __last, const _Tp &__val, input_iterator_tag)— the input-iterator__find, walking it old-school 😭template<typename _BidirectionalIterator1 , typename _BidirectionalIterator2 , typename _BinaryPredicate > _BidirectionalIterator1 __find_end (_BidirectionalIterator1 __first1, _BidirectionalIterator1 __last1, _BidirectionalIterator2 __first2, _BidirectionalIterator2 __last2, bidirectional_iterator_tag, bidirectional_iterator_tag, _BinaryPredicate __comp)— finds the last occurrence of the__first2…__last2range inside__first1…__last1, bidirectional lane, matching with__comp💅template<typename _BidirectionalIterator1 , typename _BidirectionalIterator2 > _BidirectionalIterator1 __find_end (_BidirectionalIterator1 __first1, _BidirectionalIterator1 __last1, _BidirectionalIterator2 __first2, _BidirectionalIterator2 __last2, bidirectional_iterator_tag, bidirectional_iterator_tag)— same last-occurrence hunt, bidirectional, with default matching 🦋template<typename _ForwardIterator1 , typename _ForwardIterator2 , typename _BinaryPredicate > _ForwardIterator1 __find_end (_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, forward_iterator_tag, forward_iterator_tag, _BinaryPredicate __comp)— last-occurrence hunt for forward iterators (the lane where you can't walk backwards, so it's doing the most 💀), matching with__comp🎀
okay bestie we're back in the internal-helper stretch of the list and ngl it is so long, but we do not skip, we do not skim, we read every single signature like the icons they are 💅✨
First up: the find girlies. Two flavours of __find_if, two of __find_if_not, and one __find_end that looked at the rules and said "i'll take the tag twice, thanks" 🙈
template<typename _ForwardIterator1 , typename _ForwardIterator2 >
_ForwardIterator1 __find_end (_ForwardIterator1 __first1,
_ForwardIterator1 __last1, _ForwardIterator2 __first2,
_ForwardIterator2 __last2, forward_iterator_tag,
forward_iterator_tag)
template<typename _RandomAccessIterator , typename _Predicate >
_RandomAccessIterator __find_if (_RandomAccessIterator __first,
_RandomAccessIterator __last, _Predicate __pred,
random_access_iterator_tag)
template<typename _InputIterator , typename _Predicate > _InputIterator
__find_if (_InputIterator __first, _InputIterator __last, _Predicate
__pred, input_iterator_tag)
template<typename _RandomAccessIterator , typename _Predicate >
_RandomAccessIterator __find_if_not (_RandomAccessIterator __first,
_RandomAccessIterator __last, _Predicate __pred,
random_access_iterator_tag)
template<typename _InputIterator , typename _Predicate > _InputIterator
__find_if_not (_InputIterator __first, _InputIterator __last,
_Predicate __pred, input_iterator_tag)
The way every one of these ends in an iterator tag is so consistent of them 🎀 random_access_iterator_tag girlies and input_iterator_tag girlies, no cap, we love a tag-dispatched queen.
Then a little grab bag — the gcd one, both __get_helper overloads (const and not, because duh 💅), and the once-functor lock:
template<typename _EuclideanRingElement > _EuclideanRingElement __gcd
(_EuclideanRingElement __m, _EuclideanRingElement __n)
template<std::size_t __i, typename _Head , typename... _Tail>
__add_c_ref< _Head >::type __get_helper (const _Tuple_impl< __i,
_Head, _Tail...> &__t)
template<std::size_t __i, typename _Head , typename... _Tail> __add_ref<
_Head >::type __get_helper (_Tuple_impl< __i, _Head, _Tail...> &__t)
unique_lock< mutex > & __get_once_functor_lock ()
Not the return type being literally unique_lock< mutex > &, main character energy fr fr 🫶 and __get_helper has a std::size_t __i template param plus a variadic pack — the way that's such a serve.
Heap select, both versions (you know the drill, one with _Compare and one without):
template<typename _RandomAccessIterator , typename _Compare > void
__heap_select (_RandomAccessIterator __first, _RandomAccessIterator
__middle, _RandomAccessIterator __last, _Compare __comp)
template<typename _RandomAccessIterator > void __heap_select
(_RandomAccessIterator __first, _RandomAccessIterator __middle,
_RandomAccessIterator __last)
And then __iconv_adaptor just showed up and ate 💀 look at that function-pointer parameter, it's giving "i take a function that takes a function":
template<typename _Tp > size_t __iconv_adaptor (size_t(*__func)(iconv_t,
_Tp, size_t *, char **, size_t *), iconv_t __cd, char **__inbuf,
size_t *__inbytes, char **__outbuf, size_t *__outbytes)
size_t(*__func)(iconv_t, _Tp, size_t *, char **, size_t *) — bestie that is five parameters inside a parameter. iconic, no notes 🌈
Now the stable-and-insertion sort crew:
template<typename _ForwardIterator , typename _Predicate , typename
_Distance > _ForwardIterator __inplace_stable_partition
(_ForwardIterator __first, _ForwardIterator __last, _Predicate
__pred, _Distance __len)
template<typename _RandomAccessIterator , typename _Compare > void
__inplace_stable_sort (_RandomAccessIterator __first,
_RandomAccessIterator __last, _Compare __comp)
template<typename _RandomAccessIterator > void __inplace_stable_sort
(_RandomAccessIterator __first, _RandomAccessIterator __last)
template<typename _RandomAccessIterator , typename _Compare > void
__insertion_sort (_RandomAccessIterator __first,
_RandomAccessIterator __last, _Compare __comp)
template<typename _RandomAccessIterator > void __insertion_sort
(_RandomAccessIterator __first, _RandomAccessIterator __last)
Every single one is "here's a _Compare, oh wait also here's the version without _Compare" — it's giving twin energy 👯♀️ the way they always come in pairs is honestly so real.
The intro crew plus a little char conversion moment:
template<typename _CharT , typename _ValueT >
_GLIBCXX_END_LDBL_NAMESPACE int __int_to_char (_CharT *__bufend,
_ValueT __v, const _CharT *__lit, ios_base::fmtflags __flags, bool
__dec)
template<typename _RandomAccessIterator , typename _Size , typename
_Compare > void __introselect (_RandomAccessIterator __first,
_RandomAccessIterator __nth, _RandomAccessIterator __last, _Size
__depth_limit, _Compare __comp)
template<typename _RandomAccessIterator , typename _Size > void
__introselect (_RandomAccessIterator __first, _RandomAccessIterator
__nth, _RandomAccessIterator __last, _Size __depth_limit)
template<typename _RandomAccessIterator , typename _Size , typename
_Compare > void __introsort_loop (_RandomAccessIterator __first,
_RandomAccessIterator __last, _Size __depth_limit, _Compare __comp)
template<typename _RandomAccessIterator , typename _Size > void
__introsort_loop (_RandomAccessIterator __first,
_RandomAccessIterator __last, _Size __depth_limit)
Don't sleep on _GLIBCXX_END_LDBL_NAMESPACE sitting right there at the front like a little nameplate 🎀 and __nth as a parameter name?? lowkey obsessed with that abbreviation, iykyk.
The two __invoke overloads, both wearing a big __gnu_cxx::__enable_if< coat:
template<typename _Functor , typename... _Args> __gnu_cxx::__enable_if<
(is_pointer< _Functor >::value &&is_function< typename
remove_pointer< _Functor >::type >::value), typename result_of<
_Functor(_Args...)>::type >::__type __invoke (_Functor __f, _Args
&...__args)
template<typename _Functor , typename... _Args> __gnu_cxx::__enable_if<
(!is_member_pointer< _Functor >::value &&!is_function< _Functor
>::value &&!is_function< typename remove_pointer< _Functor >::type
>::value), typename result_of< _Functor(_Args...)>::type >::__type
__invoke (_Functor &__f, _Args &...__args)
The first takes _Functor __f by value, the second takes _Functor &__f by reference — the way the & is just there, doing its little thing 🦋 and one's is_pointer / the other's !is_member_pointer — they're opposites, your honour 💅
__is_heap has four whole overloads and __is_heap_until has two, because why have one when you can have a whole friend group:
template<typename _RandomAccessIterator , typename _Compare > bool
__is_heap (_RandomAccessIterator __first, _RandomAccessIterator
__last, _Compare __comp)
template<typename _RandomAccessIterator > bool __is_heap
(_RandomAccessIterator __first, _RandomAccessIterator __last)
template<typename _RandomAccessIterator , typename _Compare , typename
_Distance > bool __is_heap (_RandomAccessIterator __first, _Compare
__comp, _Distance __n)
template<typename _RandomAccessIterator , typename _Distance > bool
__is_heap (_RandomAccessIterator __first, _Distance __n)
template<typename _RandomAccessIterator , typename _Distance , typename
_Compare > _Distance __is_heap_until (_RandomAccessIterator __first,
_Distance __n, _Compare __comp)
template<typename _RandomAccessIterator , typename _Distance > _Distance
__is_heap_until (_RandomAccessIterator __first, _Distance __n)
Note that the _Compare can sit before or after _Distance depending on which one you grabbed — that's not a typo bestie, that's just how the list is 😭 keep them straight, fr fr.
Then a cute little block of odds and ends:
template<typename _Iter > iterator_traits< _Iter >::iterator_category
__iterator_category (const _Iter &)
template<typename _II1 , typename _II2 > bool
__lexicographical_compare_aux (_II1 __first1, _II1 __last1, _II2
__first2, _II2 __last2)
long long __lg (long long __n)
long __lg (long __n)
int __lg (int __n)
template<typename _Size > _Size __lg (_Size __n)
__iterator_category doesn't even name its parameter — it's just (const _Iter &) like "you know who it is" 🙈 and __lg shows up four times, three plain overloads and one templated _Size one. the range 💀 long long, long, int, and then a template like "and also, whatever."
The median-and-merge crew, all six of them:
template<typename _Tp , typename _Compare > const _Tp & __median (const
_Tp &__a, const _Tp &__b, const _Tp &__c, _Compare __comp)
template<typename _Tp > const _Tp & __median (const _Tp &__a, const _Tp
&__b, const _Tp &__c)
template<typename _BidirectionalIterator , typename _Distance , typename
_Pointer , typename _Compare > void __merge_adaptive
(_BidirectionalIterator __first, _BidirectionalIterator __middle,
_BidirectionalIterator __last, _Distance __len1, _Distance __len2,
_Pointer __buffer, _Distance __buffer_size, _Compare __comp)
template<typename _BidirectionalIterator , typename _Distance , typename
_Pointer > void __merge_adaptive (_BidirectionalIterator __first,
_BidirectionalIterator __middle, _BidirectionalIterator __last,
_Distance __len1, _Distance __len2, _Pointer __buffer, _Distance
__buffer_size)
template<typename _BidirectionalIterator1 , typename
_BidirectionalIterator2 , typename _BidirectionalIterator3 ,
typename _Compare > _BidirectionalIterator3 __merge_backward
(_BidirectionalIterator1 __first1, _BidirectionalIterator1 __last1,
_BidirectionalIterator2 __first2, _BidirectionalIterator2 __last2,
_BidirectionalIterator3 __result, _Compare __comp)
template<typename _BidirectionalIterator1 , typename
_BidirectionalIterator2 , typename _BidirectionalIterator3 >
_BidirectionalIterator3 __merge_backward (_BidirectionalIterator1
__first1, _BidirectionalIterator1 __last1, _BidirectionalIterator2
__first2, _BidirectionalIterator2 __last2, _BidirectionalIterator3
__result)
The __median one returns const _Tp & — a reference, so no copying, slay 🫶 And __merge_backward has iterator types numbered 1, 2, 3 like a little trio of besties going backwards together. periodt.
More merge things!! because there is so much merging happening here:
template<typename _RandomAccessIterator1 , typename
_RandomAccessIterator2 , typename _Distance , typename _Compare >
void __merge_sort_loop (_RandomAccessIterator1 __first,
_RandomAccessIterator1 __last, _RandomAccessIterator2 __result,
_Distance __step_size, _Compare __comp)
template<typename _RandomAccessIterator1 , typename
_RandomAccessIterator2 , typename _Distance > void __merge_sort_loop
(_RandomAccessIterator1 __first, _RandomAccessIterator1 __last,
_RandomAccessIterator2 __result, _Distance __step_size)
template<typename _RandomAccessIterator , typename _Pointer , typename
_Compare > void __merge_sort_with_buffer (_RandomAccessIterator
__first, _RandomAccessIterator __last, _Pointer __buffer, _Compare
__comp)
template<typename _RandomAccessIterator , typename _Pointer > void
__merge_sort_with_buffer (_RandomAccessIterator __first,
_RandomAccessIterator __last, _Pointer __buffer)
template<typename _BidirectionalIterator , typename _Distance , typename
_Compare > void __merge_without_buffer (_BidirectionalIterator
__first, _BidirectionalIterator __middle, _BidirectionalIterator
__last, _Distance __len1, _Distance __len2, _Compare __comp)
template<typename _BidirectionalIterator , typename _Distance > void
__merge_without_buffer (_BidirectionalIterator __first,
_BidirectionalIterator __middle, _BidirectionalIterator __last,
_Distance __len1, _Distance __len2)
__merge_sort_with_buffer vs __merge_without_buffer — one has a buffer, one literally does not, and the names are telling you that to your face 💀 we stan a self-documenting signature.
Okay now a single lonely one with no template list at all, standing there alone in the rain:
void __once_proxy ()
no params, no template, no return value — just vibes 🌧️ honestly? respect.
The ostream gang arrived and they're all basic_ostream< _CharT, _Traits > coded:
template<typename _CharT , typename _Traits > void __ostream_fill
(basic_ostream< _CharT, _Traits > &__out, streamsize __n)
template<typename _CharT , typename _Traits > basic_ostream< _CharT,
_Traits > & __ostream_insert (basic_ostream< _CharT, _Traits >
&__out, const _CharT *__s, streamsize __n)
template<typename _CharT , typename _Traits > void __ostream_write
(basic_ostream< _CharT, _Traits > &__out, const _CharT *__s,
streamsize __n)
__ostream_insert returns basic_ostream< _CharT, _Traits > & — a reference back to the stream, so you can keep chaining. the way that's so classic << behaviour of it 💖 __ostream_fill takes no string at all, just streamsize __n, and __ostream_write takes the const _CharT *__s too. trio behaviour.
And finally, the partition/heap/pow section, wrapped up with a cliffhanger:
template<typename _BidirectionalIterator , typename _Predicate >
_BidirectionalIterator __partition (_BidirectionalIterator __first,
_BidirectionalIterator __last, _Predicate __pred,
bidirectional_iterator_tag)
template<typename _ForwardIterator , typename _Predicate >
_ForwardIterator __partition (_ForwardIterator __first,
_ForwardIterator __last, _Predicate __pred, forward_iterator_tag)
template<typename _RandomAccessIterator , typename _Compare > void
__pop_heap (_RandomAccessIterator __first, _RandomAccessIterator
__last, _RandomAccessIterator __result, _Compare __comp)
template<typename _RandomAccessIterator > void __pop_heap
(_RandomAccessIterator __first, _RandomAccessIterator __last,
_RandomAccessIterator __result)
template<typename _Tp > _Tp __pow_helper (_Tp __x, int __n)
template<typename _RandomAccessIterator , typename _Distance , typename
_Tp , typename _Compare > void __push_heap (_RandomAccessIterator
__first, _Distance __holeIndex, _Distance __topIndex, _Tp __value,
_Compare __comp)
template<typename _RandomAccessIterator , typename _Distance , typename
_Tp > void __push_heap (_RandomAccessIterator __first, _Distance
__holeIndex, _Distance __topIndex, _Tp __value)
template<typename _RandomAccessIterator > void __reverse
Two __partitions, one per iterator tag — bidirectional_iterator_tag and forward_iterator_tag — tag-dispatched again, she's consistent ✨ __pow_helper takes (_Tp __x, int __n) and returns _Tp, cute. And __push_heap is out here with _Distance __holeIndex and _Distance __topIndex — two _Distances, no waiting.
bestie the last one is literally just template<typename _RandomAccessIterator > void __reverse and then the manpage just stops 😭 mid-signature, mid-thought, mid-everything. she's not done, the page just ran out of room. grab the next part, we're picking her back up 💀🌸
okay so we're still deep in the roster and honestly it's giving backstage tour at the function theatre 💅 these are the little darlings that do the actual work while you're out here living your main character life. no notes, just vibes, and literally every line kept exactly where it was. 🎀
tiny heads up bestie: the very first thing below is the tail end of a declaration we started in the last part — the one for __reverse that eats random-access iterators. we're not rewinding, we're just picking up mid-sentence like it's a group chat voice note. 🫶
(_RandomAccessIterator __first, _RandomAccessIterator __last,
random_access_iterator_tag)
and here's __reverse again, but make it bidirectional 🦋
template<typename _BidirectionalIterator > void __reverse
(_BidirectionalIterator __first, _BidirectionalIterator __last,
bidirectional_iterator_tag)
🌈 the __rotate family (three whole siblings)
random-access version first, because she's the most flexible 💅
template<typename _RandomAccessIterator > void __rotate
(_RandomAccessIterator __first, _RandomAccessIterator __middle,
_RandomAccessIterator __last, random_access_iterator_tag)
then the bidirectional one, still gorgeous:
template<typename _BidirectionalIterator > void __rotate
(_BidirectionalIterator __first, _BidirectionalIterator __middle,
_BidirectionalIterator __last, bidirectional_iterator_tag)
and the forward-iterator one, doing her best with what she's got 😭
template<typename _ForwardIterator > void __rotate (_ForwardIterator
__first, _ForwardIterator __middle, _ForwardIterator __last,
forward_iterator_tag)
and then the adaptive one — note the extra __len1, __len2, __buffer and __buffer_size params, she comes prepared 👑
template<typename _BidirectionalIterator1 , typename
_BidirectionalIterator2 , typename _Distance >
_BidirectionalIterator1 __rotate_adaptive (_BidirectionalIterator1
__first, _BidirectionalIterator1 __middle, _BidirectionalIterator1
__last, _Distance __len1, _Distance __len2, _BidirectionalIterator2
__buffer, _Distance __buffer_size)
🔍 __search_n, four ways (with pred and without, RA and forward)
okay so __search_n shows up four separate times and we are NOT skipping a single one, periodt. with a _BinaryPredicate first:
template<typename _RandomAccessIter , typename _Integer , typename _Tp ,
typename _BinaryPredicate > _RandomAccessIter __search_n
(_RandomAccessIter __first, _RandomAccessIter __last, _Integer
__count, const _Tp &__val, _BinaryPredicate __binary_pred,
std::random_access_iterator_tag)
template<typename _ForwardIterator , typename _Integer , typename _Tp ,
typename _BinaryPredicate > _ForwardIterator __search_n
(_ForwardIterator __first, _ForwardIterator __last, _Integer
__count, const _Tp &__val, _BinaryPredicate __binary_pred,
std::forward_iterator_tag)
and then the plainer ones, no predicate, just __val and a __count:
template<typename _RandomAccessIter , typename _Integer , typename _Tp >
_RandomAccessIter __search_n (_RandomAccessIter __first,
_RandomAccessIter __last, _Integer __count, const _Tp &__val,
std::random_access_iterator_tag)
template<typename _ForwardIterator , typename _Integer , typename _Tp >
_ForwardIterator __search_n (_ForwardIterator __first,
_ForwardIterator __last, _Integer __count, const _Tp &__val,
std::forward_iterator_tag)
🎀 the stable ones (partition + sort, adaptive edition)
__stable_partition_adaptive — look at all six params, she's thorough:
template<typename _ForwardIterator , typename _Pointer , typename
_Predicate , typename _Distance > _ForwardIterator
__stable_partition_adaptive (_ForwardIterator __first,
_ForwardIterator __last, _Predicate __pred, _Distance __len,
_Pointer __buffer, _Distance __buffer_size)
__stable_sort_adaptive with a _Compare, then without — same energy, one fewer param 🌸
template<typename _RandomAccessIterator , typename _Pointer , typename
_Distance , typename _Compare > void __stable_sort_adaptive
(_RandomAccessIterator __first, _RandomAccessIterator __last,
_Pointer __buffer, _Distance __buffer_size, _Compare __comp)
template<typename _RandomAccessIterator , typename _Pointer , typename
_Distance > void __stable_sort_adaptive (_RandomAccessIterator
__first, _RandomAccessIterator __last, _Pointer __buffer, _Distance
__buffer_size)
💀 the __throw_… squad (they never come back)
okay these are the dramatic ones. notice basically all of them carry __attribute__((__noreturn__)) — the one that doesn't is __throw_bad_weak_ptr (), and yes we clocked it, no cap 🙈. keep every single one:
void __throw_bad_alloc (void) __attribute__((__noreturn__))
void __throw_bad_cast (void) __attribute__((__noreturn__))
void __throw_bad_exception (void) __attribute__((__noreturn__))
void __throw_bad_typeid (void) __attribute__((__noreturn__))
void __throw_bad_weak_ptr ()
void __throw_domain_error (const char *) __attribute__((__noreturn__))
void __throw_invalid_argument (const char *)
__attribute__((__noreturn__))
void __throw_ios_failure (const char *) __attribute__((__noreturn__))
void __throw_length_error (const char *) __attribute__((__noreturn__))
void __throw_logic_error (const char *) __attribute__((__noreturn__))
void __throw_out_of_range (const char *) __attribute__((__noreturn__))
void __throw_overflow_error (const char *) __attribute__((__noreturn__))
void __throw_range_error (const char *) __attribute__((__noreturn__))
void __throw_runtime_error (const char *) __attribute__((__noreturn__))
void __throw_system_error (int) __attribute__((__noreturn__))
void __throw_underflow_error (const char *)
__attribute__((__noreturn__))
also note: most of these take aconst char *, but__throw_bad_alloc,__throw_bad_cast,__throw_bad_exception,__throw_bad_typeidand__throw_bad_weak_ptrtakevoid/ nothing, and__throw_system_erroris the odd one out taking anint. iconic of her honestly. 👑
🧚 __tuple_cat_helper × 4 (rvalue/lvalue alignment chart)
four overloads, and the difference between them is purely whether __t and __u are && or const &. obsessed with the symmetry:
template<typename... _TElements, std::size_t... _TIdx, typename...
_UElements, std::size_t... _UIdx> tuple< _TElements...,
_UElements...> __tuple_cat_helper (tuple< _TElements...> &&__t,
const __index_holder< _TIdx...> &, tuple< _UElements...> &&__u,
const __index_holder< _UIdx...> &)
template<typename... _TElements, std::size_t... _TIdx, typename...
_UElements, std::size_t... _UIdx> tuple< _TElements...,
_UElements...> __tuple_cat_helper (const tuple< _TElements...> &__t,
const __index_holder< _TIdx...> &, tuple< _UElements...> &&__u,
const __index_holder< _UIdx...> &)
template<typename... _TElements, std::size_t... _TIdx, typename...
_UElements, std::size_t... _UIdx> tuple< _TElements...,
_UElements...> __tuple_cat_helper (tuple< _TElements...> &&__t,
const __index_holder< _TIdx...> &, const tuple< _UElements...> &__u,
const __index_holder< _UIdx...> &)
template<typename... _TElements, std::size_t... _TIdx, typename...
_UElements, std::size_t... _UIdx> tuple< _TElements...,
_UElements...> __tuple_cat_helper (const tuple< _TElements...> &__t,
const __index_holder< _TIdx...> &, const tuple< _UElements...> &__u,
const __index_holder< _UIdx...> &)
🔥 the __unguarded crew (living dangerously, name says so)
__unguarded_insertion_sort, with and without a _Compare:
template<typename _RandomAccessIterator , typename _Compare > void
__unguarded_insertion_sort (_RandomAccessIterator __first,
_RandomAccessIterator __last, _Compare __comp)
template<typename _RandomAccessIterator > void
__unguarded_insertion_sort (_RandomAccessIterator __first,
_RandomAccessIterator __last)
__unguarded_linear_insert — note it takes __last and a __val, not a first/last pair:
template<typename _RandomAccessIterator , typename _Tp , typename
_Compare > void __unguarded_linear_insert (_RandomAccessIterator
__last, _Tp __val, _Compare __comp)
template<typename _RandomAccessIterator , typename _Tp > void
__unguarded_linear_insert (_RandomAccessIterator __last, _Tp __val)
and __unguarded_partition, which returns a _RandomAccessIterator and takes a __pivot:
template<typename _RandomAccessIterator , typename _Tp , typename
_Compare > _RandomAccessIterator __unguarded_partition
(_RandomAccessIterator __first, _RandomAccessIterator __last, _Tp
__pivot, _Compare __comp)
template<typename _RandomAccessIterator , typename _Tp >
_RandomAccessIterator __unguarded_partition (_RandomAccessIterator
__first, _RandomAccessIterator __last, _Tp __pivot)
🍓 the __uninitialized_… saga (it's long, stay with me)
__uninitialized_copy_a, twice — once for allocator< _Tp > & (no parameter name! just the type, slay) and once for a plain _Allocator &__alloc:
template<typename _InputIterator , typename _ForwardIterator , typename
_Tp > _ForwardIterator __uninitialized_copy_a (_InputIterator
__first, _InputIterator __last, _ForwardIterator __result,
allocator< _Tp > &)
template<typename _InputIterator , typename _ForwardIterator , typename
_Allocator > _ForwardIterator __uninitialized_copy_a (_InputIterator
__first, _InputIterator __last, _ForwardIterator __result,
_Allocator &__alloc)
__uninitialized_copy_move — two iterator ranges, one result, one allocator, she's booked and busy:
template<typename _InputIterator1 , typename _InputIterator2 , typename
_ForwardIterator , typename _Allocator > _ForwardIterator
__uninitialized_copy_move (_InputIterator1 __first1, _InputIterator1
__last1, _InputIterator2 __first2, _InputIterator2 __last2,
_ForwardIterator __result, _Allocator &__alloc)
__uninitialized_copy_n, dispatched on random_access_iterator_tag vs input_iterator_tag:
template<typename _RandomAccessIterator , typename _Size , typename
_ForwardIterator > _ForwardIterator __uninitialized_copy_n
(_RandomAccessIterator __first, _Size __n, _ForwardIterator
__result, random_access_iterator_tag)
template<typename _InputIterator , typename _Size , typename
_ForwardIterator > _ForwardIterator __uninitialized_copy_n
(_InputIterator __first, _Size __n, _ForwardIterator __result,
input_iterator_tag)
then __uninitialized_fill_a, same double-act — allocator< _Tp2 > & and _Allocator &__alloc:
template<typename _ForwardIterator , typename _Tp , typename _Tp2 > void
__uninitialized_fill_a (_ForwardIterator __first, _ForwardIterator
__last, const _Tp &__x, allocator< _Tp2 > &)
template<typename _ForwardIterator , typename _Tp , typename _Allocator
> void __uninitialized_fill_a (_ForwardIterator __first,
_ForwardIterator __last, const _Tp &__x, _Allocator &__alloc)
__uninitialized_fill_move — yes, fill and move, in one, with a __mid in there too:
template<typename _ForwardIterator , typename _Tp , typename
_InputIterator , typename _Allocator > _ForwardIterator
__uninitialized_fill_move (_ForwardIterator __result,
_ForwardIterator __mid, const _Tp &__x, _InputIterator __first,
_InputIterator __last, _Allocator &__alloc)
__uninitialized_fill_n_a (the _n version, note the _Size __n), both flavors:
template<typename _ForwardIterator , typename _Size , typename _Tp ,
typename _Tp2 > void __uninitialized_fill_n_a (_ForwardIterator
__first, _Size __n, const _Tp &__x, allocator< _Tp2 > &)
template<typename _ForwardIterator , typename _Size , typename _Tp ,
typename _Allocator > void __uninitialized_fill_n_a
(_ForwardIterator __first, _Size __n, const _Tp &__x, _Allocator
&__alloc)
__uninitialized_move_a:
template<typename _InputIterator , typename _ForwardIterator , typename
_Allocator > _ForwardIterator __uninitialized_move_a (_InputIterator
__first, _InputIterator __last, _ForwardIterator __result,
_Allocator &__alloc)
__uninitialized_move_copy:
template<typename _InputIterator1 , typename _InputIterator2 , typename
_ForwardIterator , typename _Allocator > _ForwardIterator
__uninitialized_move_copy (_InputIterator1 __first1, _InputIterator1
__last1, _InputIterator2 __first2, _InputIterator2 __last2,
_ForwardIterator __result, _Allocator &__alloc)
and __uninitialized_move_fill (move + fill, the mirror of fill + move, we love a matched set ✨):
template<typename _InputIterator , typename _ForwardIterator , typename
_Tp , typename _Allocator > void __uninitialized_move_fill
(_InputIterator __first1, _InputIterator __last1, _ForwardIterator
__first2, _ForwardIterator __last2, const _Tp &__x, _Allocator
&__alloc)
🧵 __unique_copy (and yes, the list keeps going…)
three full ones so far, sorted by which iterator tags they take:
template<typename _InputIterator , typename _ForwardIterator , typename
_BinaryPredicate > _ForwardIterator __unique_copy (_InputIterator
__first, _InputIterator __last, _ForwardIterator __result,
_BinaryPredicate __binary_pred, input_iterator_tag,
forward_iterator_tag)
template<typename _InputIterator , typename _OutputIterator , typename
_BinaryPredicate > _OutputIterator __unique_copy (_InputIterator
__first, _InputIterator __last, _OutputIterator __result,
_BinaryPredicate __binary_pred, input_iterator_tag,
output_iterator_tag)
template<typename _ForwardIterator , typename _OutputIterator , typename
_BinaryPredicate > _OutputIterator __unique_copy (_ForwardIterator
__first, _ForwardIterator __last, _OutputIterator __result,
_BinaryPredicate __binary_pred, forward_iterator_tag,
output_iterator_tag)
the no-predicate ones now — _InputIterator → _ForwardIterator:
template<typename _InputIterator , typename _ForwardIterator >
_ForwardIterator __unique_copy (_InputIterator __first,
_InputIterator __last, _ForwardIterator __result,
input_iterator_tag, forward_iterator_tag)
and the last one we can see in this part is _InputIterator → _OutputIterator, mid-argument-list — we're literally cutting off right here, bestie, and we'll grab the rest in the next chunk 😭
template<typename _InputIterator , typename _OutputIterator >
_OutputIterator __unique_copy (_InputIterator __first,
🦋 to be continued… don't go anywhere, the roster is not done with us yet 🦋
ok so we're still deep in the function list and bestie it does not slow down 😭 but we're here, we're hydrated, let's go 💅
First up, the rest of the __unique_copy crew — same name, different iterator tags, which is literally the whole "overload" moment:
template<typename _InputIterator , typename _OutputIterator >
_OutputIterator __unique_copy (_InputIterator __first,
_InputIterator __last, _OutputIterator __result, input_iterator_tag,
output_iterator_tag)
template<typename _ForwardIterator , typename _OutputIterator >
_OutputIterator __unique_copy (_ForwardIterator __first,
_ForwardIterator __last, _OutputIterator __result,
forward_iterator_tag, output_iterator_tag)
🌈 the __valarray_copy army (yes, all of them)
ok so __valarray_copy has, like, a lot of forms. The _Array< _Tp > ones take arrays and a size, and the trailing params mix in _Array< bool > masks, _Array< size_t > index arrays, and size_t strides — like, every combo the implementers needed, no cap. Here's the full set of non-_Expr array-taking ones plus the expression ones:
template<typename _Tp , class _Dom > void __valarray_copy (const _Expr<
_Dom, _Tp > &__e, size_t __n, _Array< _Tp > __a, _Array< bool > __m)
template<typename _Tp > void __valarray_copy (_Array< _Tp > __e, _Array<
size_t > __f, size_t __n, _Array< _Tp > __a, _Array< size_t > __i)
template<typename _Tp , class _Dom > void __valarray_copy (const _Expr<
_Dom, _Tp > &__e, size_t __n, _Array< _Tp > __a, _Array< size_t >
__i)
template<typename _Tp , class _Dom > void __valarray_copy (const _Expr<
_Dom, _Tp > &__e, size_t __n, _Array< _Tp > __a, size_t __s)
template<typename _Tp , class _Dom > void __valarray_copy (const _Expr<
_Dom, _Tp > &__e, size_t __n, _Array< _Tp > __a)
template<typename _Tp > void __valarray_copy (_Array< _Tp > __a, _Array<
bool > __m, size_t __n, _Array< _Tp > __b, _Array< bool > __k)
template<typename _Tp > void __valarray_copy (_Array< _Tp > __a, size_t
__n, _Array< _Tp > __b, _Array< bool > __m)
template<typename _Tp > void __valarray_copy (_Array< _Tp > __a, _Array<
bool > __m, _Array< _Tp > __b, size_t __n)
template<typename _Tp > void __valarray_copy (_Array< _Tp > __src,
size_t __n, _Array< size_t > __i, _Array< _Tp > __dst, _Array<
size_t > __j)
template<typename _Tp > void __valarray_copy (_Array< _Tp > __a, size_t
__n, _Array< _Tp > __b, _Array< size_t > __i)
template<typename _Tp > void __valarray_copy (_Array< _Tp > __a, _Array<
size_t > __i, _Array< _Tp > __b, size_t __n)
template<typename _Tp > void __valarray_copy (_Array< _Tp > __a, size_t
__n, size_t __s1, _Array< _Tp > __b, size_t __s2)
template<typename _Tp > void __valarray_copy (_Array< _Tp > __a, _Array<
_Tp > __b, size_t __n, size_t __s)
template<typename _Tp > void __valarray_copy (_Array< _Tp > __a, size_t
__n, size_t __s, _Array< _Tp > __b)
template<typename _Tp > void __valarray_copy (_Array< _Tp > __a, size_t
__n, _Array< _Tp > __b)
and then ✨ the pointer era ✨ — same deal but with raw pointers, and every one of them is wearing __restrict__ like a little designer accessory 💅
template<typename _Tp > void __valarray_copy (const _Tp *__restrict__
__src, size_t __n, const size_t *__restrict__ __i, _Tp *__restrict__
__dst, const size_t *__restrict__ __j)
template<typename _Tp > void __valarray_copy (const _Tp *__restrict__
__a, size_t __n, _Tp *__restrict__ __b, const size_t *__restrict__
__i)
template<typename _Tp > void __valarray_copy (const _Tp *__restrict__
__a, const size_t *__restrict__ __i, _Tp *__restrict__ __b, size_t
__n)
template<typename _Tp > void __valarray_copy (const _Tp *__restrict__
__src, size_t __n, size_t __s1, _Tp *__restrict__ __dst, size_t
__s2)
template<typename _Tp > void __valarray_copy (const _Tp *__restrict__
__a, _Tp *__restrict__ __b, size_t __n, size_t __s)
template<typename _Tp > void __valarray_copy (const _Tp *__restrict__
__a, size_t __n, size_t __s, _Tp *__restrict__ __b)
template<typename _Tp > void __valarray_copy (const _Tp *__restrict__
__a, size_t __n, _Tp *__restrict__ __b)
🦋 __valarray_copy_construct (the copy but make it construct)
seven of them, and the param names switch over to __o for the output in the pointer versions — she changed her name mid-tour, iconic behavior:
template<typename _Tp > void __valarray_copy_construct (_Array< _Tp >
__a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
template<typename _Tp , class _Dom > void __valarray_copy_construct
(const _Expr< _Dom, _Tp > &__e, size_t __n, _Array< _Tp > __a)
template<typename _Tp > void __valarray_copy_construct (_Array< _Tp >
__a, size_t __n, size_t __s, _Array< _Tp > __b)
template<typename _Tp > void __valarray_copy_construct (_Array< _Tp >
__a, _Array< size_t > __i, _Array< _Tp > __b, size_t __n)
template<typename _Tp > void __valarray_copy_construct (const _Tp
*__restrict__ __a, const size_t *__restrict__ __i, _Tp *__restrict__
__o, size_t __n)
template<typename _Tp > void __valarray_copy_construct (const _Tp
*__restrict__ __a, size_t __n, size_t __s, _Tp *__restrict__ __o)
template<typename _Tp > void __valarray_copy_construct (const _Tp
*__restrict__ __b, const _Tp *__restrict__ __e, _Tp *__restrict__
__o)
🎀 construct / destroy / fill corner
__valarray_default_construct and __valarray_destroy_elements both take a begin/end pointer pair (__b and __e — cute matching initials 🫶), and then __valarray_fill shows up seven times because she contains multitudes:
template<typename _Tp > void __valarray_default_construct (_Tp
*__restrict__ __b, _Tp *__restrict__ __e)
template<typename _Tp > void __valarray_destroy_elements (_Tp
*__restrict__ __b, _Tp *__restrict__ __e)
template<typename _Tp > void __valarray_fill (_Array< _Tp > __a, size_t
__n, _Array< bool > __m, const _Tp &__t)
template<typename _Tp > void __valarray_fill (_Array< _Tp > __a, _Array<
size_t > __i, size_t __n, const _Tp &__t)
template<typename _Tp > void __valarray_fill (_Array< _Tp > __a, size_t
__n, size_t __s, const _Tp &__t)
template<typename _Tp > void __valarray_fill (_Array< _Tp > __a, size_t
__n, const _Tp &__t)
template<typename _Tp > void __valarray_fill (_Tp *__restrict__ __a,
const size_t *__restrict__ __i, size_t __n, const _Tp &__t)
template<typename _Tp > void __valarray_fill (_Tp *__restrict__ __a,
size_t __n, size_t __s, const _Tp &__t)
template<typename _Tp > void __valarray_fill (_Tp *__restrict__ __a,
size_t __n, const _Tp &__t)
template<typename _Tp > void __valarray_fill_construct (_Tp
*__restrict__ __b, _Tp *__restrict__ __e, const _Tp __t)
ngl,__valarray_fill_constructis the one that takes the value by value (const _Tp __t) while literally every__valarray_filltakes it byconst _Tp &__t— not me noticing, just saying 👀 (the manpage says it, I'm just reading it out loud)
⭐ memory + math helpers
the ✨glow up✨ section where the valarray internals do their little utility era. __valarray_get_memory returns void *, __valarray_get_storage is the templated _Tp *__restrict__ version, and __valarray_release_memory takes that void *__p right back:
void * __valarray_get_memory (size_t __n)
template<typename _Tp > _Tp *__restrict__ __valarray_get_storage (size_t
__n)
template<typename _Ta > _Ta::value_type __valarray_max (const _Ta &__a)
template<typename _Ta > _Ta::value_type __valarray_min (const _Ta &__a)
template<typename _Tp > _Tp __valarray_product (const _Tp *__restrict__
__f, const _Tp *__restrict__ __l)
void __valarray_release_memory (void *__p)
template<typename _Tp > _Tp __valarray_sum (const _Tp *__restrict__ __f,
const _Tp *__restrict__ __l)
ok lowkey obsessed with the __valarray_max / __valarray_min glow: they template on _Ta and return _Ta::value_type, so the return type is pulled out of the container type itself — that's giving main character energy fr 💜
🧚 __verify_grouping and the __write twins
__verify_grouping takes a const char *__grouping, a size_t __grouping_size, and a const string &__grouping_tmp, and returns bool — and then __write comes in two flavours:
- one generic
template<typename _CharT , typename _OutIter >returning_OutIter, taking an_OutIter __s, aconst _CharT *__ws, and anint __len - one
template<typename _CharT >overload that's specially aboutostreambuf_iterator< _CharT >and returnsostreambuf_iterator< _CharT >
bool __verify_grouping (const char *__grouping, size_t __grouping_size,
const string &__grouping_tmp)
template<typename _CharT , typename _OutIter > _OutIter __write
(_OutIter __s, const _CharT *__ws, int __len)
template<typename _CharT > ostreambuf_iterator< _CharT > __write
(ostreambuf_iterator< _CharT > __s, const _CharT *__ws, int __len)
same function name, same three-ish arguments, different return type — that's the overload telling you it's giving iterator vs it's giving streambuf iterator 💅
🔥 the _Array_augmented___bitwise_* saga begins
ok this is where the manpage really just starts flexing. For each bitwise op there's a matching set of twelve forms: one with a mask + _Expr, one with size_t __n + mask, one with mask first, then the index-array (_Array< size_t > __i) versions, then the stride (size_t __s) versions, then the plain _Expr / plain array / plain scalar versions. Same rhythm every time — like a little choreography 🩰
_Array_augmented___bitwise_and
template<typename _Tp , class _Dom > void _Array_augmented___bitwise_and
(_Array< _Tp > __a, _Array< bool > __m, const _Expr< _Dom, _Tp >
&__e, size_t __n)
template<typename _Tp > void _Array_augmented___bitwise_and (_Array< _Tp
> __a, size_t __n, _Array< _Tp > __b, _Array< bool > __m)
template<typename _Tp > void _Array_augmented___bitwise_and (_Array< _Tp
> __a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
template<typename _Tp , class _Dom > void _Array_augmented___bitwise_and
(_Array< _Tp > __a, _Array< size_t > __i, const _Expr< _Dom, _Tp >
&__e, size_t __n)
template<typename _Tp > void _Array_augmented___bitwise_and (_Array< _Tp
> __a, size_t __n, _Array< _Tp > __b, _Array< size_t > __i)
template<typename _Tp > void _Array_augmented___bitwise_and (_Array< _Tp
> __a, _Array< size_t > __i, _Array< _Tp > __b, size_t __n)
template<typename _Tp , class _Dom > void _Array_augmented___bitwise_and
(_Array< _Tp > __a, size_t __s, const _Expr< _Dom, _Tp > &__e,
size_t __n)
template<typename _Tp > void _Array_augmented___bitwise_and (_Array< _Tp
> __a, _Array< _Tp > __b, size_t __n, size_t __s)
template<typename _Tp > void _Array_augmented___bitwise_and (_Array< _Tp
> __a, size_t __n, size_t __s, _Array< _Tp > __b)
template<typename _Tp , class _Dom > void _Array_augmented___bitwise_and
(_Array< _Tp > __a, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___bitwise_and (_Array< _Tp
> __a, size_t __n, _Array< _Tp > __b)
template<typename _Tp > void _Array_augmented___bitwise_and (_Array< _Tp
> __a, size_t __n, const _Tp &__t)
_Array_augmented___bitwise_or
literally the same twelve, swapped op — she's the twin sister 🫶
template<typename _Tp , class _Dom > void _Array_augmented___bitwise_or
(_Array< _Tp > __a, _Array< bool > __m, const _Expr< _Dom, _Tp >
&__e, size_t __n)
template<typename _Tp > void _Array_augmented___bitwise_or (_Array< _Tp
> __a, size_t __n, _Array< _Tp > __b, _Array< bool > __m)
template<typename _Tp > void _Array_augmented___bitwise_or (_Array< _Tp
> __a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
template<typename _Tp , class _Dom > void _Array_augmented___bitwise_or
(_Array< _Tp > __a, _Array< size_t > __i, const _Expr< _Dom, _Tp >
&__e, size_t __n)
template<typename _Tp > void _Array_augmented___bitwise_or (_Array< _Tp
> __a, size_t __n, _Array< _Tp > __b, _Array< size_t > __i)
template<typename _Tp > void _Array_augmented___bitwise_or (_Array< _Tp
> __a, _Array< size_t > __i, _Array< _Tp > __b, size_t __n)
template<typename _Tp , class _Dom > void _Array_augmented___bitwise_or
(_Array< _Tp > __a, size_t __s, const _Expr< _Dom, _Tp > &__e,
size_t __n)
template<typename _Tp > void _Array_augmented___bitwise_or (_Array< _Tp
> __a, _Array< _Tp > __b, size_t __n, size_t __s)
template<typename _Tp > void _Array_augmented___bitwise_or (_Array< _Tp
> __a, size_t __n, size_t __s, _Array< _Tp > __b)
template<typename _Tp , class _Dom > void _Array_augmented___bitwise_or
(_Array< _Tp > __a, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___bitwise_or (_Array< _Tp
> __a, size_t __n, _Array< _Tp > __b)
template<typename _Tp > void _Array_augmented___bitwise_or (_Array< _Tp
> __a, size_t __n, const _Tp &__t)
_Array_augmented___bitwise_xor
and the third sister is also matching — but bestie she's not done yet, she gets cut off right here 😭 don't worry, we pick her right back up in the next part:
template<typename _Tp , class _Dom > void _Array_augmented___bitwise_xor
(_Array< _Tp > __a, _Array< bool > __m, const _Expr< _Dom, _Tp >
&__e, size_t __n)
template<typename _Tp > void _Array_augmented___bitwise_xor (_Array< _Tp
> __a, size_t __n, _Array< _Tp > __b, _Array< bool > __m)
template<typename _Tp > void _Array_augmented___bitwise_xor (_Array< _Tp
> __a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
template<typename _Tp , class _Dom > void _Array_augmented___bitwise_xor
(_Array< _Tp > __a, _Array< size_t > __i, const _Expr< _Dom, _Tp >
&__e, size_t __n)
template<typename _Tp > void _Array_augmented___bitwise_xor (_Array< _Tp
> __a, size_t __n, _Array< _Tp > __b, _Array< size_t > __i)
template<typename _Tp > void _Array_augmented___bitwise_xor (_Array< _Tp
> __a, _Array< size_t > __i, _Array< _Tp > __b, size_t __n)
template<typename _Tp , class _Dom > void _Array_augmented___bitwise_xor
(_Array< _Tp > __a, size_t __s, const _Expr< _Dom, _Tp > &__e,
size_t __n)
template<typename _Tp > void _Array_augmented___bitwise_xor (_Array< _Tp
> __a, _Array< _Tp > __b, size_t __n, size_t __s)
okay so we're deep in the function list now and it is A LOT — hydrate bestie, because this stretch is basically the same twelve-ish overloads copy-pasted for every single operator 💀 the way that _Array_augmented_ just keeps going forever… iconic stamina honestly 👑
quick vibe check on the pattern before we drown in template<typename _Tp > — every operator below ships a whole squad of overloads: one that takes an _Expr< _Dom, _Tp > &__e (sometimes with a size_t __s, sometimes with an _Array< size_t > __i), ones that take an _Array< bool > __m, ones that pass a _Array< _Tp > __b around with size_t __n and/or size_t __s, a plain _Array< _Tp > __a, size_t __n, _Array< _Tp > __b version, and one that just takes a single const _Tp &__t. same energy, different operator. iykyk 🫶
the __bitwise_xor crew — small squad this time, only four of them showed up in this stretch ✨
template<typename _Tp > void _Array_augmented___bitwise_xor (_Array< _Tp > __a, size_t __n, size_t __s, _Array< _Tp > __b)
template<typename _Tp , class _Dom > void _Array_augmented___bitwise_xor (_Array< _Tp > __a, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___bitwise_xor (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b)
template<typename _Tp > void _Array_augmented___bitwise_xor (_Array< _Tp > __a, size_t __n, const _Tp &__t)
four overloads and we move on. blessed brevity fr 💖
the __divides crew — okay now we're in the full twelve, no notes 🌸
template<typename _Tp , class _Dom > void _Array_augmented___divides (_Array< _Tp > __a, _Array< bool > __m, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___divides (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< bool > __m)
template<typename _Tp > void _Array_augmented___divides (_Array< _Tp > __a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
template<typename _Tp , class _Dom > void _Array_augmented___divides (_Array< _Tp > __a, _Array< size_t > __i, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___divides (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< size_t > __i)
template<typename _Tp > void _Array_augmented___divides (_Array< _Tp > __a, _Array< size_t > __i, _Array< _Tp > __b, size_t __n)
template<typename _Tp , class _Dom > void _Array_augmented___divides (_Array< _Tp > __a, size_t __s, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___divides (_Array< _Tp > __a, _Array< _Tp > __b, size_t __n, size_t __s)
template<typename _Tp > void _Array_augmented___divides (_Array< _Tp > __a, size_t __n, size_t __s, _Array< _Tp > __b)
template<typename _Tp , class _Dom > void _Array_augmented___divides (_Array< _Tp > __a, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___divides (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b)
template<typename _Tp > void _Array_augmented___divides (_Array< _Tp > __a, size_t __n, const _Tp &__t)
twelve of them. twelve. and that's just divides. the way this page has range 😭🔥
the __minus crew — same twelve, different operator, still eating 💅
template<typename _Tp , class _Dom > void _Array_augmented___minus (_Array< _Tp > __a, _Array< bool > __m, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___minus (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< bool > __m)
template<typename _Tp > void _Array_augmented___minus (_Array< _Tp > __a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
template<typename _Tp , class _Dom > void _Array_augmented___minus (_Array< _Tp > __a, _Array< size_t > __i, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___minus (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< size_t > __i)
template<typename _Tp > void _Array_augmented___minus (_Array< _Tp > __a, _Array< size_t > __i, _Array< _Tp > __b, size_t __n)
template<typename _Tp , class _Dom > void _Array_augmented___minus (_Array< _Tp > __a, size_t __s, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___minus (_Array< _Tp > __a, _Array< _Tp > __b, size_t __n, size_t __s)
template<typename _Tp > void _Array_augmented___minus (_Array< _Tp > __a, size_t __n, size_t __s, _Array< _Tp > __b)
template<typename _Tp , class _Dom > void _Array_augmented___minus (_Array< _Tp > __a, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___minus (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b)
template<typename _Tp > void _Array_augmented___minus (_Array< _Tp > __a, size_t __n, const _Tp &__t)
note how _Array< bool > __m and _Array< size_t > __i keep swapping seats like they're playing musical chairs 🎀
the __modulus crew — bestie the remainder overloads have lore now 🦋
template<typename _Tp , class _Dom > void _Array_augmented___modulus (_Array< _Tp > __a, _Array< bool > __m, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___modulus (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< bool > __m)
template<typename _Tp > void _Array_augmented___modulus (_Array< _Tp > __a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
template<typename _Tp , class _Dom > void _Array_augmented___modulus (_Array< _Tp > __a, _Array< size_t > __i, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___modulus (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< size_t > __i)
template<typename _Tp > void _Array_augmented___modulus (_Array< _Tp > __a, _Array< size_t > __i, _Array< _Tp > __b, size_t __n)
template<typename _Tp , class _Dom > void _Array_augmented___modulus (_Array< _Tp > __a, size_t __s, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___modulus (_Array< _Tp > __a, _Array< _Tp > __b, size_t __n, size_t __s)
template<typename _Tp > void _Array_augmented___modulus (_Array< _Tp > __a, size_t __n, size_t __s, _Array< _Tp > __b)
template<typename _Tp , class _Dom > void _Array_augmented___modulus (_Array< _Tp > __a, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___modulus (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b)
template<typename _Tp > void _Array_augmented___modulus (_Array< _Tp > __a, size_t __n, const _Tp &__t)
if you clocked that the argument order flips between overloads, yes, it does, and no, i'm not okay about it either 🙈
the __multiplies crew — main character operator behaviour honestly 👑⭐
template<typename _Tp , class _Dom > void _Array_augmented___multiplies (_Array< _Tp > __a, _Array< bool > __m, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___multiplies (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< bool > __m)
template<typename _Tp > void _Array_augmented___multiplies (_Array< _Tp > __a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
template<typename _Tp , class _Dom > void _Array_augmented___multiplies (_Array< _Tp > __a, _Array< size_t > __i, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___multiplies (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< size_t > __i)
template<typename _Tp > void _Array_augmented___multiplies (_Array< _Tp > __a, _Array< size_t > __i, _Array< _Tp > __b, size_t __n)
template<typename _Tp , class _Dom > void _Array_augmented___multiplies (_Array< _Tp > __a, size_t __s, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___multiplies (_Array< _Tp > __a, _Array< _Tp > __b, size_t __n, size_t __s)
template<typename _Tp > void _Array_augmented___multiplies (_Array< _Tp > __a, size_t __n, size_t __s, _Array< _Tp > __b)
template<typename _Tp , class _Dom > void _Array_augmented___multiplies (_Array< _Tp > __a, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___multiplies (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b)
template<typename _Tp > void _Array_augmented___multiplies (_Array< _Tp > __a, size_t __n, const _Tp &__t)
lowkey the way these lines keep wrapping in the original is giving "the terminal gave up" ✨ but the signatures themselves? immaculate. no cap 🫶
the __plus crew — the moment the page goes full circle back to the vibiest operator 🌈💜
template<typename _Tp , class _Dom > void _Array_augmented___plus (_Array< _Tp > __a, _Array< bool > __m, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___plus (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< bool > __m)
template<typename _Tp > void _Array_augmented___plus (_Array< _Tp > __a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
template<typename _Tp , class _Dom > void _Array_augmented___plus (_Array< _Tp > __a, _Array< size_t > __i, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___plus (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< size_t > __i)
template<typename _Tp > void _Array_augmented___plus (_Array< _Tp > __a, _Array< size_t > __i, _Array< _Tp > __b, size_t __n)
template<typename _Tp , class _Dom > void _Array_augmented___plus (_Array< _Tp > __a, size_t __s, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___plus (_Array< _Tp > __a, _Array< _Tp > __b, size_t __n, size_t __s)
template<typename _Tp > void _Array_augmented___plus (_Array< _Tp > __a, size_t __n, size_t __s, _Array< _Tp > __b)
template<typename _Tp , class _Dom > void _Array_augmented___plus (_Array< _Tp > __a, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___plus (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b)
template<typename _Tp > void _Array_augmented___plus (_Array< _Tp > __a, size_t __n, const _Tp &__t)
size_t __n, size_t __s, _Array< size_t > __i, _Array< bool > __m — the little cast of characters that carries this entire page 🎀
the __shift_left crew — shifting into gear, pun absolutely intended, sorry not sorry 🔥
template<typename _Tp , class _Dom > void _Array_augmented___shift_left (_Array< _Tp > __a, _Array< bool > __m, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___shift_left (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< bool > __m)
template<typename _Tp > void _Array_augmented___shift_left (_Array< _Tp > __a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
template<typename _Tp , class _Dom > void _Array_augmented___shift_left (_Array< _Tp > __a, _Array< size_t > __i, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___shift_left (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< size_t > __i)
template<typename _Tp > void _Array_augmented___shift_left (_Array< _Tp > __a, _Array< size_t > __i, _Array< _Tp > __b, size_t __n)
template<typename _Tp , class _Dom > void _Array_augmented___shift_left (_Array< _Tp > __a, size_t __s, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___shift_left (_Array< _Tp > __a, _Array< _Tp > __b, size_t __n, size_t __s)
template<typename _Tp > void _Array_augmented___shift_left (_Array< _Tp > __a, size_t __n, size_t __s, _Array< _Tp > __b)
template<typename _Tp , class _Dom > void _Array_augmented___shift_left (_Array< _Tp > __a, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___shift_left (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b)
template<typename _Tp > void _Array_augmented___shift_left (_Array< _Tp > __a, size_t __n, const _Tp &__t)
twelve again. the consistency is honestly so satisfying, it's giving choreography 💃
the __shift_right crew — and here's where this part of the page runs out of road 😭 only four made it in before the excerpt cuts off:
template<typename _Tp , class _Dom > void _Array_augmented___shift_right (_Array< _Tp > __a, _Array< bool > __m, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___shift_right (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< bool > __m)
template<typename _Tp > void _Array_augmented___shift_right (_Array< _Tp > __a, _Array< bool > __m, _Array< _Tp > __b, size_t __n)
template<typename _Tp , class _Dom > void _Array_augmented___shift_right (_Array< _Tp > __a, _Array< size_t > __i, const _Expr< _Dom, _Tp > &__e, size_t __n)
ngl we're literally mid-_Array< size_t > __iover here — the__shift_rightsquad is clearly not done, so don't go anywhere bestie 🧚
okay so that's the run of _Array_augmented_ operators in this stretch — __bitwise_xor, __divides, __minus, __modulus, __multiplies, __plus, __shift_left, and a half-finished __shift_right — and the page just keeps rolling from here 💀🍓
okay so we're still deep in the big A-list of declarations — pt. 11, no stopping, let's go 💅
the _Array_augmented___shift_right squad 🌀
every single overload, do NOT merge them, do NOT "clean them up", they are all real:
template<typename _Tp > void _Array_augmented___shift_right (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b, _Array< size_t > __i)
template<typename _Tp > void _Array_augmented___shift_right (_Array< _Tp > __a, _Array< size_t > __i, _Array< _Tp > __b, size_t __n)
template<typename _Tp , class _Dom > void _Array_augmented___shift_right (_Array< _Tp > __a, size_t __s, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___shift_right (_Array< _Tp > __a, _Array< _Tp > __b, size_t __n, size_t __s)
template<typename _Tp > void _Array_augmented___shift_right (_Array< _Tp > __a, size_t __n, size_t __s, _Array< _Tp > __b)
template<typename _Tp , class _Dom > void _Array_augmented___shift_right (_Array< _Tp > __a, const _Expr< _Dom, _Tp > &__e, size_t __n)
template<typename _Tp > void _Array_augmented___shift_right (_Array< _Tp > __a, size_t __n, _Array< _Tp > __b)
template<typename _Tp > void _Array_augmented___shift_right (_Array< _Tp > __a, size_t __n, const _Tp &__t)
like… eight of them. eight!! the way this function said "I contain multitudes" 😭 the vibe is very much "we have a form for every combination of _Array, size_t, _Expr and const _Tp & you could possibly throw at us". iconic honestly 💖
_Construct and the _Destroy family 🧚
template<typename _T1 , typename _T2 > void _Construct (_T1 *__p, const _T2 &__value)
template<typename _ForwardIterator , typename _Tp > void _Destroy (_ForwardIterator __first, _ForwardIterator __last, allocator< _Tp > &)
(that last parameter is literally unnamed — we respect the mystery ✨)
template<typename _ForwardIterator , typename _Allocator > void _Destroy (_ForwardIterator __first, _ForwardIterator __last, _Allocator &__alloc)
template<typename _ForwardIterator > void _Destroy (_ForwardIterator __first, _ForwardIterator __last)
template<typename _Tp > void _Destroy (_Tp *__pointer)
four flavors of destruction: allocator-flavored with a _Tp, allocator-flavored with _Allocator, plain range, and single pointer. bye bestie 👋💀
red-black tree internals, aka main character energy 🔥
unsigned int _Rb_tree_black_count (const _Rb_tree_node_base *__node, const _Rb_tree_node_base *__root)
const _Rb_tree_node_base * _Rb_tree_decrement (const _Rb_tree_node_base *__x)
_Rb_tree_node_base * _Rb_tree_decrement (_Rb_tree_node_base *__x)
const _Rb_tree_node_base * _Rb_tree_increment (const _Rb_tree_node_base *__x)
_Rb_tree_node_base * _Rb_tree_increment (_Rb_tree_node_base *__x)
notice how _Rb_tree_increment and _Rb_tree_decrement both come in const and non-const and the return type matches the parameter constness exactly 🎀 that's not a typo, that's craft. keep both, periodt.
void _Rb_tree_insert_and_rebalance (const bool __insert_left, _Rb_tree_node_base *__x, _Rb_tree_node_base *__p, _Rb_tree_node_base &__header)
_Rb_tree_node_base * _Rb_tree_rebalance_for_erase (_Rb_tree_node_base *const __z, _Rb_tree_node_base &__header)
__insert_left is a const bool and __header is a reference, and __z is *const — yes, all of that matters, copy it character for character or it's not the same function, no cap 💜
chaos interlude: abort() 🙈
void abort (void)
just vibing here in the middle of the C++ headers. abort, taking void, returning void. no thoughts, head empty, but she's on the list so she stays 💀
abs — every single one 🍓
template<typename _Tp > _Expr< _UnClos< __abs, _ValArray, _Tp >, _Tp > abs (const valarray< _Tp > &__v)
template<class _Dom > _Expr< _UnClos< __abs, _Expr, _Dom >, typename _Dom::value_type > abs (const _Expr< _Dom, typename _Dom::value_type > &__e)
long double abs (long double __x)
float abs (float __x)
double abs (double __x)
template<typename _Tp > _Tp abs (const complex< _Tp > &)
valarray version, _Expr version, long double, float, double, and the complex template one (whose parameter is also unnamed, we stan a private queen 🫶). six whole abses. the way math said "absolute value but make it a whole ecosystem" ⭐
accumulate ➕
template<typename _InputIterator , typename _Tp , typename _BinaryOperation > _Tp accumulate (_InputIterator __first, _InputIterator __last, _Tp __init, _BinaryOperation __binary_op)
template<typename _InputIterator , typename _Tp > _Tp accumulate (_InputIterator __first, _InputIterator __last, _Tp __init)
one with your own __binary_op, one without. same __first/__last/__init trio in both. slay 🌸
the acos collection 🦋
template<typename _Tp > _Expr< _UnClos< __acos, _ValArray, _Tp >, _Tp > acos (const valarray< _Tp > &__v)
template<class _Dom > _Expr< _UnClos< __acos, _Expr, _Dom >, typename _Dom::value_type > acos (const _Expr< _Dom, typename _Dom::value_type > &__e)
template<typename _Tp > std::complex< _Tp > acos (const std::complex< _Tp > &__z)
template<typename _Tp > __gnu_cxx::__enable_if< __is_integer< _Tp >::__value, double >::__type acos (_Tp __x)
long double acos (long double __x)
float acos (float __x)
valarray, _Expr, std::complex, the __gnu_cxx::__enable_if-gated integer one (returns double, okay?? that's the rule, iykyk), plus long double and float. six again. consistency is her brand 💅
template<typename _Tp > std::complex< _Tp > acosh (const std::complex< _Tp > &__z)
and there's acosh chillin' with just the one std::complex overload. she's lowkey shy 🎀
adjacent_difference & adjacent_find 🌈
template<typename _InputIterator , typename _OutputIterator , typename _BinaryOperation > _OutputIterator adjacent_difference (_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOperation __binary_op)
template<typename _InputIterator , typename _OutputIterator > _OutputIterator adjacent_difference (_InputIterator __first, _InputIterator __last, _OutputIterator __result)
then the find-er, in four — yes four — forms:
template<typename _ForwardIterator , typename _BinaryPredicate > _ForwardIterator adjacent_find (_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __binary_pred)
template<typename _ForwardIterator > _ForwardIterator adjacent_find (_ForwardIterator __first, _ForwardIterator __last)
template<typename _FIter , typename _BinaryPredicate > _FIter adjacent_find (_FIter, _FIter, _BinaryPredicate)
template<typename _FIter > _FIter adjacent_find (_FIter, _FIter)
the last two use _FIter and have no parameter names at all — just types, standing there, mysterious, gorgeous 🙈 and yes both pairs exist, _ForwardIterator flavored and _FIter flavored. do not ask me why. do not ask the manpage why either. it's giving "it is what it is" ✨
advance, all_of, any_of ⭐
template<typename _InputIterator , typename _Distance > void advance (_InputIterator &__i, _Distance __n)
note the &__i — reference, she mutates in place, that's the whole point 💖
template<typename _InputIterator , typename _Predicate > bool all_of (_InputIterator __first, _InputIterator __last, _Predicate __pred)
template<typename _IIter , typename _Predicate > bool all_of (_IIter, _IIter, _Predicate)
template<typename _InputIterator , typename _Predicate > bool any_of (_InputIterator __first, _InputIterator __last, _Predicate __pred)
template<typename _IIter , typename _Predicate > bool any_of (_IIter, _IIter, _Predicate)
again with the double life — the _InputIterator one with names, the _IIter one with none. twins but make it mysterious 👑
arg 🧚
template<typename _Tp > __gnu_cxx::__promote< _Tp >::__type arg (_Tp __x)
template<typename _Tp > _Tp arg (const complex< _Tp > &)
one promotes via __gnu_cxx::__promote, one just hands you back _Tp from a complex< _Tp >. two moods, both valid 💜
the asin/asinh era 🎀
template<typename _Tp > _Expr< _UnClos< __asin, _ValArray, _Tp >, _Tp > asin (const valarray< _Tp > &__v)
template<class _Dom > _Expr< _UnClos< __asin, _Expr, _Dom >, typename _Dom::value_type > asin (const _Expr< _Dom, typename _Dom::value_type > &__e)
template<typename _Tp > std::complex< _Tp > asin (const std::complex< _Tp > &__z)
template<typename _Tp > __gnu_cxx::__enable_if< __is_integer< _Tp >::__value, double >::__type asin (_Tp __x)
long double asin (long double __x)
float asin (float __x)
template<typename _Tp > std::complex< _Tp > asinh (const std::complex< _Tp > &__z)
same structure as acos, same integer-gated-returns-double situation. asinh keeps it to one std::complex overload. no notes 🌸
atan (and friends) 🔥
template<typename _Tp > _Expr< _UnClos< __atan, _ValArray, _Tp >, _Tp > atan (const valarray< _Tp > &__v)
template<class _Dom > _Expr< _UnClos< __atan, _Expr, _Dom >, typename _Dom::value_type > atan (const _Expr< _Dom, typename _Dom::value_type > &__e)
template<typename _Tp > std::complex< _Tp > atan (const std::complex< _Tp > &__z)
template<typename _Tp > __gnu_cxx::__enable_if< __is_integer< _Tp >::__value, double >::__type atan (_Tp __x)
long double atan (long double __x)
float atan (float __x)
six again. we love a pattern bestie 💅
atan2 — the whole entire saga 😭🔥
okay this is the main event, buckle up. _BinClos everywhere, __atan2 in every single one:
template<typename _Tp > _Expr< _BinClos< __atan2, _Constant, _ValArray, _Tp, _Tp >, _Tp > atan2 (const _Tp &__t, const valarray< _Tp > &__v)
template<typename _Tp > _Expr< _BinClos< __atan2, _ValArray, _Constant, _Tp, _Tp >, _Tp > atan2 (const valarray< _Tp > &__v, const _Tp &__t)
template<typename _Tp > _Expr< _BinClos< __atan2, _ValArray, _ValArray, _Tp, _Tp >, _Tp > atan2 (const valarray< _Tp > &__v, const valarray< _Tp > &__w)
template<class _Dom > _Expr< _BinClos< __atan2, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename _Dom::value_type > atan2 (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__e)
template<class _Dom > _Expr< _BinClos< __atan2, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename _Dom::value_type > atan2 (const _Expr< _Dom, typename _Dom::value_type > &__e, const typename _Dom::value_type &__t)
template<class _Dom > _Expr< _BinClos< __atan2, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename _Dom::value_type > atan2 (const valarray< typename _Dom::valarray > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
ngl that one says valarray< typename _Dom::valarray > and yes, that is exactly what the page says, and yes, we are keeping it exactly as written — do not "fix" it, not our job, not today 🙈
template<class _Dom > _Expr< _BinClos< __atan2, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename _Dom::value_type > atan2 (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
template<class _Dom1 , class _Dom2 > _Expr< _BinClos< __atan2, _Expr, _Expr, _Dom1, _Dom2 >, typename _Dom1::value_type > atan2 (const _Expr< _Dom1, typename _Dom1::value_type > &__e1, const _Expr< _Dom2, typename _Dom2::value_type > &__e2)
then the promote-y one and the two float-ish ones:
template<typename _Tp , typename _Up > __gnu_cxx::__promote_2< typename __gnu_cxx::__enable_if< __is_arithmetic< _Tp >::__value &&__is_arithmetic< _Up >::__value, _Tp >::__type, _Up >::__type atan2 (_Tp __y, _Up __x)
(that's __value &&__is_arithmetic with no space between && and __is — verbatim, bestie, verbatim 💀)
long double atan2 (long double __y, long double __x)
float atan2 (float __y, float __x)
and note the argument names in the atan2s: __y then __x, in that order, both times. y first. that's the math, that's the vibe, that's the rule ⭐
atanh & atexit 🦋
template<typename _Tp > std::complex< _Tp > atanh (const std::complex< _Tp > &__z)
int atexit (void(*)())
atanh with a lone std::complex overload, and then atexit just… returning int and taking void(*)(). a whole function pointer with no name. minimal. iconic. 🎀
atomics, part one 💥
okay the atomic squad has so many overloads and we're doing all of them.
template<typename _ITp > bool atomic_compare_exchange_strong (volatile __atomic_base< _ITp > *__a, _ITp *__i1, _ITp __i2)
bool atomic_compare_exchange_strong (volatile atomic_bool *__a, bool *__i1, bool __i2)
bool atomic_compare_exchange_strong (volatile atomic_address *__a, void **__v1, void *__v2)
three strong ones: templated __atomic_base, atomic_bool, atomic_address (that last one uses __v1/__v2, different names, keep 'em).
template<typename _ITp > bool atomic_compare_exchange_strong_explicit (volatile __atomic_base< _ITp > *__a, _ITp *__i1, _ITp __i2, memory_order __m1, memory_order __m2)
bool atomic_compare_exchange_strong_explicit (volatile atomic_bool *__a, bool *__i1, bool __i2, memory_order __m1, memory_order __m2)
bool atomic_compare_exchange_strong_explicit (volatile atomic_address *__a, void **__v1, void *__v2, memory_order __m1, memory_order __m2)
and the _explicit trio adds memory_order __m1, memory_order __m2 to each. two memory orders. not one. two 💅
template<typename _ITp > bool atomic_compare_exchange_weak (volatile __atomic_base< _ITp > *__a, _ITp *__i1, _ITp __i2)
bool atomic_compare_exchange_weak (volatile atomic_bool *__a, bool *__i1, bool __i2)
bool atomic_compare_exchange_weak (volatile atomic_address *__a, void **__v1, void *__v2)
template<typename _ITp > bool atomic_compare_exchange_weak_explicit (volatile __atomic_base< _ITp > *__a, _ITp *__i1, _ITp __i2, memory_order __m1, memory_order __m2)
bool atomic_compare_exchange_weak_explicit (volatile atomic_bool *__a, bool *__i1, bool __i2, memory_order __m1, memory_order __m2)
bool atomic_compare_exchange_weak_explicit (volatile atomic_address *__a, void **__v1, void *__v2, memory_order __m1, memory_order __m2)
so that's weak + weak_explicit, three apiece, mirroring strong exactly. symmetrical queen 👑✨
template<typename _ITp > _ITp atomic_exchange (volatile __atomic_base< _ITp > *__a, _ITp __i)
bool atomic_exchange (volatile atomic_bool *__a, bool __i)
void * atomic_exchange (volatile atomic_address *__a, void *__v)
template<typename _ITp > _ITp atomic_exchange_explicit (volatile __atomic_base< _ITp > *__a, _ITp __i, memory_order __m)
bool atomic_exchange_explicit (volatile atomic_bool *__a, bool __i, memory_order __m)
void * atomic_exchange_explicit (volatile atomic_address *__a, void *__v, memory_order __m)
atomic_exchange returns whatever it swaps (_ITp, bool, void *) and the _explicit versions take one memory_order __m — just __m, not __m1/__m2. details!! ⭐ and yeah, atomic_address uses void *__v here while the compare-exchanges used void **__v1, void *__v2. all intentional, all staying 🫶
and then…
template<typename _ITp > _ITp atomic_fetch_add (volatile __atomic_base<
…and we're cut off mid-signature 😭💀 bestie the page just ends there for now — like a cliffhanger in a show, except the cliffhanger is a template parameter list. to be continued… 🌈
…okay so we're still deep in the SYNOPSIS and honestly bestie, this is the part where the page just keeps GOING. We're finishing up the atomics and then it's alphabet city 💅. Buckle in, every single one of these is verbatim, no cap:
_ITp > *__a, _ITp __i)
void * atomic_fetch_add (volatile atomic_address *__a, ptrdiff_t __d)
template<typename _ITp > _ITp atomic_fetch_add_explicit (volatile
__atomic_base< _ITp > *__a, _ITp __i, memory_order __m)
void * atomic_fetch_add_explicit (volatile atomic_address *__a,
ptrdiff_t __d, memory_order __m)
template<typename _ITp > _ITp atomic_fetch_and (volatile __atomic_base<
_ITp > *__a, _ITp __i)
template<typename _ITp > _ITp atomic_fetch_and_explicit (volatile
__atomic_base< _ITp > *__a, _ITp __i, memory_order __m)
template<typename _ITp > _ITp atomic_fetch_or (volatile __atomic_base<
_ITp > *__a, _ITp __i)
template<typename _ITp > _ITp atomic_fetch_or_explicit (volatile
__atomic_base< _ITp > *__a, _ITp __i, memory_order __m)
template<typename _ITp > _ITp atomic_fetch_sub (volatile __atomic_base<
_ITp > *__a, _ITp __i)
void * atomic_fetch_sub (volatile atomic_address *__a, ptrdiff_t __d)
template<typename _ITp > _ITp atomic_fetch_sub_explicit (volatile
__atomic_base< _ITp > *__a, _ITp __i, memory_order __m)
void * atomic_fetch_sub_explicit (volatile atomic_address *__a,
ptrdiff_t __d, memory_order __m)
template<typename _ITp > _ITp atomic_fetch_xor (volatile __atomic_base<
_ITp > *__a, _ITp __i)
template<typename _ITp > _ITp atomic_fetch_xor_explicit (volatile
__atomic_base< _ITp > *__a, _ITp __i, memory_order __m)
That first line is literally me picking up mid-sentence from the previous part 🫠 — the atomics list is a marathon and we are finishing it. fetch_add, fetch_and, fetch_or, fetch_sub, fetch_xor, and each one has a plain version plus an _explicit version that takes a memory_order and says "yes I know what I'm doing with the memory model" (iconic behaviour honestly).
🚩 the atomic_flags
The flag party continues — atomic_flag stays the main character of the lock-free world:
void atomic_flag_clear (volatile __atomic_flag_base *__a)
void atomic_flag_clear_explicit (volatile __atomic_flag_base *,
memory_order)
void atomic_flag_clear_explicit (volatile atomic_flag *__a, memory_order
__m)
bool atomic_flag_test_and_set (volatile __atomic_flag_base *__a)
bool atomic_flag_test_and_set_explicit (volatile __atomic_flag_base *,
memory_order)
bool atomic_flag_test_and_set_explicit (volatile atomic_flag *__a,
memory_order __m)
Not me pointing out that the second and fifth ones literally have unnamed parameters — memory_order with no __m, no name, just the type, vibes only 💀. That's exactly how it's declared, we do not fix it, we respect the source.
✨ is_lock_free, load, store
Next up, the "is this thing actually lock free" crowd plus the load/store gang. Every single overload:
template<typename _ITp > bool atomic_is_lock_free (const volatile
__atomic_base< _ITp > *__a)
bool atomic_is_lock_free (const volatile atomic_bool *__a)
bool atomic_is_lock_free (const volatile atomic_address *__a)
template<typename _ITp > _ITp atomic_load (const volatile __atomic_base<
_ITp > *__a)
bool atomic_load (const volatile atomic_bool *__a)
void * atomic_load (const volatile atomic_address *__a)
template<typename _ITp > _ITp atomic_load_explicit (const volatile
__atomic_base< _ITp > *__a, memory_order __m)
bool atomic_load_explicit (const volatile atomic_bool *__a, memory_order
__m)
void * atomic_load_explicit (const volatile atomic_address *__a,
memory_order __m)
template<typename _ITp > void atomic_store (volatile __atomic_base< _ITp
> *__a, _ITp __i)
void atomic_store (volatile atomic_bool *__a, bool __i)
void atomic_store (volatile atomic_address *__a, void *__v)
template<typename _ITp > void atomic_store_explicit (volatile
__atomic_base< _ITp > *__a, _ITp __i, memory_order __m)
void atomic_store_explicit (volatile atomic_bool *__a, bool __i,
memory_order __m)
void atomic_store_explicit (volatile atomic_address *__a, void *__v,
memory_order __m)
Lowkey obsessed with the pattern: template version takes _ITp, atomic_bool version takes bool, atomic_address version takes void *. Three flavours, every time. Consistency ate, fr fr 🍓.
🦋 and now… the rest of the alphabet
Yes it just keeps going. Here's back_inserter through bind2nd:
template<typename _Container > back_insert_iterator< _Container >
back_inserter (_Container &__x)
template<typename _ForwardIterator , typename _Tp , typename _Compare >
bool binary_search (_ForwardIterator __first, _ForwardIterator
__last, const _Tp &__val, _Compare __comp)
template<typename _ForwardIterator , typename _Tp > bool binary_search
(_ForwardIterator __first, _ForwardIterator __last, const _Tp
&__val)
template<typename _FIter , typename _Tp , typename _Compare > bool
binary_search (_FIter, _FIter, const _Tp &, _Compare)
template<typename _FIter , typename _Tp > bool binary_search (_FIter,
_FIter, const _Tp &)
template<typename _Functor , typename... _ArgTypes> _Bind< typename
_Maybe_wrap_member_pointer< _Functor >::type(_ArgTypes...)> bind
(_Functor __f, _ArgTypes...__args)
template<typename _Operation , typename _Tp > binder1st< _Operation >
bind1st (const _Operation &__fn, const _Tp &__x)
template<typename _Operation , typename _Tp > binder2nd< _Operation >
bind2nd (const _Operation &__fn, const _Tp &__x)
Notice: binary_search shows up four times — two with named params (__first, __last, __val, __comp) and two with the short _FIter style and no names. Same function, different spelling. And bind is out here with a typename... _ArgTypes variadic pack plus _Maybe_wrap_member_pointer<_Functor>::type(_ArgTypes...) — that's a whole mouthful, kudos to whoever wrote it 😭.
💜 boolalpha, call_once, ceil, conj
ios_base & boolalpha (ios_base &__base)
template<typename _Callable , typename... _Args> void call_once
(once_flag &__once, _Callable __f, _Args &&...__args)
template<typename _Tp > __gnu_cxx::__enable_if< __is_integer< _Tp
>::__value, double >::__type ceil (_Tp __x)
long double ceil (long double __x)
float ceil (float __x)
template<typename _Tp > std::complex< typename __gnu_cxx::__promote< _Tp
>::__type > conj (_Tp __x)
template<typename _Tp > complex< _Tp > conj (const complex< _Tp > &)
boolalpha is that girl who makes true/false print as actual words instead of 0/1 — small thing, huge vibe shift ✨. And ceil has the classic triple: the __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type SFINAE version for integers, then long double, then float. Note the std::complex vs plain complex discrepancy in the two conj lines — not a typo on my end bestie, that's verbatim 🎀.
🌈 copy, copy_backward, copy_exception, copy_if, copy_n
The copy family — genuinely so many of them:
template<typename _CharT > __gnu_cxx::__enable_if< __is_char< _CharT
>::__value, ostreambuf_iterator< _CharT > >::__type copy
(istreambuf_iterator< _CharT > __first, istreambuf_iterator< _CharT
> __last, ostreambuf_iterator< _CharT > __result)
template<typename _II , typename _OI > _OI copy (_II __first, _II
__last, _OI __result)
template<typename _IIter , typename _OIter > _OIter copy (_IIter,
_IIter, _OIter)
template<typename _BI1 , typename _BI2 > _BI2 copy_backward (_BI1
__first, _BI1 __last, _BI2 __result)
template<typename _BIter1 , typename _BIter2 > _BIter2 copy_backward
(_BIter1, _BIter1, _BIter2)
template<typename _Ex > exception_ptr copy_exception (_Ex __ex) throw
()
template<typename _InputIterator , typename _OutputIterator , typename
_Predicate > _OutputIterator copy_if (_InputIterator __first,
_InputIterator __last, _OutputIterator __result, _Predicate __pred)
template<typename _IIter , typename _OIter , typename _Predicate >
_OIter copy_if (_IIter, _IIter, _OIter, _Predicate)
template<typename _InputIterator , typename _Size , typename
_OutputIterator > _OutputIterator copy_n (_InputIterator __first,
_Size __n, _OutputIterator __result)
template<typename _IIter , typename _Size , typename _OIter > _OIter
copy_n (_IIter, _Size, _OIter)
The first copy is the fancy one — __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT>>::__type, that's the char-specialised stream-copying glow-up 👑. Also copy_exception is flagged throw () — that's a real detail, keep it, don't come for me 🫶.
🧚 cos, cosh
Math girlies rise:
template<typename _Tp > _Expr< _UnClos< __cos, _ValArray, _Tp >, _Tp >
cos (const valarray< _Tp > &__v)
template<class _Dom > _Expr< _UnClos< __cos, _Expr, _Dom >, typename
_Dom::value_type > cos (const _Expr< _Dom, typename _Dom::value_type
> &__e)
template<typename _Tp > __gnu_cxx::__enable_if< __is_integer< _Tp
>::__value, double >::__type cos (_Tp __x)
long double cos (long double __x)
float cos (float __x)
template<typename _Tp > complex< _Tp > cos (const complex< _Tp > &)
template<typename _Tp > _Expr< _UnClos< __cosh, _ValArray, _Tp >, _Tp >
cosh (const valarray< _Tp > &__v)
template<class _Dom > _Expr< _UnClos< __cosh, _Expr, _Dom >, typename
_Dom::value_type > cosh (const _Expr< _Dom, typename
_Dom::value_type > &__e)
template<typename _Tp > __gnu_cxx::__enable_if< __is_integer< _Tp
>::__value, double >::__type cosh (_Tp __x)
long double cosh (long double __x)
float cosh (float __x)
template<typename _Tp > complex< _Tp > cosh (const complex< _Tp > &)
Five flavours of each: valarray (the _UnClos<__cos, _ValArray, _Tp> lazy-expr one), the _Expr one, the integer SFINAE one, long double, float, and complex<_Tp>. Six, actually — I miscounted, don't @ me 😭. Same shape for cosh with __cosh. It's giving "template metaprogramming summer camp" 🏕️.
⭐ count, count_if, cref, current_exception, dec, distance
template<typename _InputIterator , typename _Tp > iterator_traits<
_InputIterator >::difference_type count (_InputIterator __first,
_InputIterator __last, const _Tp &__value)
template<typename _IIter , typename _Tp > iterator_traits< _IIter
>::difference_type count (_IIter, _IIter, const _Tp &)
template<typename _InputIterator , typename _Predicate >
iterator_traits< _InputIterator >::difference_type count_if
(_InputIterator __first, _InputIterator __last, _Predicate __pred)
template<typename _IIter , typename _Predicate > iterator_traits< _IIter
>::difference_type count_if (_IIter, _IIter, _Predicate)
template<typename _Tp > reference_wrapper< const _Tp > cref
(reference_wrapper< _Tp > __t)
template<typename _Tp > reference_wrapper< const _Tp > cref (const _Tp
&__t)
exception_ptr current_exception () throw ()
ios_base & dec (ios_base &__base)
template<typename _InputIterator > iterator_traits< _InputIterator
>::difference_type distance (_InputIterator __first, _InputIterator
__last)
Both count and count_if return iterator_traits<...>::difference_type — not size_t, not int, the difference type, remember that 💅. current_exception is again throw (). And dec is just ios_base & dec (ios_base &__base) — the little stream flag setter that makes numbers print in base 10, humble but essential 🎀.
🌸 endl, ends, equal, equal_range, exit
template<typename _CharT , typename _Traits > basic_ostream< _CharT,
_Traits > & endl (basic_ostream< _CharT, _Traits > &__os)
template<typename _CharT , typename _Traits > basic_ostream< _CharT,
_Traits > & ends (basic_ostream< _CharT, _Traits > &__os)
template<typename _II1 , typename _II2 > bool equal (_II1 __first1, _II1
__last1, _II2 __first2)
template<typename _IIter1 , typename _IIter2 , typename _BinaryPredicate
> bool equal (_IIter1 __first1, _IIter1 __last1, _IIter2 __first2,
_BinaryPredicate __binary_pred)
template<typename _IIter1 , typename _IIter2 > bool equal (_IIter1,
_IIter1, _IIter2)
template<typename _ForwardIterator , typename _Tp , typename _Compare >
pair< _ForwardIterator, _ForwardIterator > equal_range
(_ForwardIterator __first, _ForwardIterator __last, const _Tp
&__val, _Compare __comp)
template<typename _ForwardIterator , typename _Tp > pair<
_ForwardIterator, _ForwardIterator > equal_range (_ForwardIterator
__first, _ForwardIterator __last, const _Tp &__val)
template<typename _FIter , typename _Tp , typename _Compare > pair<
_FIter, _FIter > equal_range (_FIter, _FIter, const _Tp &, _Compare)
template<typename _FIter , typename _Tp > pair< _FIter, _FIter >
equal_range (_FIter, _FIter, const _Tp &)
void exit (int)
endl and ends both hand you back a basic_ostream<_CharT, _Traits> & — that's why std::cout << std::endl << "hi" chains so pretty 🦋. equal clocks in three times (two named, one anonymous _IIter1, _IIter1, _IIter2), and equal_range does its four-overload thing returning a pair every time. Then there's just… void exit (int) sitting there unbothered, no template, no const, no vibes, just leaving 💀.
🔥 exp, fabs, fill
Last stretch of this part, bestie, we made it:
template<typename _Tp > _Expr< _UnClos< __exp, _ValArray, _Tp >, _Tp >
exp (const valarray< _Tp > &__v)
template<class _Dom > _Expr< _UnClos< __exp, _Expr, _Dom >, typename
_Dom::value_type > exp (const _Expr< _Dom, typename _Dom::value_type
> &__e)
template<typename _Tp > __gnu_cxx::__enable_if< __is_integer< _Tp
>::__value, double >::__type exp (_Tp __x)
long double exp (long double __x)
float exp (float __x)
template<typename _Tp > complex< _Tp > exp (const complex< _Tp > &)
template<typename _Tp > _Tp fabs (const std::complex< _Tp > &__z)
template<typename _Tp > __gnu_cxx::__enable_if< __is_integer< _Tp
>::__value, double >::__type fabs (_Tp __x)
long double fabs (long double __x)
float fabs (float __x)
void fill (_Bit_iterator __first, _Bit_iterator __last, const bool &__x)
template<typename _ForwardIterator , typename _Tp > void fill
(_ForwardIterator __first, _ForwardIterator __last, const _Tp
&__value)
template<typename _Tp > void fill (const _Deque_iterator< _Tp, _Tp &,
_Tp * > &__first, const _Deque_iterator< _Tp, _Tp &, _Tp * >
&__last, const _Tp &__value)
template<typename _FIter , typename _Tp > void fill (_FIter, _FIter,
const _Tp &)
exp gets the same six-way treatment as cos/cosh — valarray _UnClos<__exp, ...>, _Expr, integer SFINAE, long double, float, complex. And fabs has a std::complex version that returns _Tp (not a complex! it's the magnitude, that's the whole point 💡) plus the integer SFINAE and the long double/float pair.
fill is the one with spicy specialisations: one for _Bit_iterator taking const bool &__x, the generic _ForwardIterator one, a _Deque_iterator<_Tp, _Tp &, _Tp *> one, and a short anonymous _FIter, _FIter, const _Tp & one. Four fills, four vibes, all valid 🌈.
We are so not done yet — the synopsis keeps going and I'll be right here with you for it 💖.
okay bestie we're still deep in the synopsis and honestly? we're thriving 💅 filling things, finding things, flooring things — it's giving range. let's keep going, no breaks, we're locked in 🫶
template<typename _OI , typename _Size , typename _Tp > _OI fill_n (_OI __first, _Size __n, const _Tp &__value)
template<typename _OIter , typename _Size , typename _Tp > _OIter fill_n (_OIter, _Size, const _Tp &)
two fill_n flavours — one that actually names its params (__first, __n, __value) and one that's the shy one with no param names at all (it's the internal/implementation-y twin, we don't ask questions ✨).
template<typename _CharT > __gnu_cxx::__enable_if< __is_char< _CharT >::__value, istreambuf_iterator< _CharT > >::__type find (istreambuf_iterator< _CharT > __first, istreambuf_iterator< _CharT > __last, const _CharT &__val)
this one's the fancy overload — it only wakes up when __is_char< _CharT >::__value is true, and then it returns a whole istreambuf_iterator< _CharT > instead of just any old iterator. main character energy, honestly 👑
template<typename _InputIterator , typename _Tp > _InputIterator find (_InputIterator __first, _InputIterator __last, const _Tp &__val)
template<typename _IIter , typename _Tp > _IIter find (_IIter, _IIter, const _Tp &)
and here's the regular find we all know and love, plus its minimal-arg-name cousin. same vibe, fewer words 🎀
template<typename _ForwardIterator1 , typename _ForwardIterator2 , typename _BinaryPredicate > _ForwardIterator1 find_end (_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __comp)
template<typename _ForwardIterator1 , typename _ForwardIterator2 > _ForwardIterator1 find_end (_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2)
template<typename _FIter1 , typename _FIter2 , typename _BinaryPredicate > _FIter1 find_end (_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate)
template<typename _FIter1 , typename _FIter2 > _FIter1 find_end (_FIter1, _FIter1, _FIter2, _FIter2)
find_end squad, four of them 😭 you got your predicate version (__comp), your no-predicate version, and then both of those again with the anonymous _FIter1/_FIter2 param names. elaborate? yes. necessary? also yes. periodt.
template<typename _InputIterator , typename _ForwardIterator , typename _BinaryPredicate > _InputIterator find_first_of (_InputIterator __first1, _InputIterator __last1, _ForwardIterator __first2, _ForwardIterator __last2, _BinaryPredicate __comp)
template<typename _InputIterator , typename _ForwardIterator > _InputIterator find_first_of (_InputIterator __first1, _InputIterator __last1, _ForwardIterator __first2, _ForwardIterator __last2)
template<typename _FIter1 , typename _FIter2 , typename _BinaryPredicate > _FIter1 find_first_of (_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate)
template<typename _FIter1 , typename _FIter2 > _FIter1 find_first_of (_FIter1, _FIter1, _FIter2, _FIter2)
literally the same four-way pattern as find_end — that's the bit, that's the joke, the library is nothing if not consistent 🧚
template<typename _InputIterator , typename _Predicate > _InputIterator find_if (_InputIterator __first, _InputIterator __last, _Predicate __pred)
template<typename _IIter , typename _Predicate > _IIter find_if (_IIter, _IIter, _Predicate)
template<typename _InputIterator , typename _Predicate > _InputIterator find_if_not (_InputIterator __first, _InputIterator __last, _Predicate __pred)
template<typename _IIter , typename _Predicate > _IIter find_if_not (_IIter, _IIter, _Predicate)
find_if and find_if_not, each with their named-params and no-names duo 💖 __pred carries both of them, lowkey the hardest working template param on this page.
ios_base & fixed (ios_base &__base)
fixed — takes an ios_base & and gives you one right back. nothing more, nothing less, just vibes and a manipulator 🎀
template<typename _Tp > __gnu_cxx::__enable_if< __is_integer< _Tp >::__value, double >::__type floor (_Tp __x)
long double floor (long double __x)
float floor (float __x)
floor in three sizes 🍓 the integer one only turns on when __is_integer< _Tp >::__value is true (and it hands you back a double), then it's long double floor (long double __x) and float floor (float __x) — pick your precision bestie.
template<typename _CharT , typename _Traits > basic_ostream< _CharT, _Traits > & flush (basic_ostream< _CharT, _Traits > &__os)
flush takes your basic_ostream< _CharT, _Traits > & and gives it right back, all chars and traits accounted for ✨
long double fmod (long double __x, long double __y)
float fmod (float __x, float __y)
fmod in long double and float — two-arg, both of them, __x and __y, no notes 💅
template<typename _InputIterator , typename _Function > _Function for_each (_InputIterator __first, _InputIterator __last, _Function __f)
template<typename _IIter , typename _Funct > _Funct for_each (_IIter, _IIter, _Funct)
for_each twice — once with real param names (__first, __last, __f) and once with the mysterious _Funct spelling. both return your _Function/_Funct back to you 🫶
template<typename _Tp > _Tp && forward (typename std::identity< _Tp >::type &&__t)
forward does the perfect-forwarding thing, wrapped in std::identity< _Tp >::type and handing back _Tp &&. yes she's dramatic, she's supposed to be 😭
template<typename _Tp > __gnu_cxx::__enable_if< __is_integer< _Tp >::__value, double >::__type frexp (_Tp __x, int *__exp)
long double frexp (long double __x, int *__exp)
float frexp (float __x, int *__exp)
frexp once again in a cute trio — the __is_integer gate version, then long double, then float. all of them taking that int *__exp pointer, don't forget the star ⭐
template<typename _Container > front_insert_iterator< _Container > front_inserter (_Container &__x)
front_inserter — give it a _Container &__x, get a front_insert_iterator< _Container > back. iconic little factory honestly 👑
template<typename _ForwardIterator , typename _Generator > void generate (_ForwardIterator __first, _ForwardIterator __last, _Generator __gen)
template<typename _FIter , typename _Generator > void generate (_FIter, _FIter, _Generator)
template<typename _OutputIterator , typename _Size , typename _Generator > _OutputIterator generate_n (_OutputIterator __first, _Size __n, _Generator __gen)
template<typename _OIter , typename _Size , typename _Generator > _OIter generate_n (_OIter, _Size, _Generator)
the generate/generate_n family 🌈 two of each, one chatty one mysterious, and note generate returns void while generate_n returns your output iterator — the way that detail matters, iykyk.
const error_category & generic_category ()
generic_category () — no args, returns a const error_category &. simple, clean, does exactly what it says 🎀
template<std::size_t _Int, class _Tp1 , class _Tp2 > const tuple_element< _Int, std::pair< _Tp1, _Tp2 > >::type & get (const std::pair< _Tp1, _Tp2 > &__in)
template<std::size_t _Int, class _Tp1 , class _Tp2 > tuple_element< _Int, std::pair< _Tp1, _Tp2 > >::type & get (std::pair< _Tp1, _Tp2 > &__in)
get for std::pair — a const one and a non-const one, both indexed by std::size_t _Int, both pulling out tuple_element< _Int, std::pair< _Tp1, _Tp2 > >::type 💜
template<std::size_t _Int, typename _Tp , std::size_t _Nm> const _Tp & get (const array< _Tp, _Nm > &__arr)
template<std::size_t _Int, typename _Tp , std::size_t _Nm> _Tp & get (array< _Tp, _Nm > &__arr)
and get for array< _Tp, _Nm > — again const and non-const twins, index via std::size_t _Int, size via std::size_t _Nm. slay 🌸
template<std::size_t __i, typename... _Elements> __add_c_ref< typename tuple_element< __i, tuple< _Elements...> >::type >::type get (const tuple< _Elements...> &__t)
template<std::size_t __i, typename... _Elements> __add_ref< typename tuple_element< __i, tuple< _Elements...> >::type >::type get (tuple< _Elements...> &__t)
get for tuple now — variadic typename... _Elements, std::size_t __i, and notice the return types: __add_c_ref for the const one, __add_ref for the non-const one. they didn't come to play 😭
template<typename _Tp > pair< _Tp *, ptrdiff_t > get_temporary_buffer (ptrdiff_t __len)
get_temporary_buffer — hands you a pair< _Tp *, ptrdiff_t > for a given ptrdiff_t __len. functional and direct, we love her 💅
template<typename _CharT , typename _Traits , typename _Alloc , template< typename, typename, typename > class _Base> basic_istream< _CharT, _Traits > & getline (basic_istream< _CharT, _Traits > &__is, __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > &__str)
template<typename _CharT , typename _Traits , typename _Alloc , template< typename, typename, typename > class _Base> basic_istream< _CharT, _Traits > & getline (basic_istream< _CharT, _Traits > &__is, __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > &__str, _CharT __delim)
getline for __gnu_cxx::__versa_string — one without a delimiter, one with _CharT __delim. look at that template-of-a-template _Base parameter, she's fancy 🦋
template<> basic_istream< wchar_t > & getline (basic_istream< wchar_t > &__in, basic_string< wchar_t > &__str, wchar_t __delim)
template<> basic_istream< char > & getline (basic_istream< char > &__in, basic_string< char > &__str, char __delim)
two explicit specializations (template<>) — one for wchar_t, one for char, both with a __delim. note the param names switch to __in/__str here 🙈
template<typename _CharT , typename _Traits , typename _Alloc > basic_istream< _CharT, _Traits > & getline (basic_istream< _CharT, _Traits > &__is, basic_string< _CharT, _Traits, _Alloc > &__str)
template<typename _CharT , typename _Traits , typename _Alloc > basic_istream< _CharT, _Traits > & getline (basic_istream< _CharT, _Traits > &__is, basic_string< _CharT, _Traits, _Alloc > &__str, _CharT __delim)
and the standard basic_string getline pair — plain one, delim one, __is and __str and _CharT __delim. full circle bestie 💖
template<typename _Facet > bool has_facet (const locale &__loc) throw ()
has_facet returns a bool for a const locale &__loc, and yes that throw () at the end is right there in the original — don't touch it ⭐
ios_base & hex (ios_base &__base)
hex — same deal as fixed, ios_base & in, ios_base & out. manipulator royalty 👑
template<typename _Tp > __gnu_cxx::__promote< _Tp >::__type imag (_Tp)
template<typename _Tp > _Tp imag (const complex< _Tp > &__z)
imag twice — one promotes via __gnu_cxx::__promote< _Tp >::__type, one takes a const complex< _Tp > &__z and returns plain _Tp. the glow up is real ✨
template<typename _InputIterator1 , typename _InputIterator2 , typename _Compare > bool includes (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp)
template<typename _InputIterator1 , typename _InputIterator2 > bool includes (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2)
template<typename _IIter1 , typename _IIter2 , typename _Compare > bool includes (_IIter1, _IIter1, _IIter2, _IIter2, _Compare)
template<typename _IIter1 , typename _IIter2 > bool includes (_IIter1, _IIter1, _IIter2, _IIter2)
includes four ways 🍓 predicate/no-predicate, named/anonymous, all returning bool. it's a whole collection and honestly? respect.
template<typename _InputIterator1 , typename _InputIterator2 , typename _Tp , typename _BinaryOperation1 , typename _BinaryOperation2 > _Tp inner_product (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp __init, _BinaryOperation1 __binary_op1, _BinaryOperation2 __binary_op2)
template<typename _InputIterator1 , typename _InputIterator2 , typename _Tp > _Tp inner_product (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp __init)
inner_product with both binary ops (__binary_op1, __binary_op2) or just the classic __init version. either way you get your _Tp back 💜
template<typename _BidirectionalIterator , typename _Compare > void inplace_merge (_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Compare __comp)
template<typename _BidirectionalIterator > void inplace_merge (_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last)
template<typename _BIter , typename _Compare > void inplace_merge (_BIter, _BIter, _BIter, _Compare)
template<typename _BIter > void inplace_merge (_BIter, _BIter, _BIter)
inplace_merge — another gorgeous four-pack 🎀 __first, __middle, __last, optional __comp, all void. the three-iterator life chose her.
template<typename _Container , typename _Iterator > insert_iterator< _Container > inserter (_Container &__x, _Iterator __i)
inserter takes your _Container &__x plus an _Iterator __i and blesses you with an insert_iterator< _Container > 🫶
ios_base & internal (ios_base &__base)
internal — ios_base & in, ios_base & out, third member of the manipulator trio we've met so far. consistent queen 💅
template<typename _ForwardIterator , typename _Tp > void iota (_ForwardIterator __first, _ForwardIterator __last, _Tp __value)
iota — fills __first to __last starting from __value, returns void, four letters, absolute legend 🌟
template<typename _RandomAccessIterator , typename _Compare > bool is_heap (_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
template<typename _RandomAccessIterator > bool is_heap (_RandomAccessIterator __first, _RandomAccessIterator __last)
template<typename _RAIter , typename _Compare > bool is_heap (_RAIter, _RAIter, _Compare)
template<typename _RAIter > bool is_heap (_RAIter, _RAIter)
is_heap x4 🔥 random-access iterators only, __comp optional, always bool. she knows what she is.
template<typename _RandomAccessIterator , typename _Compare > _RandomAccessIterator is_heap_until (_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
template<typename _RandomAccessIterator > _RandomAccessIterator is_heap_until (_RandomAccessIterator __first, _RandomAccessIterator __last)
template<typename _RAIter , typename _Compare > _RAIter is_heap_until (_RAIter, _RAIter, _Compare)
template<typename _RAIter > _RAIter is_heap_until (_RAIter, _RAIter)
is_heap_until also x4 — same shapes, but this time you get an iterator back instead of a bool. the way that's the whole difference, obsessed 🌈
template<typename _InputIterator , typename _Predicate > bool is_partitioned (_InputIterator __first, _InputIterator __last, _Predicate __pred)
template<typename _IIter , typename _Predicate > bool is_partitioned (_IIter, _IIter, _Predicate)
is_partitioned twice, __pred in both, bool out. short and sweet 🍓
template<typename _ForwardIterator , typename _Compare > bool is_sorted (_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
template<typename _ForwardIterator > bool is_sorted (_ForwardIterator __first, _ForwardIterator __last)
template<typename _FIter , typename _Compare > bool is_sorted (_FIter, _FIter, _Compare)
template<typename _FIter > bool is_sorted (_FIter, _FIter)
is_sorted quartet, forward iterators, __comp optional, bool all day 💖
template<typename _ForwardIterator , typename _Compare > _ForwardIterator is_sorted_until (_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
template<typename _ForwardIterator > _ForwardIterator is_sorted_until
and is_sorted_until starts up — we've got the three-arg __comp version fully written out, and the two-arg one is literally still mid-sentence (template<typename _ForwardIterator > _ForwardIterator is_sorted_until) because we're cutting off right here 😭 don't worry bestie, she finishes in the next part, hold on to your seats 🦋
...and we literally pick up in the middle of a declaration, because of course we do 😭 the line wrapped, bestie, nothing's broken — here's the tail end of it plus the whole is_sorted_until moment and then the entire is* character-check squad, every last one of them:
(_ForwardIterator __first, _ForwardIterator __last)
template<typename _FIter , typename _Compare > _FIter is_sorted_until
(_FIter, _FIter, _Compare)
template<typename _FIter > _FIter is_sorted_until (_FIter, _FIter)
template<typename _CharT > bool isalnum (_CharT __c, const locale
&__loc)
template<typename _CharT > bool isalpha (_CharT __c, const locale
&__loc)
template<typename _CharT > bool iscntrl (_CharT __c, const locale
&__loc)
template<typename _CharT > bool isdigit (_CharT __c, const locale
&__loc)
template<typename _CharT > bool isgraph (_CharT __c, const locale
&__loc)
template<typename _CharT > bool islower (_CharT __c, const locale
&__loc)
template<typename _CharT > bool isprint (_CharT __c, const locale
&__loc)
template<typename _CharT > bool ispunct (_CharT __c, const locale
&__loc)
template<typename _CharT > _GLIBCXX_END_LDBL_NAMESPACE bool isspace
(_CharT __c, const locale &__loc)
template<typename _CharT > bool isupper (_CharT __c, const locale
&__loc)
template<typename _CharT > bool isxdigit (_CharT __c, const locale
&__loc)
every single one of those is* besties takes a _CharT __c and a const locale &__loc, and yes — isspace is out here wearing a _GLIBCXX_END_LDBL_NAMESPACE right in the middle of its return type like it's a little accessory 🎀 not us editing that, we reproduce it exactly, periodt.
next up, a tiny group hug of two swaps, a dependency-killer, the ldexp trio and one lone formatting manipulator ✨
template<typename _ForwardIterator1 , typename _ForwardIterator2 > void
iter_swap (_ForwardIterator1 __a, _ForwardIterator2 __b)
template<typename _FIter1 , typename _FIter2 > void iter_swap (_FIter1,
_FIter2)
template<typename _Tp > _Tp kill_dependency (_Tp __y)
template<typename _Tp > __gnu_cxx::__enable_if< __is_integer< _Tp
>::__value, double >::__type ldexp (_Tp __x, int __exp)
long double ldexp (long double __x, int __exp)
float ldexp (float __x, int __exp)
ios_base & left (ios_base &__base)
iter_swap said it twice for brand consistency 💅 and left is just hanging out returning an ios_base &, living its main character life.
okay the lexicographical_compare era, four of them, all lined up like a lil squad 🦋 plus lock, who brought a parameter pack and zero chill:
template<typename _II1 , typename _II2 , typename _Compare > bool
lexicographical_compare (_II1 __first1, _II1 __last1, _II2 __first2,
_II2 __last2, _Compare __comp)
template<typename _II1 , typename _II2 > bool lexicographical_compare
(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2)
template<typename _IIter1 , typename _IIter2 , typename _Compare > bool
lexicographical_compare (_IIter1, _IIter1, _IIter2, _IIter2,
_Compare)
template<typename _IIter1 , typename _IIter2 > bool
lexicographical_compare (_IIter1, _IIter1, _IIter2, _IIter2)
template<typename _L1 , typename _L2 , typename... _L3> void lock (_L1
&, _L2 &, _L3 &...)
notice how the first two spell out __first1/__last1/__first2/__last2 and the second two are like "unnamed args, we're mysterious" 🙈 both versions are here, don't @ me.
the log girlies 🍓 log and log10, in valarray flavour, expression-template flavour, integer-enable_if flavour, long double, float, and complex< _Tp >:
template<typename _Tp > _Expr< _UnClos< __log, _ValArray, _Tp >, _Tp >
log (const valarray< _Tp > &__v)
template<class _Dom > _Expr< _UnClos< __log, _Expr, _Dom >, typename
_Dom::value_type > log (const _Expr< _Dom, typename _Dom::value_type
> &__e)
template<typename _Tp > __gnu_cxx::__enable_if< __is_integer< _Tp
>::__value, double >::__type log (_Tp __x)
long double log (long double __x)
float log (float __x)
template<typename _Tp > complex< _Tp > log (const complex< _Tp > &)
and its twin, same energy, different number 🧚
template<typename _Tp > _Expr< _UnClos< __log10, _ValArray, _Tp >, _Tp >
log10 (const valarray< _Tp > &__v)
template<class _Dom > _Expr< _UnClos< __log10, _Expr, _Dom >, typename
_Dom::value_type > log10 (const _Expr< _Dom, typename
_Dom::value_type > &__e)
template<typename _Tp > __gnu_cxx::__enable_if< __is_integer< _Tp
>::__value, double >::__type log10 (_Tp __x)
long double log10 (long double __x)
float log10 (float __x)
template<typename _Tp > complex< _Tp > log10 (const complex< _Tp > &)
lower_bound time 🌈 four overloads, then the two make_error_* babies, then all four make_heap declarations (yes, two with _RandomAccessIterator and two with the shorter _RAIter — both spellings, both staying):
template<typename _ForwardIterator , typename _Tp , typename _Compare >
_ForwardIterator lower_bound (_ForwardIterator __first,
_ForwardIterator __last, const _Tp &__val, _Compare __comp)
template<typename _ForwardIterator , typename _Tp > _ForwardIterator
lower_bound (_ForwardIterator __first, _ForwardIterator __last,
const _Tp &__val)
template<typename _FIter , typename _Tp , typename _Compare > _FIter
lower_bound (_FIter, _FIter, const _Tp &, _Compare)
template<typename _FIter , typename _Tp > _FIter lower_bound (_FIter,
_FIter, const _Tp &)
error_code make_error_code (errc __e)
error_condition make_error_condition (errc __e)
template<typename _RandomAccessIterator , typename _Compare > void
make_heap (_RandomAccessIterator __first, _RandomAccessIterator
__last, _Compare __comp)
template<typename _RandomAccessIterator > void make_heap
(_RandomAccessIterator __first, _RandomAccessIterator __last)
template<typename _RAIter , typename _Compare > void make_heap (_RAIter,
_RAIter, _Compare)
template<typename _RAIter > void make_heap (_RAIter, _RAIter)
the make_* factory floor 🏭 make_move_iterator, make_pair (with __decay_and_strip on both args, iconic), and the variadic make_tuple:
template<typename _Iterator > move_iterator< _Iterator >
make_move_iterator (const _Iterator &__i)
template<class _T1 , class _T2 > pair< typename __decay_and_strip< _T1
>::__type, typename __decay_and_strip< _T2 >::__type > make_pair
(_T1 &&__x, _T2 &&__y)
template<typename... _Elements> tuple< typename __decay_and_strip<
_Elements >::__type...> make_tuple (_Elements &&...__args)
_Elements &&...__args — a parameter pack, she ate 💅
max versus min, the eternal rivalry, and honestly both showed up in full force. max first: two initializer_list flavours, two const _Tp & flavours, then max_element in four shapes:
template<typename _Tp , typename _Compare > _Tp max (initializer_list<
_Tp >, _Compare)
template<typename _Tp > _Tp max (initializer_list< _Tp >)
template<typename _Tp , typename _Compare > const _Tp & max (const _Tp
&__a, const _Tp &__b, _Compare __comp)
template<typename _Tp > const _Tp & max (const _Tp &__a, const _Tp &__b)
template<typename _ForwardIterator , typename _Compare >
_ForwardIterator max_element (_ForwardIterator __first,
_ForwardIterator __last, _Compare __comp)
template<typename _ForwardIterator > _ForwardIterator max_element
(_ForwardIterator __first, _ForwardIterator __last)
template<typename _FIter , typename _Compare > _FIter max_element
(_FIter, _FIter, _Compare)
template<typename _FIter > _FIter max_element (_FIter, _FIter)
then the member-function-adaptor corner 😭 mem_fn and the mem_fun/mem_fun_ref crew, pointer-to-member syntax and all, followed by one lonely memchr:
template<typename _Tp , typename _Class > _Mem_fn< _Tp _Class::* >
mem_fn (_Tp _Class::*__pm)
template<typename _Ret , typename _Tp , typename _Arg > mem_fun1_t<
_Ret, _Tp, _Arg > mem_fun (_Ret(_Tp::*__f)(_Arg))
template<typename _Ret , typename _Tp > mem_fun_t< _Ret, _Tp > mem_fun
(_Ret(_Tp::*__f)())
template<typename _Ret , typename _Tp , typename _Arg > mem_fun1_ref_t<
_Ret, _Tp, _Arg > mem_fun_ref (_Ret(_Tp::*__f)(_Arg))
template<typename _Ret , typename _Tp > mem_fun_ref_t< _Ret, _Tp >
mem_fun_ref (_Ret(_Tp::*__f)())
void * memchr (void *__p, int __c, size_t __n)
look at _Ret(_Tp::*__f)(_Arg) — that's a pointer to a member function, and no, it doesn't get easier to read, but it is exactly right 💀
merge quartet incoming, two wordy ones and two short ones, then the min half of the rivalry — and girl, there is so much min:
template<typename _InputIterator1 , typename _InputIterator2 , typename
_OutputIterator , typename _Compare > _OutputIterator merge
(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2
__first2, _InputIterator2 __last2, _OutputIterator __result,
_Compare __comp)
template<typename _InputIterator1 , typename _InputIterator2 , typename
_OutputIterator > _OutputIterator merge (_InputIterator1 __first1,
_InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2
__last2, _OutputIterator __result)
template<typename _IIter1 , typename _IIter2 , typename _OIter ,
typename _Compare > _OIter merge (_IIter1, _IIter1, _IIter2,
_IIter2, _OIter, _Compare)
template<typename _IIter1 , typename _IIter2 , typename _OIter > _OIter
merge (_IIter1, _IIter1, _IIter2, _IIter2, _OIter)
template<typename _Tp , typename _Compare > _Tp min (initializer_list<
_Tp >, _Compare)
template<typename _Tp > _Tp min (initializer_list< _Tp >)
template<typename _Tp , typename _Compare > const _Tp & min (const _Tp
&__a, const _Tp &__b, _Compare __comp)
template<typename _Tp > const _Tp & min (const _Tp &__a, const _Tp &__b)
template<typename _ForwardIterator , typename _Compare >
_ForwardIterator min_element (_ForwardIterator __first,
_ForwardIterator __last, _Compare __comp)
template<typename _ForwardIterator > _ForwardIterator min_element
(_ForwardIterator __first, _ForwardIterator __last)
template<typename _FIter , typename _Compare > _FIter min_element
(_FIter, _FIter, _Compare)
template<typename _FIter > _FIter min_element (_FIter, _FIter)
and now the ✨minmax industrial complex✨ — four minmax declarations (returning pair< _Tp, _Tp > twice and pair< const _Tp &, const _Tp & > twice) and four minmax_element ones (two returning pair< _ForwardIterator, _ForwardIterator >, two returning pair< _FIter, _FIter >):
template<typename _Tp , typename _Compare > pair< _Tp, _Tp > minmax
(initializer_list< _Tp >, _Compare)
template<typename _Tp > pair< _Tp, _Tp > minmax (initializer_list< _Tp
>)
template<typename _Tp , typename _Compare > pair< const _Tp &, const _Tp
& > minmax (const _Tp &__a, const _Tp &__b, _Compare __comp)
template<typename _Tp > pair< const _Tp &, const _Tp & > minmax (const
_Tp &__a, const _Tp &__b)
template<typename _ForwardIterator , typename _Compare > pair<
_ForwardIterator, _ForwardIterator > minmax_element
(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
template<typename _ForwardIterator > pair< _ForwardIterator,
_ForwardIterator > minmax_element (_ForwardIterator __first,
_ForwardIterator __last)
template<typename _FIter , typename _Compare > pair< _FIter, _FIter >
minmax_element (_FIter, _FIter, _Compare)
template<typename _FIter > pair< _FIter, _FIter > minmax_element
(_FIter, _FIter)
both got included, bestie — no "oh it's basically the same thing" shortcuts on my watch 💅
mismatch, four ways, then modf in long double and float, then the move/move_backward/next/next_permutation runway leading all the way to noboolalpha 🔥 this is the home stretch of this chunk:
template<typename _InputIterator1 , typename _InputIterator2 , typename
_BinaryPredicate > pair< _InputIterator1, _InputIterator2 > mismatch
(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2
__first2, _BinaryPredicate __binary_pred)
template<typename _InputIterator1 , typename _InputIterator2 > pair<
_InputIterator1, _InputIterator2 > mismatch (_InputIterator1
__first1, _InputIterator1 __last1, _InputIterator2 __first2)
template<typename _IIter1 , typename _IIter2 , typename _BinaryPredicate
> pair< _IIter1, _IIter2 > mismatch (_IIter1, _IIter1, _IIter2,
_BinaryPredicate)
template<typename _IIter1 , typename _IIter2 > pair< _IIter1, _IIter2 >
mismatch (_IIter1, _IIter1, _IIter2)
long double modf (long double __x, long double *__iptr)
float modf (float __x, float *__iptr)
template<typename _II , typename _OI > _OI move (_II __first, _II
__last, _OI __result)
template<typename _Tp > std::remove_reference< _Tp >::type && move (_Tp
&&__t)
template<typename _BI1 , typename _BI2 > _BI2 move_backward (_BI1
__first, _BI1 __last, _BI2 __result)
template<typename _InputIterator > _InputIterator next (_InputIterator
__x, typename iterator_traits< _InputIterator >::difference_type
__n=1)
template<typename _BidirectionalIterator , typename _Compare > bool
next_permutation (_BidirectionalIterator __first,
_BidirectionalIterator __last, _Compare __comp)
template<typename _BidirectionalIterator > bool next_permutation
(_BidirectionalIterator __first, _BidirectionalIterator __last)
template<typename _BIter , typename _Compare > bool next_permutation
(_BIter, _BIter, _Compare)
template<typename _BIter > bool next_permutation (_BIter, _BIter)
ios_base & noboolalpha (ios_base &__base)
little detail worth kissing 💖 — next is the only one in this batch rocking a default argument, and it's spelled __n=1, no spaces around the =, exactly like that. We keep it. We always keep it. 🫶
also note there are twomovedeclarations up there: the three-iteratormove (_II __first, _II __last, _OI __result)and the rvalue-referencemove (_Tp &&__t)returningstd::remove_reference< _Tp >::type &&. Different vibes, same name, both living rent-free in the synopsis 👑
and that's where this chunk of the declaration parade stops — the synopsis is still not done, so don't you dare close the terminal 💀
Okay bestie we're still deep in the SYNOPSIS trenches — this stretch is all the predicate helpers, the iostream format flags, and then an absolutely unhinged parade of operator!= overloads. Buckle up. 🌸
template<typename _InputIterator , typename _Predicate > bool none_of
(_InputIterator __first, _InputIterator __last, _Predicate __pred)
template<typename _IIter , typename _Predicate > bool none_of (_IIter,
_IIter, _Predicate)
Two none_of flavours — one with named params, one without. Same energy, different outfit 💅
template<typename _Tp > __gnu_cxx::__promote< _Tp >::__type norm (_Tp
__x)
template<typename _Tp > _Tp norm (const complex< _Tp > &)
norm showing up twice — once as that __gnu_cxx::__promote< _Tp >::__type situation, once taking a const complex< _Tp > &. Both iconic, both templatey 🫶
Now the iostream manipulators — little ios_base & functions that all take ios_base &__base and hand it right back to you:
ios_base & noshowbase (ios_base &__base)
ios_base & noshowpoint (ios_base &__base)
ios_base & noshowpos (ios_base &__base)
ios_base & noskipws (ios_base &__base)
ios_base & nounitbuf (ios_base &__base)
ios_base & nouppercase (ios_base &__base)
ios_base & oct (ios_base &__base)
noshowbase, noshowpoint, noshowpos, noskipws, nounitbuf, nouppercase, and plain old oct — the "no" girlies and the octal one, all living their best ios_base & life ✨
template<typename _Predicate > unary_negate< _Predicate > not1 (const
_Predicate &__pred)
template<typename _Predicate > binary_negate< _Predicate > not2 (const
_Predicate &__pred)
not1 gives you back a unary_negate< _Predicate >, not2 gives you a binary_negate< _Predicate >. Unary and binary, sisters fr fr 🎀
nth_element has four whole forms and honestly? main character energy:
template<typename _RandomAccessIterator , typename _Compare > void
nth_element (_RandomAccessIterator __first, _RandomAccessIterator
__nth, _RandomAccessIterator __last, _Compare __comp)
template<typename _RandomAccessIterator > void nth_element
(_RandomAccessIterator __first, _RandomAccessIterator __nth,
_RandomAccessIterator __last)
template<typename _RAIter , typename _Compare > void nth_element
(_RAIter, _RAIter, _RAIter, _Compare)
template<typename _RAIter > void nth_element (_RAIter, _RAIter, _RAIter)
Two with _RandomAccessIterator and named args, two with the short _RAIter and no names. All void. All valid. We love options 😌
Okay now the operator!= section begins and it does not stop. First up, the valarray family:
template<class _Dom > _Expr< _BinClos< __not_equal_to, _ValArray, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __not_equal_to,
typename _Dom::value_type >::result_type > operator!= (const
valarray< typename _Dom::value_type > &__v, const _Expr< _Dom,
typename _Dom::value_type > &__e)
template<class _Dom > _Expr< _BinClos< __not_equal_to, _Expr, _ValArray,
_Dom, typename _Dom::value_type >, typename __fun< __not_equal_to,
typename _Dom::value_type >::result_type > operator!= (const _Expr<
_Dom, typename _Dom::value_type > &__e, const valarray< typename
_Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __not_equal_to, _Constant, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __not_equal_to,
typename _Dom::value_type >::result_type > operator!= (const
typename _Dom::value_type &__t, const _Expr< _Dom, typename
_Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __not_equal_to, _Expr, _Constant,
_Dom, typename _Dom::value_type >, typename __fun< __not_equal_to,
typename _Dom::value_type >::result_type > operator!= (const _Expr<
_Dom, typename _Dom::value_type > &__v, const typename
_Dom::value_type &__t)
template<class _Dom1 , class _Dom2 > _Expr< _BinClos< __not_equal_to,
_Expr, _Expr, _Dom1, _Dom2 >, typename __fun< __not_equal_to,
typename _Dom1::value_type >::result_type > operator!= (const _Expr<
_Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2,
typename _Dom2::value_type > &__w)
_ValArray vs _Expr, _Expr vs _ValArray, _Constant vs _Expr, _Expr vs _Constant, and _Expr vs _Expr with _Dom1 and _Dom2. Every combination ate, no crumbs 🔥
Container time. Grab a snack, this is a long list:
template<typename _Tp , typename _Tp_Deleter , typename _Up , typename
_Up_Deleter > bool operator!= (const unique_ptr< _Tp, _Tp_Deleter >
&__x, const unique_ptr< _Up, _Up_Deleter > &__y)
template<typename _CharT , typename _Traits > bool operator!= (const
istreambuf_iterator< _CharT, _Traits > &__a, const
istreambuf_iterator< _CharT, _Traits > &__b)
template<class _Tp , class _CharT , class _Traits , class _Dist > bool
operator!= (const istream_iterator< _Tp, _CharT, _Traits, _Dist >
&__x, const istream_iterator< _Tp, _CharT, _Traits, _Dist > &__y)
template<typename _Tp , typename _Alloc > bool operator!= (const vector<
_Tp, _Alloc > &__x, const vector< _Tp, _Alloc > &__y)
unique_ptr does the cross-type thing with _Tp/_Tp_Deleter vs _Up/_Up_Deleter, the two iterator types match themselves exactly, and vector is a tidy same-type comparison 💜
template<typename _Key , typename _Val , typename _KeyOfValue , typename
_Compare , typename _Alloc > bool operator!= (const _Rb_tree< _Key,
_Val, _KeyOfValue, _Compare, _Alloc > &__x, const _Rb_tree< _Key,
_Val, _KeyOfValue, _Compare, _Alloc > &__y)
template<typename _Val > bool operator!= (const _Rb_tree_iterator< _Val
> &__x, const _Rb_tree_const_iterator< _Val > &__y)
The _Rb_tree itself, plus the iterator crossover — _Rb_tree_iterator on the left, _Rb_tree_const_iterator on the right. Mixing const and non-const, we stan 🦋
template<typename _Tp , typename _Seq > bool operator!= (const stack<
_Tp, _Seq > &__x, const stack< _Tp, _Seq > &__y)
template<typename _Key , typename _Compare , typename _Alloc > bool
operator!= (const set< _Key, _Compare, _Alloc > &__x, const set<
_Key, _Compare, _Alloc > &__y)
template<typename _Tp , typename _Seq > bool operator!= (const queue<
_Tp, _Seq > &__x, const queue< _Tp, _Seq > &__y)
template<class _T1 , class _T2 > bool operator!= (const pair< _T1, _T2 >
&__x, const pair< _T1, _T2 > &__y)
template<typename _Key , typename _Compare , typename _Alloc > bool
operator!= (const multiset< _Key, _Compare, _Alloc > &__x, const
multiset< _Key, _Compare, _Alloc > &__y)
template<typename _Key , typename _Tp , typename _Compare , typename
_Alloc > bool operator!= (const multimap< _Key, _Tp, _Compare,
_Alloc > &__x, const multimap< _Key, _Tp, _Compare, _Alloc > &__y)
template<typename _Key , typename _Tp , typename _Compare , typename
_Alloc > bool operator!= (const map< _Key, _Tp, _Compare, _Alloc >
&__x, const map< _Key, _Tp, _Compare, _Alloc > &__y)
stack, set, queue, pair, multiset, multimap, map — the whole friend group showed up 😭 Note stack and queue take _Tp and _Seq, pair takes _T1 and _T2, and the keyed containers all carry _Key/_Compare/_Alloc (with _Tp too for multimap and map).
template<typename _Tp , typename _Alloc > bool operator!= (const list<
_Tp, _Alloc > &__x, const list< _Tp, _Alloc > &__y)
template<typename _Val > bool operator!= (const _List_iterator< _Val >
&__x, const _List_const_iterator< _Val > &__y)
template<typename _IteratorL , typename _IteratorR > bool operator!=
(const move_iterator< _IteratorL > &__x, const move_iterator<
_IteratorR > &__y)
template<typename _Tp , typename _Alloc > bool operator!= (const deque<
_Tp, _Alloc > &__x, const deque< _Tp, _Alloc > &__y)
template<typename _Tp , typename _RefL , typename _PtrL , typename _RefR
, typename _PtrR > bool operator!= (const _Deque_iterator< _Tp,
_RefL, _PtrL > &__x, const _Deque_iterator< _Tp, _RefR, _PtrR >
&__y)
template<typename _Tp , typename _Ref , typename _Ptr > bool operator!=
(const _Deque_iterator< _Tp, _Ref, _Ptr > &__x, const
_Deque_iterator< _Tp, _Ref, _Ptr > &__y)
list + its iterator crossover (_List_iterator vs _List_const_iterator), move_iterator with two different _IteratorL/_IteratorR params, deque, and two _Deque_iterator overloads — one with the full _RefL/_PtrL/_RefR/_PtrR quad, one with single _Ref/_Ptr. Dedicated 🧚
template<typename _StateT > bool operator!= (const fpos< _StateT >
&__lhs, const fpos< _StateT > &__rhs)
template<typename _Tp , typename _Alloc > bool operator!= (const
forward_list< _Tp, _Alloc > &__lx, const forward_list< _Tp, _Alloc >
&__ly)
template<typename _Tp , typename _Alloc > bool operator!= (const
_Fwd_list_iterator< _Tp, _Alloc > &__x, const
_Fwd_list_const_iterator< _Tp, _Alloc > &__y)
fpos with _StateT using __lhs/__rhs, then forward_list using __lx/__ly (yes, different param names, that's literally what's written, don't come for me 🙈), and the _Fwd_list_iterator vs _Fwd_list_const_iterator pairing.
template<typename _CharT , typename _Traits , typename _Alloc > bool
operator!= (const basic_string< _CharT, _Traits, _Alloc > &__lhs,
const _CharT *__rhs)
template<typename _CharT , typename _Traits , typename _Alloc > bool
operator!= (const _CharT *__lhs, const basic_string< _CharT,
_Traits, _Alloc > &__rhs)
template<typename _CharT , typename _Traits , typename _Alloc > bool
operator!= (const basic_string< _CharT, _Traits, _Alloc > &__lhs,
const basic_string< _CharT, _Traits, _Alloc > &__rhs)
String vs const _CharT *, const _CharT * vs string, string vs string. Both directions, because we're polite 💅
template<typename _Tp > bool operator!= (const allocator< _Tp > &, const
allocator< _Tp > &)
template<typename _T1 , typename _T2 > bool operator!= (const allocator<
_T1 > &, const allocator< _T2 > &)
Allocators comparing to themselves, and _T1 vs _T2 — no parameter names at all, they're mysterious like that ⭐
The sub_match + match_results section, aka the regex girlies:
template<typename _Bi_iter , class _Allocator > bool operator!= (const
match_results< _Bi_iter, _Allocator > &__m1, const match_results<
_Bi_iter, _Allocator > &__m2)
template<typename _Bi_iter > bool operator!= (const sub_match< _Bi_iter
> &__lhs, typename iterator_traits< _Bi_iter >::value_type const
&__rhs)
template<typename _Bi_iter > bool operator!= (typename iterator_traits<
_Bi_iter >::value_type const &__lhs, const sub_match< _Bi_iter >
&__rhs)
template<typename _Bi_iter > bool operator!= (const sub_match< _Bi_iter
> &__lhs, typename iterator_traits< _Bi_iter >::value_type const
*__rhs)
template<typename _Bi_iter > bool operator!= (typename iterator_traits<
_Bi_iter >::value_type const *__lhs, const sub_match< _Bi_iter >
&__rhs)
template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator!= (const sub_match< _Bi_iter > &__lhs, const
basic_string< typename iterator_traits< _Bi_iter >::value_type,
_Ch_traits, _Ch_alloc > &__rhs)
template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator!= (const basic_string< typename iterator_traits<
_Bi_iter >::value_type, _Ch_traits, _Ch_alloc > &__lhs, const
sub_match< _Bi_iter > &__rhs)
template<typename _BiIter > bool operator!= (const sub_match< _BiIter >
&__lhs, const sub_match< _BiIter > &__rhs)
That's match_results vs match_results, then sub_match against value_type const & both ways, against value_type const * both ways, against a basic_string both ways, and finally sub_match vs sub_match. Note the last one swaps _Bi_iter for _BiIter — casing matters, that's a different template param name, and yes I clocked it 👀
template<typename _Signature > bool operator!= (_M_clear_type *, const
function< _Signature > &__f)
template<typename _Signature > bool operator!= (const function<
_Signature > &__f, _M_clear_type *)
function vs _M_clear_type * in both orders. Sir, that is a whole mood 💀
template<typename _Tp , std::size_t _Nm> bool operator!= (const array<
_Tp, _Nm > &__one, const array< _Tp, _Nm > &__two)
array with a std::size_t _Nm non-type param, comparing __one and __two. Cute naming, no notes 🍓
template<typename _Tp > _Expr< _BinClos< __not_equal_to, _Constant,
_ValArray, _Tp, _Tp >, typename __fun< __not_equal_to, _Tp
>::result_type > operator!= (const _Tp &__t, const valarray< _Tp >
&__v)
template<typename _Tp > _Expr< _BinClos< __not_equal_to, _ValArray,
_Constant, _Tp, _Tp >, typename __fun< __not_equal_to, _Tp
>::result_type > operator!= (const valarray< _Tp > &__v, const _Tp
&__t)
template<typename _Tp > _Expr< _BinClos< __not_equal_to, _ValArray,
_ValArray, _Tp, _Tp >, typename __fun< __not_equal_to, _Tp
>::result_type > operator!= (const valarray< _Tp > &__v, const
valarray< _Tp > &__w)
Back to valarray for three more — _Constant/_ValArray, _ValArray/_Constant, _ValArray/_ValArray, all single-_Tp this time. Round two, and it still slaps ✨
template<typename... _TElements, typename... _UElements> bool operator!=
(const tuple< _TElements...> &__t, const tuple< _UElements...> &__u)
tuple with two variadic packs — _TElements and _UElements — so __t and __u don't even have to be the same tuple type. Obsessed 🔥
bool operator!= (thread::id __x, thread::id __y)
bool operator!= (const error_condition &__lhs, const error_condition
&__rhs)
bool operator!= (const error_condition &__lhs, const error_code &__rhs)
bool operator!= (const error_code &__lhs, const error_condition &__rhs)
bool operator!= (const error_code &__lhs, const error_code &__rhs)
No templates here, bestie, these are plain non-template functions: thread::id by value, then all four error_code/error_condition combos — condition/condition, condition/code, code/condition, code/code. Every pairing covered, no gaps 💖
template<class _Dom > _Expr< _BinClos< __modulus, _ValArray, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __modulus,
typename _Dom::value_type >::result_type > operator% (const
valarray< typename _Dom::value_type > &__v, const _Expr< _Dom,
typename _Dom::value_type > &__e)
template<class _Dom > _Expr< _BinClos< __modulus, _Expr, _ValArray,
_Dom, typename _Dom::value_type >, typename __fun< __modulus,
typename _Dom::value_type >::result_type > operator% (const _Expr<
_Dom, typename _Dom::value_type > &__e, const valarray< typename
_Dom::value_type > &__v)
And we close this chunk with operator% — modulus, not percent-of-your-grade — in _ValArray/_Expr and _Expr/_ValArray forms. Yes it's still _Expr< _BinClos< ... > >, yes it's still long, and yes, there's more coming 🌈
...and the operator buffet keeps going, bestie. We're deep in the overloads now, so buckle up 🎀
The % family (modulus, but make it fancy)
Same deal as everything else in this list: constant-on-the-left, constant-on-the-right, expression-vs-expression, and then the valarray glow-ups. All of these build lazy _Expr objects instead of computing right away, iykyk.
template<class _Dom > _Expr< _BinClos< __modulus, _Constant, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __modulus,
typename _Dom::value_type >::result_type > operator% (const typename
_Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type
> &__v)
template<class _Dom > _Expr< _BinClos< __modulus, _Expr, _Constant,
_Dom, typename _Dom::value_type >, typename __fun< __modulus,
typename _Dom::value_type >::result_type > operator% (const _Expr<
_Dom, typename _Dom::value_type > &__v, const typename
_Dom::value_type &__t)
template<class _Dom1 , class _Dom2 > _Expr< _BinClos< __modulus, _Expr,
_Expr, _Dom1, _Dom2 >, typename __fun< __modulus, typename
_Dom1::value_type >::result_type > operator% (const _Expr< _Dom1,
typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename
_Dom2::value_type > &__w)
template<typename _Tp > _Expr< _BinClos< __modulus, _Constant,
_ValArray, _Tp, _Tp >, typename __fun< __modulus, _Tp >::result_type
> operator% (const _Tp &__t, const valarray< _Tp > &__v)
template<typename _Tp > _Expr< _BinClos< __modulus, _ValArray,
_Constant, _Tp, _Tp >, typename __fun< __modulus, _Tp >::result_type
> operator% (const valarray< _Tp > &__v, const _Tp &__t)
template<typename _Tp > _Expr< _BinClos< __modulus, _ValArray,
_ValArray, _Tp, _Tp >, typename __fun< __modulus, _Tp >::result_type
> operator% (const valarray< _Tp > &__v, const valarray< _Tp > &__w)
The & era — bitwise AND supremacy ✨
First the valarray/expression combos, then the plain _Ios_* ones (those are the ios flag enums, not the lazy-expression magic — different species, same operator), then the valarray trio:
template<class _Dom > _Expr< _BinClos< __bitwise_and, _ValArray, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __bitwise_and,
typename _Dom::value_type >::result_type > operator& (const
valarray< typename _Dom::value_type > &__v, const _Expr< _Dom,
typename _Dom::value_type > &__e)
template<class _Dom > _Expr< _BinClos< __bitwise_and, _Expr, _ValArray,
_Dom, typename _Dom::value_type >, typename __fun< __bitwise_and,
typename _Dom::value_type >::result_type > operator& (const _Expr<
_Dom, typename _Dom::value_type > &__e, const valarray< typename
_Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __bitwise_and, _Constant, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __bitwise_and,
typename _Dom::value_type >::result_type > operator& (const typename
_Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type
> &__v)
template<class _Dom > _Expr< _BinClos< __bitwise_and, _Expr, _Constant,
_Dom, typename _Dom::value_type >, typename __fun< __bitwise_and,
typename _Dom::value_type >::result_type > operator& (const _Expr<
_Dom, typename _Dom::value_type > &__v, const typename
_Dom::value_type &__t)
template<class _Dom1 , class _Dom2 > _Expr< _BinClos< __bitwise_and,
_Expr, _Expr, _Dom1, _Dom2 >, typename __fun< __bitwise_and,
typename _Dom1::value_type >::result_type > operator& (const _Expr<
_Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2,
typename _Dom2::value_type > &__w)
_Ios_Iostate operator& (_Ios_Iostate __a, _Ios_Iostate __b)
_Ios_Openmode operator& (_Ios_Openmode __a, _Ios_Openmode __b)
_Ios_Fmtflags operator& (_Ios_Fmtflags __a, _Ios_Fmtflags __b)
template<typename _Tp > _Expr< _BinClos< __bitwise_and, _Constant,
_ValArray, _Tp, _Tp >, typename __fun< __bitwise_and, _Tp
>::result_type > operator& (const _Tp &__t, const valarray< _Tp >
&__v)
template<typename _Tp > _Expr< _BinClos< __bitwise_and, _ValArray,
_Constant, _Tp, _Tp >, typename __fun< __bitwise_and, _Tp
>::result_type > operator& (const valarray< _Tp > &__v, const _Tp
&__t)
template<typename _Tp > _Expr< _BinClos< __bitwise_and, _ValArray,
_ValArray, _Tp, _Tp >, typename __fun< __bitwise_and, _Tp
>::result_type > operator& (const valarray< _Tp > &__v, const
valarray< _Tp > &__w)
&& but for math — logical AND lowkey slaps 💅
Yes, && is overloaded here too (only for the expression templates and valarray flavours, not for bool, obviously). Eight of them, all doing the lazy-something on the outside:
template<class _Dom > _Expr< _BinClos< __logical_and, _ValArray, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __logical_and,
typename _Dom::value_type >::result_type > operator&& (const
valarray< typename _Dom::value_type > &__v, const _Expr< _Dom,
typename _Dom::value_type > &__e)
template<class _Dom > _Expr< _BinClos< __logical_and, _Expr, _ValArray,
_Dom, typename _Dom::value_type >, typename __fun< __logical_and,
typename _Dom::value_type >::result_type > operator&& (const _Expr<
_Dom, typename _Dom::value_type > &__e, const valarray< typename
_Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __logical_and, _Constant, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __logical_and,
typename _Dom::value_type >::result_type > operator&& (const
typename _Dom::value_type &__t, const _Expr< _Dom, typename
_Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __logical_and, _Expr, _Constant,
_Dom, typename _Dom::value_type >, typename __fun< __logical_and,
typename _Dom::value_type >::result_type > operator&& (const _Expr<
_Dom, typename _Dom::value_type > &__v, const typename
_Dom::value_type &__t)
template<class _Dom1 , class _Dom2 > _Expr< _BinClos< __logical_and,
_Expr, _Expr, _Dom1, _Dom2 >, typename __fun< __logical_and,
typename _Dom1::value_type >::result_type > operator&& (const _Expr<
_Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2,
typename _Dom2::value_type > &__w)
template<typename _Tp > _Expr< _BinClos< __logical_and, _Constant,
_ValArray, _Tp, _Tp >, typename __fun< __logical_and, _Tp
>::result_type > operator&& (const _Tp &__t, const valarray< _Tp >
&__v)
template<typename _Tp > _Expr< _BinClos< __logical_and, _ValArray,
_Constant, _Tp, _Tp >, typename __fun< __logical_and, _Tp
>::result_type > operator&& (const valarray< _Tp > &__v, const _Tp
&__t)
template<typename _Tp > _Expr< _BinClos< __logical_and, _ValArray,
_ValArray, _Tp, _Tp >, typename __fun< __logical_and, _Tp
>::result_type > operator&& (const valarray< _Tp > &__v, const
valarray< _Tp > &__w)
&= — the compound assignment trio
Notice these take a reference on the left (&__a) so they actually mutate the flag object, and a plain value on the right. Small but mighty:
_Ios_Iostate & operator&= (_Ios_Iostate &__a, _Ios_Iostate __b)
_Ios_Openmode & operator&= (_Ios_Openmode &__a, _Ios_Openmode __b)
_Ios_Fmtflags & operator&= (_Ios_Fmtflags &__a, _Ios_Fmtflags __b)
* o'clock — multiply szn 🌸
Eight overloads again, same constant/expr/valarray pattern, all wrapped in __multiplies:
template<class _Dom > _Expr< _BinClos< __multiplies, _ValArray, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __multiplies,
typename _Dom::value_type >::result_type > operator* (const
valarray< typename _Dom::value_type > &__v, const _Expr< _Dom,
typename _Dom::value_type > &__e)
template<class _Dom > _Expr< _BinClos< __multiplies, _Expr, _ValArray,
_Dom, typename _Dom::value_type >, typename __fun< __multiplies,
typename _Dom::value_type >::result_type > operator* (const _Expr<
_Dom, typename _Dom::value_type > &__e, const valarray< typename
_Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __multiplies, _Constant, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __multiplies,
typename _Dom::value_type >::result_type > operator* (const typename
_Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type
> &__v)
template<class _Dom > _Expr< _BinClos< __multiplies, _Expr, _Constant,
_Dom, typename _Dom::value_type >, typename __fun< __multiplies,
typename _Dom::value_type >::result_type > operator* (const _Expr<
_Dom, typename _Dom::value_type > &__v, const typename
_Dom::value_type &__t)
template<class _Dom1 , class _Dom2 > _Expr< _BinClos< __multiplies,
_Expr, _Expr, _Dom1, _Dom2 >, typename __fun< __multiplies, typename
_Dom1::value_type >::result_type > operator* (const _Expr< _Dom1,
typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename
_Dom2::value_type > &__w)
template<typename _Tp > _Expr< _BinClos< __multiplies, _Constant,
_ValArray, _Tp, _Tp >, typename __fun< __multiplies, _Tp
>::result_type > operator* (const _Tp &__t, const valarray< _Tp >
&__v)
template<typename _Tp > _Expr< _BinClos< __multiplies, _ValArray,
_Constant, _Tp, _Tp >, typename __fun< __multiplies, _Tp
>::result_type > operator* (const valarray< _Tp > &__v, const _Tp
&__t)
template<typename _Tp > _Expr< _BinClos< __multiplies, _ValArray,
_ValArray, _Tp, _Tp >, typename __fun< __multiplies, _Tp
>::result_type > operator* (const valarray< _Tp > &__v, const
valarray< _Tp > &__w)
+ part one — the expression-template squad 🦋
Five of these, all __plus, all returning _Expr. Then + gets interesting (iterators, strings) in a sec, so don't scroll away:
template<class _Dom > _Expr< _BinClos< __plus, _ValArray, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __plus, typename
_Dom::value_type >::result_type > operator+ (const valarray<
typename _Dom::value_type > &__v, const _Expr< _Dom, typename
_Dom::value_type > &__e)
template<class _Dom > _Expr< _BinClos< __plus, _Expr, _ValArray, _Dom,
typename _Dom::value_type >, typename __fun< __plus, typename
_Dom::value_type >::result_type > operator+ (const _Expr< _Dom,
typename _Dom::value_type > &__e, const valarray< typename
_Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __plus, _Constant, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __plus, typename
_Dom::value_type >::result_type > operator+ (const typename
_Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type
> &__v)
template<class _Dom > _Expr< _BinClos< __plus, _Expr, _Constant, _Dom,
typename _Dom::value_type >, typename __fun< __plus, typename
_Dom::value_type >::result_type > operator+ (const _Expr< _Dom,
typename _Dom::value_type > &__v, const typename _Dom::value_type
&__t)
template<class _Dom1 , class _Dom2 > _Expr< _BinClos< __plus, _Expr,
_Expr, _Dom1, _Dom2 >, typename __fun< __plus, typename
_Dom1::value_type >::result_type > operator+ (const _Expr< _Dom1,
typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename
_Dom2::value_type > &__w)
+ part two — n + iterator energy, and strings being iconic 💖
Bestie, note the direction: int + iterator (not iterator + int) — the ptrdiff_t __n comes first. And then two basic_string concatenations, one with a single _CharT and one with a const _CharT *. Chef's kiss:
template<typename _Iterator > move_iterator< _Iterator > operator+
(typename move_iterator< _Iterator >::difference_type __n, const
move_iterator< _Iterator > &__x)
template<typename _Tp , typename _Ref , typename _Ptr > _Deque_iterator<
_Tp, _Ref, _Ptr > operator+ (ptrdiff_t __n, const _Deque_iterator<
_Tp, _Ref, _Ptr > &__x)
_Bit_const_iterator operator+ (ptrdiff_t __n, const _Bit_const_iterator
&__x)
_Bit_iterator operator+ (ptrdiff_t __n, const _Bit_iterator &__x)
template<typename _CharT , typename _Traits , typename _Alloc >
basic_string< _CharT, _Traits, _Alloc > operator+ (const
basic_string< _CharT, _Traits, _Alloc > &__lhs, _CharT __rhs)
template<typename _CharT , typename _Traits , typename _Alloc >
basic_string< _CharT, _Traits, _Alloc > operator+ (const
basic_string< _CharT, _Traits, _Alloc > &__lhs, const _CharT *__rhs)
Quick vibe check: every single one of these is a declared overload — presence here doesn't promise anything about performance or laziness for the iterator/string ones, those are just the listed overloads. Don't @ me, I'm literally just reading the page 📖
Still more operators to go, so keep scrolling bestie, we're not done yet 💀
okay so we're still deep in the overload zone and honestly? this is the part where the manpage just starts flexing 💅 like it's listing every single way you can say "plus" in C++. no cap. let's get into it — every signature stays exactly as it is, i'm just here to hype you up along the way 🫶
the operator+ era — basic_string first, obviously, she's the main character 🎀
template<typename _CharT , typename _Traits , typename _Alloc >
basic_string< _CharT, _Traits, _Alloc > operator+ (_CharT __lhs,
const basic_string< _CharT, _Traits, _Alloc > &__rhs)
character on the left, string on the right, glued together. classic.
template<typename _CharT , typename _Traits , typename _Alloc >
basic_string< _CharT, _Traits, _Alloc > operator+ (const _CharT
*__lhs, const basic_string< _CharT, _Traits, _Alloc > &__rhs)
same deal but your left side is a const _CharT *. slay.
template<typename _CharT , typename _Traits , typename _Alloc >
basic_string< _CharT, _Traits, _Alloc > operator+ (const
basic_string< _CharT, _Traits, _Alloc > &__lhs, const basic_string<
_CharT, _Traits, _Alloc > &__rhs)
string + string. the og. nothing more to say, it ate ✨
now valarray wants a turn 🍓
template<typename _Tp > _Expr< _BinClos< __plus, _Constant, _ValArray,
_Tp, _Tp >, typename __fun< __plus, _Tp >::result_type > operator+
(const _Tp &__t, const valarray< _Tp > &__v)
constant 🫱 valarray.
template<typename _Tp > _Expr< _BinClos< __plus, _ValArray, _Constant,
_Tp, _Tp >, typename __fun< __plus, _Tp >::result_type > operator+
(const valarray< _Tp > &__v, const _Tp &__t)
valarray 🫱 constant. they're mirrors, it's giving twins 👯
template<typename _Tp > _Expr< _BinClos< __plus, _ValArray, _ValArray,
_Tp, _Tp >, typename __fun< __plus, _Tp >::result_type > operator+
(const valarray< _Tp > &__v, const valarray< _Tp > &__w)
valarray + valarray, and it returns one of those cursed _Expr< _BinClos<...> > lazy-evaluation gizmos. iykyk 😭
unary plus for complex — yes she exists, no i don't make the rules ⭐
template<typename _Tp > complex< _Tp > operator+ (const complex< _Tp >
&__x)
operator- time 🔥 and it comes in so many flavours, buckle up bestie
first the _Expr / valarray family, all returning that _BinClos< __minus, ... > wrapper with typename __fun< __minus, ... >::result_type on the end:
template<class _Dom > _Expr< _BinClos< __minus, _ValArray, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __minus, typename
_Dom::value_type >::result_type > operator- (const valarray<
typename _Dom::value_type > &__v, const _Expr< _Dom, typename
_Dom::value_type > &__e)
template<class _Dom > _Expr< _BinClos< __minus, _Expr, _ValArray, _Dom,
typename _Dom::value_type >, typename __fun< __minus, typename
_Dom::value_type >::result_type > operator- (const _Expr< _Dom,
typename _Dom::value_type > &__e, const valarray< typename
_Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __minus, _Constant, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __minus, typename
_Dom::value_type >::result_type > operator- (const typename
_Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type
> &__v)
template<class _Dom > _Expr< _BinClos< __minus, _Expr, _Constant, _Dom,
typename _Dom::value_type >, typename __fun< __minus, typename
_Dom::value_type >::result_type > operator- (const _Expr< _Dom,
typename _Dom::value_type > &__v, const typename _Dom::value_type
&__t)
template<class _Dom1 , class _Dom2 > _Expr< _BinClos< __minus, _Expr,
_Expr, _Dom1, _Dom2 >, typename __fun< __minus, typename
_Dom1::value_type >::result_type > operator- (const _Expr< _Dom1,
typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename
_Dom2::value_type > &__w)
okay that's five. five whole overloads of "minus". the way this library does not know how to stop 💀
iterator subtraction — this one's actually satisfying ngl 🌸
template<typename _IteratorL , typename _IteratorR > auto operator-
(const move_iterator< _IteratorL > &__x, const move_iterator<
_IteratorR > &__y)-> decltype(__x.base()-__y.base())
trailing return type decltype(__x.base()-__y.base()) — it just hands the math straight to the underlying iterators. clean. obsessed.
template<typename _Tp , typename _RefL , typename _PtrL , typename _RefR
, typename _PtrR > _Deque_iterator< _Tp, _RefL, _PtrL
>::difference_type operator- (const _Deque_iterator< _Tp, _RefL,
_PtrL > &__x, const _Deque_iterator< _Tp, _RefR, _PtrR > &__y)
deque iterators, mixed ref/ptr types, returns a difference_type. very ✨ type-safe of her ✨
template<typename _Tp , typename _Ref , typename _Ptr > _Deque_iterator<
_Tp, _Ref, _Ptr >::difference_type operator- (const _Deque_iterator<
_Tp, _Ref, _Ptr > &__x, const _Deque_iterator< _Tp, _Ref, _Ptr >
&__y)
and the same-type version, because of course there's a same-type version 🙈
ptrdiff_t operator- (const _Bit_iterator_base &__x, const
_Bit_iterator_base &__y)
bit iterators! returns plain ptrdiff_t. no template, just vibes 💜
and we're back on valarray minus 🧚
template<typename _Tp > _Expr< _BinClos< __minus, _Constant, _ValArray,
_Tp, _Tp >, typename __fun< __minus, _Tp >::result_type > operator-
(const _Tp &__t, const valarray< _Tp > &__v)
template<typename _Tp > _Expr< _BinClos< __minus, _ValArray, _Constant,
_Tp, _Tp >, typename __fun< __minus, _Tp >::result_type > operator-
(const valarray< _Tp > &__v, const _Tp &__t)
template<typename _Tp > _Expr< _BinClos< __minus, _ValArray, _ValArray,
_Tp, _Tp >, typename __fun< __minus, _Tp >::result_type > operator-
(const valarray< _Tp > &__v, const valarray< _Tp > &__w)
unary minus for complex — the negate girlie 💅
template<typename _Tp > complex< _Tp > operator- (const complex< _Tp >
&__x)
operator/ 🌈 — spoiler: it's the exact same five-part _Dom pattern but with __divides
template<class _Dom > _Expr< _BinClos< __divides, _ValArray, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __divides,
typename _Dom::value_type >::result_type > operator/ (const
valarray< typename _Dom::value_type > &__v, const _Expr< _Dom,
typename _Dom::value_type > &__e)
template<class _Dom > _Expr< _BinClos< __divides, _Expr, _ValArray,
_Dom, typename _Dom::value_type >, typename __fun< __divides,
typename _Dom::value_type >::result_type > operator/ (const _Expr<
_Dom, typename _Dom::value_type > &__e, const valarray< typename
_Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __divides, _Constant, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __divides,
typename _Dom::value_type >::result_type > operator/ (const typename
_Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type
> &__v)
template<class _Dom > _Expr< _BinClos< __divides, _Expr, _Constant,
_Dom, typename _Dom::value_type >, typename __fun< __divides,
typename _Dom::value_type >::result_type > operator/ (const _Expr<
_Dom, typename _Dom::value_type > &__v, const typename
_Dom::value_type &__t)
template<class _Dom1 , class _Dom2 > _Expr< _BinClos< __divides, _Expr,
_Expr, _Dom1, _Dom2 >, typename __fun< __divides, typename
_Dom1::value_type >::result_type > operator/ (const _Expr< _Dom1,
typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename
_Dom2::value_type > &__w)
and the three valarray ones 🍓
template<typename _Tp > _Expr< _BinClos< __divides, _Constant,
_ValArray, _Tp, _Tp >, typename __fun< __divides, _Tp >::result_type
> operator/ (const _Tp &__t, const valarray< _Tp > &__v)
template<typename _Tp > _Expr< _BinClos< __divides, _ValArray,
_Constant, _Tp, _Tp >, typename __fun< __divides, _Tp >::result_type
> operator/ (const valarray< _Tp > &__v, const _Tp &__t)
template<typename _Tp > _Expr< _BinClos< __divides, _ValArray,
_ValArray, _Tp, _Tp >, typename __fun< __divides, _Tp >::result_type
> operator/ (const valarray< _Tp > &__v, const valarray< _Tp > &__w)
notice: nooperator/forcomplexin this batch, bestie. i'm not adding one, i'm just telling you what's here 👀
operator< 🔥🔥 the comparisons section and it is LONG. deep breath. you got this.
_Dom family again, now with __less:
template<class _Dom > _Expr< _BinClos< __less, _ValArray, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __less, typename
_Dom::value_type >::result_type > operator< (const valarray<
typename _Dom::value_type > &__v, const _Expr< _Dom, typename
_Dom::value_type > &__e)
template<class _Dom > _Expr< _BinClos< __less, _Expr, _ValArray, _Dom,
typename _Dom::value_type >, typename __fun< __less, typename
_Dom::value_type >::result_type > operator< (const _Expr< _Dom,
typename _Dom::value_type > &__e, const valarray< typename
_Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __less, _Constant, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __less, typename
_Dom::value_type >::result_type > operator< (const typename
_Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type
> &__v)
template<class _Dom > _Expr< _BinClos< __less, _Expr, _Constant, _Dom,
typename _Dom::value_type >, typename __fun< __less, typename
_Dom::value_type >::result_type > operator< (const _Expr< _Dom,
typename _Dom::value_type > &__v, const typename _Dom::value_type
&__t)
template<class _Dom1 , class _Dom2 > _Expr< _BinClos< __less, _Expr,
_Expr, _Dom1, _Dom2 >, typename __fun< __less, typename
_Dom1::value_type >::result_type > operator< (const _Expr< _Dom1,
typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename
_Dom2::value_type > &__w)
okay now the containers start rolling in and they all just return bool like normal people 😌
template<typename _Tp , typename _Tp_Deleter , typename _Up , typename
_Up_Deleter > bool operator< (const unique_ptr< _Tp, _Tp_Deleter >
&__x, const unique_ptr< _Up, _Up_Deleter > &__y)
template<typename _Tp , typename _Alloc > bool operator< (const vector<
_Tp, _Alloc > &__x, const vector< _Tp, _Alloc > &__y)
template<typename _Key , typename _Val , typename _KeyOfValue , typename
_Compare , typename _Alloc > bool operator< (const _Rb_tree< _Key,
_Val, _KeyOfValue, _Compare, _Alloc > &__x, const _Rb_tree< _Key,
_Val, _KeyOfValue, _Compare, _Alloc > &__y)
a raw _Rb_tree comparison?? in my manpage?? iconic and slightly unhinged 👑
template<typename _Tp , typename _Seq > bool operator< (const stack<
_Tp, _Seq > &__x, const stack< _Tp, _Seq > &__y)
template<typename _Key , typename _Compare , typename _Alloc > bool
operator< (const set< _Key, _Compare, _Alloc > &__x, const set<
_Key, _Compare, _Alloc > &__y)
template<typename _Tp , typename _Seq > bool operator< (const queue<
_Tp, _Seq > &__x, const queue< _Tp, _Seq > &__y)
template<class _T1 , class _T2 > bool operator< (const pair< _T1, _T2 >
&__x, const pair< _T1, _T2 > &__y)
template<typename _Key , typename _Compare , typename _Alloc > bool
operator< (const multiset< _Key, _Compare, _Alloc > &__x, const
multiset< _Key, _Compare, _Alloc > &__y)
template<typename _Key , typename _Tp , typename _Compare , typename
_Alloc > bool operator< (const multimap< _Key, _Tp, _Compare, _Alloc
> &__x, const multimap< _Key, _Tp, _Compare, _Alloc > &__y)
template<typename _Key , typename _Tp , typename _Compare , typename
_Alloc > bool operator< (const map< _Key, _Tp, _Compare, _Alloc >
&__x, const map< _Key, _Tp, _Compare, _Alloc > &__y)
template<typename _Tp , typename _Alloc > bool operator< (const list<
_Tp, _Alloc > &__x, const list< _Tp, _Alloc > &__y)
template<typename _IteratorL , typename _IteratorR > bool operator<
(const move_iterator< _IteratorL > &__x, const move_iterator<
_IteratorR > &__y)
template<typename _Tp , typename _Alloc > bool operator< (const deque<
_Tp, _Alloc > &__x, const deque< _Tp, _Alloc > &__y)
template<typename _Tp , typename _RefL , typename _PtrL , typename _RefR
, typename _PtrR > bool operator< (const _Deque_iterator< _Tp,
_RefL, _PtrL > &__x, const _Deque_iterator< _Tp, _RefR, _PtrR >
&__y)
template<typename _Tp , typename _Ref , typename _Ptr > bool operator<
(const _Deque_iterator< _Tp, _Ref, _Ptr > &__x, const
_Deque_iterator< _Tp, _Ref, _Ptr > &__y)
template<typename _Tp , typename _Alloc > bool operator< (const
forward_list< _Tp, _Alloc > &__lx, const forward_list< _Tp, _Alloc >
&__ly)
little detail bestie — this one's params are __lx and __ly, not __x and __y. that's not a typo on my end, that's literally what's written. respect the naming 🫶
and to close this chunk out, strings get compared against raw const _CharT * in both directions:
template<typename _CharT , typename _Traits , typename _Alloc > bool
operator< (const _CharT *__lhs, const basic_string< _CharT, _Traits,
_Alloc > &__rhs)
template<typename _CharT , typename _Traits , typename _Alloc > bool
operator< (const basic_string< _CharT, _Traits, _Alloc > &__lhs,
const _CharT *__rhs)
and that's the batch 💖 there's genuinely more overload coming, so don't go anywhere — we're not done and the manpage knows it 🌸
okay so this stretch of the synopsis is literally the overload parade 🎉 — a whole glittery army of operator< and operator<< declarations, and bestie we are listing every single one. no skimming, no "yeah yeah you get the idea" 🙅♀️ the facts stay, the vibe is just cuter now. periodt. 💅
first up, the < girlies: string against string, and then the sub_match crew doing their whole iterator_traits thing 🦋
template<typename _CharT , typename _Traits , typename _Alloc > bool operator< (const basic_string< _CharT, _Traits, _Alloc > &__lhs, const basic_string< _CharT, _Traits, _Alloc > &__rhs)
template<typename _Bi_iter > bool operator< (const sub_match< _Bi_iter > &__lhs, typename iterator_traits< _Bi_iter >::value_type const &__rhs)
template<typename _Bi_iter > bool operator< (typename iterator_traits< _Bi_iter >::value_type const &__lhs, const sub_match< _Bi_iter > &__rhs)
template<typename _Bi_iter > bool operator< (const sub_match< _Bi_iter > &__lhs, typename iterator_traits< _Bi_iter >::value_type const *__rhs)
template<typename _Bi_iter > bool operator< (typename iterator_traits< _Bi_iter >::value_type const *__lhs, const sub_match< _Bi_iter > &__rhs)
template<typename _Bi_iter , class _Ch_traits , class _Ch_alloc > bool operator< (const sub_match< _Bi_iter > &__lhs, const basic_string< typename iterator_traits< _Bi_iter >::value_type, _Ch_traits, _Ch_alloc > &__rhs)
template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc > bool operator< (const basic_string< typename iterator_traits< _Bi_iter >::value_type, _Ch_traits, _Ch_alloc > &__lhs, const sub_match< _Bi_iter > &__rhs)
template<typename _BiIter > bool operator< (const sub_match< _BiIter > &__lhs, const sub_match< _BiIter > &__rhs)
see how the _Bi_iter ones go both directions? 🫶 sub_match on the left, sub_match on the right, and the plain value type and pointer versions too. equal opportunity comparison, we love to see it ✨
then we've got array vs array, the valarray-and-a-scalar < trio, the tuple one with the double variadic pack energy 👑, and the two error_condition / error_code ones:
template<typename _Tp , std::size_t _Nm> bool operator< (const array< _Tp, _Nm > &__a, const array< _Tp, _Nm > &__b)
template<typename _Tp > _Expr< _BinClos< __less, _Constant, _ValArray, _Tp, _Tp >, typename __fun< __less, _Tp >::result_type > operator< (const _Tp &__t, const valarray< _Tp > &__v)
template<typename _Tp > _Expr< _BinClos< __less, _ValArray, _Constant, _Tp, _Tp >, typename __fun< __less, _Tp >::result_type > operator< (const valarray< _Tp > &__v, const _Tp &__t)
template<typename _Tp > _Expr< _BinClos< __less, _ValArray, _ValArray, _Tp, _Tp >, typename __fun< __less, _Tp >::result_type > operator< (const valarray< _Tp > &__v, const valarray< _Tp > &__w)
template<typename... _TElements, typename... _UElements> bool operator< (const tuple< _TElements...> &__t, const tuple< _UElements...> &__u)
bool operator< (const error_condition &__lhs, const error_condition &__rhs)
bool operator< (const error_code &__lhs, const error_code &__rhs)
those valarray ones return an _Expr< _BinClos< ... > > instead of a plain bool, which is highkey iconic of them and also exactly what the declaration says, so we're not questioning it 💀
okay, now the << section of the parade, and it is huge 🙈 starting with __versa_string and then the big valarray shift-left _Expr family:
template<typename _CharT , typename _Traits , typename _Alloc , template< typename, typename, typename > class _Base> basic_ostream< _CharT, _Traits > & operator<< (basic_ostream< _CharT, _Traits > &__os, const __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > &__str)
template<class _Dom > _Expr< _BinClos< __shift_left, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename __fun< __shift_left, typename _Dom::value_type >::result_type > operator<< (const valarray< typename _Dom::value_type > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
template<class _Dom > _Expr< _BinClos< __shift_left, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename __fun< __shift_left, typename _Dom::value_type >::result_type > operator<< (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __shift_left, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename __fun< __shift_left, typename _Dom::value_type >::result_type > operator<< (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __shift_left, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename __fun< __shift_left, typename _Dom::value_type >::result_type > operator<< (const _Expr< _Dom, typename _Dom::value_type > &__v, const typename _Dom::value_type &__t)
template<class _Dom1 , class _Dom2 > _Expr< _BinClos< __shift_left, _Expr, _Expr, _Dom1, _Dom2 >, typename __fun< __shift_left, typename _Dom1::value_type >::result_type > operator<< (const _Expr< _Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename _Dom2::value_type > &__w)
six whole _Dom-flavoured overloads, each one a different combination of _ValArray, _Expr and _Constant 🌸 that's not repetitive, that's thorough, and we respect it ✨
next: plain basic_string insertion, and then the distribution printers who all said "put me in the synopsis" 🎀
template<typename _CharT , typename _Traits , typename _Alloc > basic_ostream< _CharT, _Traits > & operator<< (basic_ostream< _CharT, _Traits > &__os, const basic_string< _CharT, _Traits, _Alloc > &__str)
template<typename _RealType , typename _CharT , typename _Traits > std::basic_ostream< _CharT, _Traits > & operator<< (std::basic_ostream< _CharT, _Traits > &__os, const gamma_distribution< _RealType > &__x)
template<typename _RealType , typename _CharT , typename _Traits > std::basic_ostream< _CharT, _Traits > & operator<< (std::basic_ostream< _CharT, _Traits > &__os, const normal_distribution< _RealType > &__x)
template<typename _RealType , typename _CharT , typename _Traits > std::basic_ostream< _CharT, _Traits > & operator<< (std::basic_ostream< _CharT, _Traits > &__os, const exponential_distribution< _RealType > &__x)
template<typename _RealType , typename _CharT , typename _Traits > std::basic_ostream< _CharT, _Traits > & operator<< (std::basic_ostream< _CharT, _Traits > &__os, const uniform_real< _RealType > &__x)
template<typename _IntType , typename _RealType , typename _CharT , typename _Traits > std::basic_ostream< _CharT, _Traits > & operator<< (std::basic_ostream< _CharT, _Traits > &__os, const binomial_distribution< _IntType, _RealType > &__x)
template<typename _IntType , typename _RealType , typename _CharT , typename _Traits > std::basic_ostream< _CharT, _Traits > & operator<< (std::basic_ostream< _CharT, _Traits > &__os, const poisson_distribution< _IntType, _RealType > &__x)
template<typename _IntType , typename _RealType , typename _CharT , typename _Traits > std::basic_ostream< _CharT, _Traits > & operator<< (std::basic_ostream< _CharT, _Traits > &__os, const geometric_distribution< _IntType, _RealType > &__x)
template<typename _CharT , typename _Traits > std::basic_ostream< _CharT, _Traits > & operator<< (std::basic_ostream< _CharT, _Traits > &__os, const bernoulli_distribution &__x)
template<typename _IntType , typename _CharT , typename _Traits > std::basic_ostream< _CharT, _Traits > & operator<< (std::basic_ostream< _CharT, _Traits > &__os, const uniform_int< _IntType > &__x)
note that bernoulli_distribution is the lowkey minimalist one with no template parameters at all in its declaration 🍓 and binomial, poisson and geometric all carry both _IntType and _RealType — copy exactly, bestie, no "fixing" 🫶
and the random number engines, who brought their entire template parameter lists to the function 💀💀 like mersenne_twister said "twelve parameters or nothing":
template<class _UniformRandomNumberGenerator1 , int __s1, class _UniformRandomNumberGenerator2 , int __s2, typename _CharT , typename _Traits > std::basic_ostream< _CharT, _Traits > & operator<< (std::basic_ostream< _CharT, _Traits > &__os, const xor_combine< _UniformRandomNumberGenerator1, __s1, _UniformRandomNumberGenerator2, __s2 > &__x)
template<class _UniformRandomNumberGenerator , int __p, int __r, typename _CharT , typename _Traits > std::basic_ostream< _CharT, _Traits > & operator<< (std::basic_ostream< _CharT, _Traits > &__os, const discard_block< _UniformRandomNumberGenerator, __p, __r > &__x)
template<typename _RealType , int __w, int __s, int __r, typename _CharT , typename _Traits > std::basic_ostream< _CharT, _Traits > & operator<< (std::basic_ostream< _CharT, _Traits > &__os, const subtract_with_carry_01< _RealType, __w, __s, __r > &__x)
template<typename _IntType , _IntType __m, int __s, int __r, typename _CharT , typename _Traits > std::basic_ostream< _CharT, _Traits > & operator<< (std::basic_ostream< _CharT, _Traits > &__os, const subtract_with_carry< _IntType, __m, __s, __r > &__x)
template<class _UIntType , int __w, int __n, int __m, int __r, _UIntType __a, int __u, int __s, _UIntType __b, int __t, _UIntType __c, int __l, typename _CharT , typename _Traits > std::basic_ostream< _CharT, _Traits > & operator<< (std::basic_ostream< _CharT, _Traits > &__os, const mersenne_twister< _UIntType, __w, __n, __m, __r, __a, __u, __s, __b, __t, __c, __l > &__x)
template<class _UIntType , _UIntType __a, _UIntType __c, _UIntType __m, typename _CharT , typename _Traits > std::basic_ostream< _CharT, _Traits > & operator<< (std::basic_ostream< _CharT, _Traits > &__os, const linear_congruential< _UIntType, __a, __c, __m > &__lcr)
linear_congruential's argument is literally named __lcr and not __x — yes, keep it, that's a deliberate choice someone made and we're honoring it 🙈 small details matter, iykyk 💅
final stretch of this part: sub_match insertion, the simple scalar/valarray shift-left three, thread::id, error_code, the whole manipulator squad (_Setw, _Setprecision, _Setfill, _Setbase, _Setiosflags, _Resetiosflags), and complex being its fab self:
template<typename _Ch_type , typename _Ch_traits , typename _Bi_iter > basic_ostream< _Ch_type, _Ch_traits > & operator<< (basic_ostream< _Ch_type, _Ch_traits > &__os, const sub_match< _Bi_iter > &__m)
template<typename _Tp > _Expr< _BinClos< __shift_left, _Constant, _ValArray, _Tp, _Tp >, typename __fun< __shift_left, _Tp >::result_type > operator<< (const _Tp &__t, const valarray< _Tp > &__v)
template<typename _Tp > _Expr< _BinClos< __shift_left, _ValArray, _Constant, _Tp, _Tp >, typename __fun< __shift_left, _Tp >::result_type > operator<< (const valarray< _Tp > &__v, const _Tp &__t)
template<typename _Tp > _Expr< _BinClos< __shift_left, _ValArray, _ValArray, _Tp, _Tp >, typename __fun< __shift_left, _Tp >::result_type > operator<< (const valarray< _Tp > &__v, const valarray< _Tp > &__w)
template<class _CharT , class _Traits > basic_ostream< _CharT, _Traits > & operator<< (basic_ostream< _CharT, _Traits > &&__out, thread::id __id)
template<typename _CharT , typename _Traits > basic_ostream< _CharT, _Traits > & operator<< (basic_ostream< _CharT, _Traits > &__os, const error_code &__e)
template<typename _CharT , typename _Traits > basic_ostream< _CharT, _Traits > & operator<< (basic_ostream< _CharT, _Traits > &__os, _Setw __f)
template<typename _CharT , typename _Traits > basic_ostream< _CharT, _Traits > & operator<< (basic_ostream< _CharT, _Traits > &__os, _Setprecision __f)
template<typename _CharT , typename _Traits > basic_ostream< _CharT, _Traits > & operator<< (basic_ostream< _CharT, _Traits > &__os, _Setfill< _CharT > __f)
template<typename _CharT , typename _Traits > basic_ostream< _CharT, _Traits > & operator<< (basic_ostream< _CharT, _Traits > &__os, _Setbase __f)
template<typename _CharT , typename _Traits > basic_ostream< _CharT, _Traits > & operator<< (basic_ostream< _CharT, _Traits > &__os, _Setiosflags __f)
template<typename _CharT , typename _Traits > basic_ostream< _CharT, _Traits > & operator<< (basic_ostream< _CharT, _Traits > &__os, _Resetiosflags __f)
template<typename _Tp , typename _CharT , class _Traits > basic_ostream< _CharT, _Traits > & operator<< (basic_ostream< _CharT, _Traits > &__os, const complex< _Tp > &__x)
the thread::id one is different okay — it takes basic_ostream< _CharT, _Traits > &&__out, an rvalue reference, not &__os. don't you dare "normalize" that, it's not a typo, it's just built different 👑 and error_code's inserter is templated while the error_code operator< further up was a plain non-template bool — both are real, both stay 💖
heads up bestie: that last<family in the source is literally cut off mid-declaration —_BinClos< __less_equal, _ValArray, _Expr,and then the page just… stops 🙈 it picks back up in the next chunk, so don't panic, we're not missing a fact, we're just mid-sentence ✨
template<class _Dom > _Expr< _BinClos< __less_equal, _ValArray, _Expr,
...and the saga continues, bestie, because the comparison operators are still coming and they did NOT come to play 💅 We're still deep in the overload list — every single one of these is a real, blessed signature, so here they are, wrapped exactly like the original, no edits, no cut corners 🫶
template<class _Dom > _Expr< _BinClos< __less_equal, _ValArray,
_Expr, typename _Dom::value_type, _Dom >, typename __fun<
__less_equal, typename _Dom::value_type >::result_type >
operator<= (const valarray< typename _Dom::value_type > &__v,
const _Expr< _Dom, typename _Dom::value_type > &__e)
template<class _Dom > _Expr< _BinClos< __less_equal, _Expr, _ValArray,
_Dom, typename _Dom::value_type >, typename __fun< __less_equal,
typename _Dom::value_type >::result_type > operator<= (const _Expr<
_Dom, typename _Dom::value_type > &__e, const valarray< typename
_Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __less_equal, _Constant, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __less_equal,
typename _Dom::value_type >::result_type > operator<= (const
typename _Dom::value_type &__t, const _Expr< _Dom, typename
_Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __less_equal, _Expr, _Constant,
_Dom, typename _Dom::value_type >, typename __fun< __less_equal,
typename _Dom::value_type >::result_type > operator<= (const _Expr<
_Dom, typename _Dom::value_type > &__v, const typename
_Dom::value_type &__t)
template<class _Dom1 , class _Dom2 > _Expr< _BinClos< __less_equal,
_Expr, _Expr, _Dom1, _Dom2 >, typename __fun< __less_equal, typename
_Dom1::value_type >::result_type > operator<= (const _Expr< _Dom1,
typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename
_Dom2::value_type > &__w)
That first cluster? It's the valarray expression-template cinematic universe ✨ like, five whole overloads of operator<= just for valarray + _Expr + _Constant combos. It's giving "we really said no combination left behind" and honestly? Obsessed 💖
template<typename _Tp , typename _Tp_Deleter , typename _Up , typename
_Up_Deleter > bool operator<= (const unique_ptr< _Tp, _Tp_Deleter >
&__x, const unique_ptr< _Up, _Up_Deleter > &__y)
template<typename _Tp , typename _Alloc > bool operator<= (const vector<
_Tp, _Alloc > &__x, const vector< _Tp, _Alloc > &__y)
template<typename _Key , typename _Val , typename _KeyOfValue , typename
_Compare , typename _Alloc > bool operator<= (const _Rb_tree< _Key,
_Val, _KeyOfValue, _Compare, _Alloc > &__x, const _Rb_tree< _Key,
_Val, _KeyOfValue, _Compare, _Alloc > &__y)
template<typename _Tp , typename _Seq > bool operator<= (const stack<
_Tp, _Seq > &__x, const stack< _Tp, _Seq > &__y)
unique_ptr, vector, the internal _Rb_tree (yes bestie, the actual red-black tree, main character energy 👑), and stack all got their operator<=. Note the return type switched to plain bool here — lowkey a glow-up moment ✨
template<typename _Key , typename _Compare , typename _Alloc > bool
operator<= (const set< _Key, _Compare, _Alloc > &__x, const set<
_Key, _Compare, _Alloc > &__y)
template<typename _Tp , typename _Seq > bool operator<= (const queue<
_Tp, _Seq > &__x, const queue< _Tp, _Seq > &__y)
template<class _T1 , class _T2 > bool operator<= (const pair< _T1, _T2 >
&__x, const pair< _T1, _T2 > &__y)
template<typename _Key , typename _Compare , typename _Alloc > bool
operator<= (const multiset< _Key, _Compare, _Alloc > &__x, const
multiset< _Key, _Compare, _Alloc > &__y)
template<typename _Key , typename _Tp , typename _Compare , typename
_Alloc > bool operator<= (const multimap< _Key, _Tp, _Compare,
_Alloc > &__x, const multimap< _Key, _Tp, _Compare, _Alloc > &__y)
template<typename _Key , typename _Tp , typename _Compare , typename
_Alloc > bool operator<= (const map< _Key, _Tp, _Compare, _Alloc >
&__x, const map< _Key, _Tp, _Compare, _Alloc > &__y)
template<typename _Tp , typename _Alloc > bool operator<= (const list<
_Tp, _Alloc > &__x, const list< _Tp, _Alloc > &__y)
Container city 🏙️ set, queue, pair, multiset, multimap, map, list — all present, all accounted for, all bool. Fr fr nobody got skipped 🙈
template<typename _IteratorL , typename _IteratorR > bool operator<=
(const move_iterator< _IteratorL > &__x, const move_iterator<
_IteratorR > &__y)
template<typename _Tp , typename _Alloc > bool operator<= (const deque<
_Tp, _Alloc > &__x, const deque< _Tp, _Alloc > &__y)
template<typename _Tp , typename _RefL , typename _PtrL , typename _RefR
, typename _PtrR > bool operator<= (const _Deque_iterator< _Tp,
_RefL, _PtrL > &__x, const _Deque_iterator< _Tp, _RefR, _PtrR >
&__y)
template<typename _Tp , typename _Ref , typename _Ptr > bool operator<=
(const _Deque_iterator< _Tp, _Ref, _Ptr > &__x, const
_Deque_iterator< _Tp, _Ref, _Ptr > &__y)
template<typename _Tp , typename _Alloc > bool operator<= (const
forward_list< _Tp, _Alloc > &__lx, const forward_list< _Tp, _Alloc >
&__ly)
Two separate _Deque_iterator overloads, bestie — one where the _Ref/_Ptr params differ between __x and __y, and one where they're the same. It's giving "we thought of everything" 💀 Also move_iterator and forward_list showed up, so slay for them 🎀
template<typename _CharT , typename _Traits , typename _Alloc > bool
operator<= (const _CharT *__lhs, const basic_string< _CharT,
_Traits, _Alloc > &__rhs)
template<typename _CharT , typename _Traits , typename _Alloc > bool
operator<= (const basic_string< _CharT, _Traits, _Alloc > &__lhs,
const _CharT *__rhs)
template<typename _CharT , typename _Traits , typename _Alloc > bool
operator<= (const basic_string< _CharT, _Traits, _Alloc > &__lhs,
const basic_string< _CharT, _Traits, _Alloc > &__rhs)
The string trio 💖 pointer-vs-string, string-vs-pointer, string-vs-string. Both directions, because symmetry is literally the bare minimum and they knew it ✨
template<typename _Bi_iter > bool operator<= (const sub_match< _Bi_iter
> &__lhs, typename iterator_traits< _Bi_iter >::value_type const
&__rhs)
template<typename _Bi_iter > bool operator<= (typename iterator_traits<
_Bi_iter >::value_type const &__lhs, const sub_match< _Bi_iter >
&__rhs)
template<typename _Bi_iter > bool operator<= (const sub_match< _Bi_iter
> &__lhs, typename iterator_traits< _Bi_iter >::value_type const
*__rhs)
template<typename _Bi_iter > bool operator<= (typename iterator_traits<
_Bi_iter >::value_type const *__lhs, const sub_match< _Bi_iter >
&__rhs)
template<typename _Bi_iter , class _Ch_traits , class _Ch_alloc > bool
operator<= (const sub_match< _Bi_iter > &__lhs, const basic_string<
typename iterator_traits< _Bi_iter >::value_type, _Ch_traits,
_Ch_alloc > &__rhs)
template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc >
bool operator<= (const basic_string< typename iterator_traits<
_Bi_iter >::value_type, _Ch_traits, _Ch_alloc > &__lhs, const
sub_match< _Bi_iter > &__rhs)
template<typename _BiIter > bool operator<= (const sub_match< _BiIter >
&__lhs, const sub_match< _BiIter > &__rhs)
sub_match really said "give me seven overloads or give me death" 😭 value_type by const ref, value_type by const pointer, basic_string, and itself — every direction, every shape. Iconic. No notes. 🦋
template<typename _Tp , std::size_t _Nm> bool operator<= (const array<
_Tp, _Nm > &__one, const array< _Tp, _Nm > &__two)
template<typename _Tp > _Expr< _BinClos< __less_equal, _Constant,
_ValArray, _Tp, _Tp >, typename __fun< __less_equal, _Tp
>::result_type > operator<= (const _Tp &__t, const valarray< _Tp >
&__v)
template<typename _Tp > _Expr< _BinClos< __less_equal, _ValArray,
_Constant, _Tp, _Tp >, typename __fun< __less_equal, _Tp
>::result_type > operator<= (const valarray< _Tp > &__v, const _Tp
&__t)
template<typename _Tp > _Expr< _BinClos< __less_equal, _ValArray,
_ValArray, _Tp, _Tp >, typename __fun< __less_equal, _Tp
>::result_type > operator<= (const valarray< _Tp > &__v, const
valarray< _Tp > &__w)
template<typename... _TElements, typename... _UElements> bool operator<=
(const tuple< _TElements...> &__t, const tuple< _UElements...> &__u)
bool operator<= (thread::id __x, thread::id __y)
array with std::size_t _Nm slay, then three more valarray ones (constant-vs-valarray, valarray-vs-constant, valarray-vs-valarray), then tuple with those parameter packs _TElements... / _UElements... and finally plain-old thread::id by value 🧚 Those last two are the non-template ones, cute 💜
That's the operator<= era of our lives, and now bestie… the vibes shift, because operator== walks in 💅 Same formula, same level of thoroughness, still zero skips:
template<class _Dom > _Expr< _BinClos< __equal_to, _ValArray, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __equal_to,
typename _Dom::value_type >::result_type > operator== (const
valarray< typename _Dom::value_type > &__v, const _Expr< _Dom,
typename _Dom::value_type > &__e)
template<class _Dom > _Expr< _BinClos< __equal_to, _Expr, _ValArray,
_Dom, typename _Dom::value_type >, typename __fun< __equal_to,
typename _Dom::value_type >::result_type > operator== (const _Expr<
_Dom, typename _Dom::value_type > &__e, const valarray< typename
_Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __equal_to, _Constant, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __equal_to,
typename _Dom::value_type >::result_type > operator== (const
typename _Dom::value_type &__t, const _Expr< _Dom, typename
_Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __equal_to, _Expr, _Constant,
_Dom, typename _Dom::value_type >, typename __fun< __equal_to,
typename _Dom::value_type >::result_type > operator== (const _Expr<
_Dom, typename _Dom::value_type > &__v, const typename
_Dom::value_type &__t)
template<class _Dom1 , class _Dom2 > _Expr< _BinClos< __equal_to, _Expr,
_Expr, _Dom1, _Dom2 >, typename __fun< __equal_to, typename
_Dom1::value_type >::result_type > operator== (const _Expr< _Dom1,
typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename
_Dom2::value_type > &__w)
Same five-ish valarray/_Expr shape, but now with __equal_to instead of __less_equal — like the exact same fit just in a different colorway 🌸 The way that _BinClos keeps showing up… it's giving "close the bin, we're doing expressions" 🎀
template<typename _Tp , typename _Tp_Deleter , typename _Up , typename
_Up_Deleter > bool operator== (const unique_ptr< _Tp, _Tp_Deleter >
&__x, const unique_ptr< _Up, _Up_Deleter > &__y)
template<typename _CharT , typename _Traits > bool operator== (const
istreambuf_iterator< _CharT, _Traits > &__a, const
istreambuf_iterator< _CharT, _Traits > &__b)
template<typename _Tp , typename _CharT , typename _Traits , typename
_Dist > bool operator== (const istream_iterator< _Tp, _CharT,
_Traits, _Dist > &__x, const istream_iterator< _Tp, _CharT, _Traits,
_Dist > &__y)
Ooh, new faces 👀 istreambuf_iterator and istream_iterator joined the equality party (and yes, the iterator params are named __a and __b for the streambuf one, __x and __y for the istream one — details matter, bestie 🦋) plus unique_ptr again 💖
template<typename _Tp , typename _Alloc > bool operator== (const vector<
_Tp, _Alloc > &__x, const vector< _Tp, _Alloc > &__y)
template<typename _Key , typename _Val , typename _KeyOfValue , typename
_Compare , typename _Alloc > bool operator== (const _Rb_tree< _Key,
_Val, _KeyOfValue, _Compare, _Alloc > &__x, const _Rb_tree< _Key,
_Val, _KeyOfValue, _Compare, _Alloc > &__y)
template<typename _Val > bool operator== (const _Rb_tree_iterator< _Val
> &__x, const _Rb_tree_const_iterator< _Val > &__y)
vector, _Rb_tree, and — wait for it — _Rb_tree_iterator vs _Rb_tree_const_iterator 🔥 that's the mixed mutable/const comparison, and it ate, no crumbs ✨
template<typename _Tp , typename _Seq > bool operator== (const stack<
_Tp, _Seq > &__x, const stack< _Tp, _Seq > &__y)
template<typename _Key , typename _Compare , typename _Alloc > bool
operator== (const set< _Key, _Compare, _Alloc > &__x, const set<
_Key, _Compare, _Alloc > &__y)
template<typename _Tp , typename _Seq > bool operator== (const queue<
_Tp, _Seq > &__x, const queue< _Tp, _Seq > &__y)
template<class _T1 , class _T2 > bool operator== (const pair< _T1, _T2 >
&__x, const pair< _T1, _T2 > &__y)
template<typename _Key , typename _Compare , typename _Alloc > bool
operator== (const multiset< _Key, _Compare, _Alloc > &__x, const
multiset< _Key, _Compare, _Alloc > &__y)
template<typename _Key , typename _Tp , typename _Compare , typename
_Alloc > bool operator== (const multimap< _Key, _Tp, _Compare,
_Alloc > &__x, const multimap< _Key, _Tp, _Compare, _Alloc > &__y)
template<typename _Key , typename _Tp , typename _Compare , typename
_Alloc > bool operator== (const map< _Key, _Tp, _Compare, _Alloc >
&__x, const map< _Key, _Tp, _Compare, _Alloc > &__y)
template<typename _Tp , typename _Alloc > bool operator== (const list<
_Tp, _Alloc > &__x, const list< _Tp, _Alloc > &__y)
The containers brought the whole friend group 👑 stack, set, queue, pair, multiset, multimap, map, list — every one of them with their own ==. Like genuinely that's the group chat all showing up to the function on time 😭💖
bestie note 🫶: these are alltemplatedeclarations and<kbd>Ctrl</kbd>+<kbd>C</kbd>-ing them into your own code is not the move — they're the standard library's overload list, and this part of the page is still going, so keep scrolling, we're not done yet ⭐
okay so we're still in the synopsis bestie, the overload wall continues and it does not stop 💅 nobody is skipping these, every single signature goes in, character for character, because the standard library does not believe in "etc." ✨
first up: the list and deque girlies, plus their iterator besties 🫶
template<typename _Val > bool operator== (const _List_iterator< _Val > &__x, const _List_const_iterator< _Val > &__y)
template<typename _IteratorL , typename _IteratorR > bool operator== (const move_iterator< _IteratorL > &__x, const move_iterator< _IteratorR > &__y)
template<typename _Tp , typename _Alloc > bool operator== (const deque< _Tp, _Alloc > &__x, const deque< _Tp, _Alloc > &__y)
template<typename _Tp , typename _RefL , typename _PtrL , typename _RefR , typename _PtrR > bool operator== (const _Deque_iterator< _Tp, _RefL, _PtrL > &__x, const _Deque_iterator< _Tp, _RefR, _PtrR > &__y)
template<typename _Tp , typename _Ref , typename _Ptr > bool operator== (const _Deque_iterator< _Tp, _Ref, _Ptr > &__x, const _Deque_iterator< _Tp, _Ref, _Ptr > &__y)
see how the _Deque_iterator one shows up twice? once with two different sets of ref/ptr params (_RefL, _PtrL, _RefR, _PtrR — that's the mixed comparison, icon behaviour) and once where both sides are literally the same _Ref and _Ptr. not me noticing the pattern 😭 the const_iterator duality is real:
template<typename _StateT > bool operator== (const fpos< _StateT > &__lhs, const fpos< _StateT > &__rhs)
template<typename _Tp , typename _Alloc > bool operator== (const forward_list< _Tp, _Alloc > &__lx, const forward_list< _Tp, _Alloc > &__ly)
template<typename _Tp , typename _Alloc > bool operator== (const _Fwd_list_iterator< _Tp, _Alloc > &__x, const _Fwd_list_const_iterator< _Tp, _Alloc > &__y)
fpos in the house, forward_list in the house, and yes the fwd-list iterator pair is exactly the mutable-vs-const combo again 🎀
then the string section — and she is thorough, no cap, every which side of the comparison gets its own overload:
template<typename _CharT , typename _Traits , typename _Alloc > bool operator== (const basic_string< _CharT, _Traits, _Alloc > &__lhs, const _CharT *__rhs)
template<typename _CharT , typename _Traits , typename _Alloc > bool operator== (const _CharT *__lhs, const basic_string< _CharT, _Traits, _Alloc > &__rhs)
template<typename _CharT > __gnu_cxx::__enable_if< __is_char< _CharT >::__value, bool >::__type operator== (const basic_string< _CharT > &__lhs, const basic_string< _CharT > &__rhs)
template<typename _CharT , typename _Traits , typename _Alloc > bool operator== (const basic_string< _CharT, _Traits, _Alloc > &__lhs, const basic_string< _CharT, _Traits, _Alloc > &__rhs)
okay that third one — <pink>the __gnu_cxx::__enable_if< __is_char< _CharT >::__value, bool >::__type one</pink> — she's wearing a whole namespace prefix like it's a designer bag 💜 note the basic_string there takes only _CharT, no _Traits, no _Alloc. different fit, same function name. we do not question the fit. we only transcribe it 🫡
template<typename _Tp > bool operator== (const allocator< _Tp > &, const allocator< _Tp > &)
template<typename _T1 , typename _T2 > bool operator== (const allocator< _T1 > &, const allocator< _T2 > &)
template<typename _Bi_iter , typename _Allocator > bool operator== (const match_results< _Bi_iter, _Allocator > &__m1, const match_results< _Bi_iter, _Allocator > &__m2)
the allocator ones literally have unnamed parameters — no __x, no __y, just vibes and a type. lowkey the most relatable overload in the entire library 🙈 and then match_results with the __m1 / __m2 naming, cute, consistent, we stan ✨
the sub_match family now, and bestie she is large. six whole overloads, one for each way you might possibly want to compare a sub_match to a character type:
template<typename _Bi_iter > bool operator== (const sub_match< _Bi_iter > &__lhs, typename iterator_traits< _Bi_iter >::value_type const &__rhs)
template<typename _Bi_iter > bool operator== (typename iterator_traits< _Bi_iter >::value_type const &__lhs, const sub_match< _Bi_iter > &__rhs)
template<typename _Bi_iter > bool operator== (const sub_match< _Bi_iter > &__lhs, typename iterator_traits< _Bi_iter >::value_type const *__rhs)
template<typename _Bi_iter > bool operator== (typename iterator_traits< _Bi_iter >::value_type const *__lhs, const sub_match< _Bi_iter > &__rhs)
template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc > bool operator== (const sub_match< _Bi_iter > &__lhs, const basic_string< typename iterator_traits< _Bi_iter >::value_type, _Ch_traits, _Ch_alloc > &__rhs)
template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc > bool operator== (const basic_string< typename iterator_traits< _Bi_iter >::value_type, _Ch_traits, _Ch_alloc > &__lhs, const sub_match< _Bi_iter > &__rhs)
template<typename _BiIter > bool operator== (const sub_match< _BiIter > &__lhs, const sub_match< _BiIter > &__rhs)
count them: reference, reversed reference, pointer, reversed pointer, basic_string, reversed basic_string, and then the finale where both sides are sub_match 🦋 and notice the last one uses _BiIter not _Bi_iter — one capital, no underscore. that is exactly how it's written in the original and I am not touching it 🔥
then the weird little function pair, which I personally find hilarious:
template<typename _Signature > bool operator== (_M_clear_type *, const function< _Signature > &__f)
template<typename _Signature > bool operator== (const function< _Signature > &__f, _M_clear_type *)
_M_clear_type * on the left in one, on the right in the other. symmetrical slay 💀 it's giving "we put it on both sides so nobody has to think about which order you wrote it in".
template<typename _Tp , std::size_t _Nm> bool operator== (const array< _Tp, _Nm > &__one, const array< _Tp, _Nm > &__two)
__one and __two. not __lhs and __rhs, not __x and __y. __one and __two 😭 iconic naming, no notes, and yes std::size_t _Nm is fully qualified while everything else in the page isn't. we don't ask why. we just copy it down 🎀
then the valarray trio, and these return an _Expr<...> instead of a bool — main character energy, different return type, still an operator==:
template<typename _Tp > _Expr< _BinClos< __equal_to, _Constant, _ValArray, _Tp, _Tp >, typename __fun< __equal_to, _Tp >::result_type > operator== (const _Tp &__t, const valarray< _Tp > &__v)
template<typename _Tp > _Expr< _BinClos< __equal_to, _ValArray, _Constant, _Tp, _Tp >, typename __fun< __equal_to, _Tp >::result_type > operator== (const valarray< _Tp > &__v, const _Tp &__t)
template<typename _Tp > _Expr< _BinClos< __equal_to, _ValArray, _ValArray, _Tp, _Tp >, typename __fun< __equal_to, _Tp >::result_type > operator== (const valarray< _Tp > &__v, const valarray< _Tp > &__w)
look at the _BinClos template args bestie — _Constant, _ValArray, then _ValArray, _Constant, then _ValArray, _ValArray. it's a whole little flip-flop routine 💅 and the third one uses __w while the others use __t and __v. details matter, we keep them all.
template<typename... _TElements, typename... _UElements> bool operator== (const tuple< _TElements...> &__t, const tuple< _UElements...> &__u)
variadic tuple comparison, two separate packs, _TElements and _UElements, and the < _TElements...> has that slightly cursed space placement before the >. preserved. exactly. 🫶
and to close the operator== chapter, the error-code quartet — these four are the only ones down here written with no template line at all:
bool operator== (const error_condition &__lhs, const error_condition &__rhs)
bool operator== (const error_condition &__lhs, const error_code &__rhs)
bool operator== (const error_code &__lhs, const error_condition &__rhs)
bool operator== (const error_code &__lhs, const error_code &__rhs)
four overloads, every possible pairing of error_condition and error_code, mixed on lines two and three, matched on one and four. chef's kiss, the completeness is so satisfying 😌
okay breathe bestie, because now we hit the operator> section and she is also enormous 🌸 starting with the _Expr / _Dom valarray squad, and these are the chonkiest signatures on the whole page:
template<class _Dom > _Expr< _BinClos< __greater, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename __fun< __greater, typename _Dom::value_type >::result_type > operator> (const valarray< typename _Dom::value_type > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
template<class _Dom > _Expr< _BinClos< __greater, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename __fun< __greater, typename _Dom::value_type >::result_type > operator> (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __greater, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename __fun< __greater, typename _Dom::value_type >::result_type > operator> (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __greater, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename __fun< __greater, typename _Dom::value_type >::result_type > operator> (const _Expr< _Dom, typename _Dom::value_type > &__v, const typename _Dom::value_type &__t)
template<class _Dom1 , class _Dom2 > _Expr< _BinClos< __greater, _Expr, _Expr, _Dom1, _Dom2 >, typename __fun< __greater, typename _Dom1::value_type >::result_type > operator> (const _Expr< _Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename _Dom2::value_type > &__w)
notice this whole cluster uses template<class _Dom > — class, not typename, for the template parameter 😳 every one of them. and the last one upgrades to two doms, _Dom1 and _Dom2, and its return type only mentions _Dom1::value_type. not me reading it three times. it's fine. it's copied. it's correct. 💀
then the container operator> run, and honestly the variety is so cute — pointers, vectors, trees, adaptors, maps, all the girlies showing up 🎀
template<typename _Tp , typename _Tp_Deleter , typename _Up , typename _Up_Deleter > bool operator> (const unique_ptr< _Tp, _Tp_Deleter > &__x, const unique_ptr< _Up, _Up_Deleter > &__y)
template<typename _Tp , typename _Alloc > bool operator> (const vector< _Tp, _Alloc > &__x, const vector< _Tp, _Alloc > &__y)
template<typename _Key , typename _Val , typename _KeyOfValue , typename _Compare , typename _Alloc > bool operator> (const _Rb_tree< _Key, _Val, _KeyOfValue, _Compare, _Alloc > &__x, const _Rb_tree< _Key, _Val, _KeyOfValue, _Compare, _Alloc > &__y)
template<typename _Tp , typename _Seq > bool operator> (const stack< _Tp, _Seq > &__x, const stack< _Tp, _Seq > &__y)
template<typename _Key , typename _Compare , typename _Alloc > bool operator> (const set< _Key, _Compare, _Alloc > &__x, const set< _Key, _Compare, _Alloc > &__y)
template<typename _Tp , typename _Seq > bool operator> (const queue< _Tp, _Seq > &__x, const queue< _Tp, _Seq > &__y)
template<class _T1 , class _T2 > bool operator> (const pair< _T1, _T2 > &__x, const pair< _T1, _T2 > &__y)
template<typename _Key , typename _Compare , typename _Alloc > bool operator> (const multiset< _Key, _Compare, _Alloc > &__x, const multiset< _Key, _Compare, _Alloc > &__y)
template<typename _Key , typename _Tp , typename _Compare , typename _Alloc > bool operator> (const multimap< _Key, _Tp, _Compare, _Alloc > &__x, const multimap< _Key, _Tp, _Compare, _Alloc > &__y)
template<typename _Key , typename _Tp , typename _Compare , typename _Alloc > bool operator> (const map< _Key, _Tp, _Compare, _Alloc > &__x, const map< _Key, _Tp, _Compare, _Alloc > &__y)
template<typename _Tp , typename _Alloc > bool operator> (const list< _Tp, _Alloc > &__x, const list< _Tp, _Alloc > &__y)
the unique_ptr one is the wildest of the bunch — _Tp vs _Up, _Tp_Deleter vs _Up_Deleter, literal cross-type comparison and we love a flexible icon 💜 and pair is over there using class _T1 , class _T2 while everyone else around it says typename. keep both. no reconciling. 🙅
iterators and deques again, the operator> remix:
template<typename _IteratorL , typename _IteratorR > bool operator> (const move_iterator< _IteratorL > &__x, const move_iterator< _IteratorR > &__y)
template<typename _Tp , typename _Alloc > bool operator> (const deque< _Tp, _Alloc > &__x, const deque< _Tp, _Alloc > &__y)
template<typename _Tp , typename _RefL , typename _PtrL , typename _RefR , typename _PtrR > bool operator> (const _Deque_iterator< _Tp, _RefL, _PtrL > &__x, const _Deque_iterator< _Tp, _RefR, _PtrR > &__y)
template<typename _Tp , typename _Ref , typename _Ptr > bool operator> (const _Deque_iterator< _Tp, _Ref, _Ptr > &__x, const _Deque_iterator< _Tp, _Ref, _Ptr > &__y)
template<typename _Tp , typename _Alloc > bool operator> (const forward_list< _Tp, _Alloc > &__lx, const forward_list< _Tp, _Alloc > &__ly)
same pairs as the operator== side, mirrored down to the __lx / __ly names on forward_list. consistency is so sexy 😌✨
and the strings:
template<typename _CharT , typename _Traits , typename _Alloc > bool operator> (const _CharT *__lhs, const basic_string< _CharT, _Traits, _Alloc > &__rhs)
template<typename _CharT , typename _Traits , typename _Alloc > bool operator> (const basic_string< _CharT, _Traits, _Alloc > &__lhs, const _CharT *__rhs)
template<typename _CharT , typename _Traits , typename _Alloc > bool operator> (const basic_string< _CharT, _Traits, _Alloc > &__lhs, const basic_string< _CharT, _Traits, _Alloc > &__rhs)
heads up bestie — the order is flipped compared to the operator== block up top! over there the basic_string-first one came first; here it's the const _CharT *__lhs version that leads. and there's no __gnu_cxx::__enable_if guest appearance on this side at all. we transcribe what's there, not what our brain expects 🫠
finally, the sub_match operator> six, and check the template param keywords because they are not uniform 👑
template<typename _Bi_iter > bool operator> (const sub_match< _Bi_iter > &__lhs, typename iterator_traits< _Bi_iter >::value_type const &__rhs)
template<typename _Bi_iter > bool operator> (typename iterator_traits< _Bi_iter >::value_type const &__lhs, const sub_match< _Bi_iter > &__rhs)
template<typename _Bi_iter > bool operator> (const sub_match< _Bi_iter > &__lhs, typename iterator_traits< _Bi_iter >::value_type const *__rhs)
template<typename _Bi_iter > bool operator> (typename iterator_traits< _Bi_iter >::value_type const *__lhs, const sub_match< _Bi_iter > &__rhs)
template<typename _Bi_iter , class _Ch_traits , class _Ch_alloc > bool operator> (const sub_match< _Bi_iter > &__lhs, const basic_string< typename iterator_traits< _Bi_iter >::value_type, _Ch_traits, _Ch_alloc > &__rhs)
template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc > bool operator> (const basic_string< typename iterator_traits< _Bi_iter >::value_type, _Ch_traits, _Ch_alloc > &__lhs, const sub_match< _Bi_iter > &__rhs)
👀 did you catch it? the fifth one says class _Ch_traits , class _Ch_alloc and the sixth says typename _Ch_traits , typename _Ch_alloc — one word apart, same page, both correct, both staying exactly as written. that's the whole flex of this section fr fr 💅
and that's where this chunk runs out — still mid-synopsis, still more overloads coming, don't touch that dial bestie 🦋
okay so we're deep in the operator section now and bestie it is a lot — this is the part of the page that's just <rainbow>operator after operator after operator</rainbow>, all declared in one giant flex 💅. Every one of these is written exactly as it appears, so you can copy-paste and it'll still compile. Let's go 🏃♀️💨
💅 the operator> squad (yes, "greater than", she's here)
template<typename _BiIter > bool operator> (const sub_match< _BiIter > &__lhs, const sub_match< _BiIter > &__rhs)
sub_match versus sub_match — same iterator type both sides, __lhs and __rhs, returns a bool. Iconic. 🎀
template<typename _Tp , std::size_t _Nm> bool operator> (const array< _Tp, _Nm > &__one, const array< _Tp, _Nm > &__two)
note the argument names here are __one and __two, not __x/__y — the array version is quirky like that, we love a nonconformist ✨
template<typename _Tp > _Expr< _BinClos< __greater, _Constant, _ValArray, _Tp, _Tp >, typename __fun< __greater, _Tp >::result_type > operator> (const _Tp &__t, const valarray< _Tp > &__v)
template<typename _Tp > _Expr< _BinClos< __greater, _ValArray, _Constant, _Tp, _Tp >, typename __fun< __greater, _Tp >::result_type > operator> (const valarray< _Tp > &__v, const _Tp &__t)
template<typename _Tp > _Expr< _BinClos< __greater, _ValArray, _ValArray, _Tp, _Tp >, typename __fun< __greater, _Tp >::result_type > operator> (const valarray< _Tp > &__v, const valarray< _Tp > &__w)
🫶 the valarray trio!! constant-vs-valarray, valarray-vs-constant, valarray-vs-valarray — that's the whole __greater set, all three wearing the _Expr< _BinClos< ... > > outfit. main character energy, no notes.
template<typename... _TElements, typename... _UElements> bool operator> (const tuple< _TElements...> &__t, const tuple< _UElements...> &__u)
two variadic packs, _TElements... and _UElements..., so the tuples don't even have to be the same shape. lowkey the most flexible one on this list 😌
bool operator> (thread::id __x, thread::id __y)
no template at all, just a straight-up plain bool operator> taking two thread::id by value. she's simple, she's confident, she ate. 💀
👑 operator>= — the big one, buckle up
starting with the _Dom family, all five of them, all returning one of those _Expr< _BinClos< __greater_equal, ... > > things:
template<class _Dom > _Expr< _BinClos< __greater_equal, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename __fun< __greater_equal, typename _Dom::value_type >::result_type > operator>= (const valarray< typename _Dom::value_type > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
template<class _Dom > _Expr< _BinClos< __greater_equal, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename __fun< __greater_equal, typename _Dom::value_type >::result_type > operator>= (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __greater_equal, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename __fun< __greater_equal, typename _Dom::value_type >::result_type > operator>= (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __greater_equal, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename __fun< __greater_equal, typename _Dom::value_type >::result_type > operator>= (const _Expr< _Dom, typename _Dom::value_type > &__v, const typename _Dom::value_type &__t)
template<class _Dom1 , class _Dom2 > _Expr< _BinClos< __greater_equal, _Expr, _Expr, _Dom1, _Dom2 >, typename __fun< __greater_equal, typename _Dom1::value_type >::result_type > operator>= (const _Expr< _Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename _Dom2::value_type > &__w)
that last one is the only one taking two different _Doms (_Dom1 AND _Dom2, bestie, she's ambidextrous 🌈) and note it uses _Dom1::value_type in the __fun< ... > part. the other four are single-_Dom girlies. periodt.
now the containers start rolling in, all bool, all __x/__y:
template<typename _Tp , typename _Tp_Deleter , typename _Up , typename _Up_Deleter > bool operator>= (const unique_ptr< _Tp, _Tp_Deleter > &__x, const unique_ptr< _Up, _Up_Deleter > &__y)
two different pointer types AND two different deleters, _Tp_Deleter and _Up_Deleter — cross-type comparison, we stan 💜
template<typename _Tp , typename _Alloc > bool operator>= (const vector< _Tp, _Alloc > &__x, const vector< _Tp, _Alloc > &__y)
template<typename _Key , typename _Val , typename _KeyOfValue , typename _Compare , typename _Alloc > bool operator>= (const _Rb_tree< _Key, _Val, _KeyOfValue, _Compare, _Alloc > &__x, const _Rb_tree< _Key, _Val, _KeyOfValue, _Compare, _Alloc > &__y)
the _Rb_tree one is giving internal-implementation realness — five template params, _Key, _Val, _KeyOfValue, _Compare, _Alloc, and she's not hiding. iykyk 🧚
template<typename _Tp , typename _Seq > bool operator>= (const stack< _Tp, _Seq > &__x, const stack< _Tp, _Seq > &__y)
template<typename _Key , typename _Compare , typename _Alloc > bool operator>= (const set< _Key, _Compare, _Alloc > &__x, const set< _Key, _Compare, _Alloc > &__y)
template<typename _Tp , typename _Seq > bool operator>= (const queue< _Tp, _Seq > &__x, const queue< _Tp, _Seq > &__y)
template<class _T1 , class _T2 > bool operator>= (const pair< _T1, _T2 > &__x, const pair< _T1, _T2 > &__y)
class not typename on this one, and _T1/_T2 not _Tp/_Up — the pair version just had to be different 🙈
template<typename _Key , typename _Compare , typename _Alloc > bool operator>= (const multiset< _Key, _Compare, _Alloc > &__x, const multiset< _Key, _Compare, _Alloc > &__y)
template<typename _Key , typename _Tp , typename _Compare , typename _Alloc > bool operator>= (const multimap< _Key, _Tp, _Compare, _Alloc > &__x, const multimap< _Key, _Tp, _Compare, _Alloc > &__y)
template<typename _Key , typename _Tp , typename _Compare , typename _Alloc > bool operator>= (const map< _Key, _Tp, _Compare, _Alloc > &__x, const map< _Key, _Tp, _Compare, _Alloc > &__y)
template<typename _Tp , typename _Alloc > bool operator>= (const list< _Tp, _Alloc > &__x, const list< _Tp, _Alloc > &__y)
template<typename _IteratorL , typename _IteratorR > bool operator>= (const move_iterator< _IteratorL > &__x, const move_iterator< _IteratorR > &__y)
_IteratorL vs _IteratorR — left and right, two separate iterator types, cross-type tea ☕ she said "i'm not limiting myself to one iterator type."
template<typename _Tp , typename _Alloc > bool operator>= (const deque< _Tp, _Alloc > &__x, const deque< _Tp, _Alloc > &__y)
and then the deque iterator ones, which are their own little subplot:
template<typename _Tp , typename _RefL , typename _PtrL , typename _RefR , typename _PtrR > bool operator>= (const _Deque_iterator< _Tp, _RefL, _PtrL > &__x, const _Deque_iterator< _Tp, _RefR, _PtrR > &__y)
four extra params?? _RefL, _PtrL, _RefR, _PtrR — left ref/ptr and right ref/ptr. she's doing the most and honestly? valid. 💅
template<typename _Tp , typename _Ref , typename _Ptr > bool operator>= (const _Deque_iterator< _Tp, _Ref, _Ptr > &__x, const _Deque_iterator< _Tp, _Ref, _Ptr > &__y)
this one's the same-types version — just _Ref and _Ptr, one of each. a palate cleanser 🍓
template<typename _Tp , typename _Alloc > bool operator>= (const forward_list< _Tp, _Alloc > &__lx, const forward_list< _Tp, _Alloc > &__ly)
⚠️ heads up bestie: the arg names here are __lx and __ly, with the extra l. not a typo on my part, that's literally in the source. forward_list stays weird 💀
template<typename _CharT , typename _Traits , typename _Alloc > bool operator>= (const _CharT *__lhs, const basic_string< _CharT, _Traits, _Alloc > &__rhs)
template<typename _CharT , typename _Traits , typename _Alloc > bool operator>= (const basic_string< _CharT, _Traits, _Alloc > &__lhs, const _CharT *__rhs)
template<typename _CharT , typename _Traits , typename _Alloc > bool operator>= (const basic_string< _CharT, _Traits, _Alloc > &__lhs, const basic_string< _CharT, _Traits, _Alloc > &__rhs)
the three basic_string besties — raw pointer on the left, raw pointer on the right, and string-vs-string. __lhs/__rhs all the way through, raw pointer typed as const _CharT *. 🦋
now the sub_match cluster (six of them, all _Bi_iter, all bool):
template<typename _Bi_iter > bool operator>= (const sub_match< _Bi_iter > &__lhs, typename iterator_traits< _Bi_iter >::value_type const &__rhs)
template<typename _Bi_iter > bool operator>= (typename iterator_traits< _Bi_iter >::value_type const &__lhs, const sub_match< _Bi_iter > &__rhs)
template<typename _Bi_iter > bool operator>= (const sub_match< _Bi_iter > &__lhs, typename iterator_traits< _Bi_iter >::value_type const *__rhs)
template<typename _Bi_iter > bool operator>= (typename iterator_traits< _Bi_iter >::value_type const *__lhs, const sub_match< _Bi_iter > &__rhs)
template<typename _Bi_iter , class _Ch_traits , class _Ch_alloc > bool operator>= (const sub_match< _Bi_iter > &__lhs, const basic_string< typename iterator_traits< _Bi_iter >::value_type, _Ch_traits, _Ch_alloc > &__rhs)
template<typename _Bi_iter , typename _Ch_traits , typename _Ch_alloc > bool operator>= (const basic_string< typename iterator_traits< _Bi_iter >::value_type, _Ch_traits, _Ch_alloc > &__lhs, const sub_match< _Bi_iter > &__rhs)
👀 did you catch it? the first of those two string ones uses class _Ch_traits , class _Ch_alloc, and the second uses typename _Ch_traits , typename _Ch_alloc. same thing, different spelling — don't come for me, that's genuinely how they wrote it ✨
template<typename _BiIter > bool operator>= (const sub_match< _BiIter > &__lhs, const sub_match< _BiIter > &__rhs)
back to _BiIter (capital I) for the sub_match-vs-sub_match one, after all those _Bi_iters. she contains multitudes 💜
template<typename _Tp , std::size_t _Nm> bool operator>= (const array< _Tp, _Nm > &__one, const array< _Tp, _Nm > &__two)
__one/__two again for array — consistent with her operator> sister, respect 💯
and the __greater_equal valarray trio:
template<typename _Tp > _Expr< _BinClos< __greater_equal, _Constant, _ValArray, _Tp, _Tp >, typename __fun< __greater_equal, _Tp >::result_type > operator>= (const _Tp &__t, const valarray< _Tp > &__v)
template<typename _Tp > _Expr< _BinClos< __greater_equal, _ValArray, _Constant, _Tp, _Tp >, typename __fun< __greater_equal, _Tp >::result_type > operator>= (const valarray< _Tp > &__v, const _Tp &__t)
template<typename _Tp > _Expr< _BinClos< __greater_equal, _ValArray, _ValArray, _Tp, _Tp >, typename __fun< __greater_equal, _Tp >::result_type > operator>= (const valarray< _Tp > &__v, const valarray< _Tp > &__w)
template<typename... _TElements, typename... _UElements> bool operator>= (const tuple< _TElements...> &__t, const tuple< _UElements...> &__u)
bool operator>= (thread::id __x, thread::id __y)
and that closes out the >= set — tuple with the two variadic packs, then plain old thread::id. clean, simple, no template. 🫶
🔥 operator>> — she's back and she's the streaming one
careful bestie, this is >> not >, different whole vibe:
template<typename _CharT , typename _Traits , typename _Alloc , template< typename, typename, typename > class _Base> basic_istream< _CharT, _Traits > & operator>> (basic_istream< _CharT, _Traits > &__is, __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > &__str)
okay this one is fancy — she takes a template template parameter! template< typename, typename, typename > class _Base as a fourth template argument, plus the __gnu_cxx::__versa_string on the right. returns basic_istream< _CharT, _Traits > &, takes __is and __str. she's the CEO of the >> section 👑
then the five __shift_right _Dom ones — note the name changed from __greater_equal to __shift_right, and the return type is the _Expr< _BinClos< __shift_right, ... > > package again:
template<class _Dom > _Expr< _BinClos< __shift_right, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename __fun< __shift_right, typename _Dom::value_type >::result_type > operator>> (const valarray< typename _Dom::value_type > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
template<class _Dom > _Expr< _BinClos< __shift_right, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename __fun< __shift_right, typename _Dom::value_type >::result_type > operator>> (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __shift_right, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename __fun< __shift_right, typename _Dom::value_type >::result_type > operator>> (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __shift_right, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename __fun< __shift_right, typename _Dom::value_type >::result_type > operator>> (const _Expr< _Dom, typename _Dom::value_type > &__v, const typename _Dom::value_type &__t)
template<class _Dom1 , class _Dom2 > _Expr< _BinClos< __shift_right, _Expr, _Expr, _Dom1, _Dom2 >, typename __fun< __shift_right, typename _Dom1::value_type >::result_type > operator>> (const _Expr< _Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename _Dom2::value_type > &__w)
same five shapes as the >= set — _ValArray/_Expr, _Expr/_ValArray, _Constant/_Expr, _Expr/_Constant, and the _Dom1/_Dom2 finale. muscle memory at this point 💪
template<> basic_istream< char > & operator>> (basic_istream< char > &__is, basic_string< char > &__str)
👀👀 that's a full template<> — an explicit specialization, hard-coded to char. no _CharT anywhere, just plain char. she's special and she knows it. 💅
template<typename _CharT , typename _Traits , typename _Alloc > basic_istream< _CharT, _Traits > & operator>> (basic_istream< _CharT, _Traits > &__is, basic_string< _CharT, _Traits, _Alloc > &__str)
aaand the general template right after the char special-case. classic combo, love that for us 🎀
template<typename _RealType , typename _CharT , typename _Traits > std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is, normal_distribution< _RealType > &__x)
template<typename _RealType , typename _CharT , typename _Traits > std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is, uniform_real< _RealType > &__x)
note these two are fully qualified with std:: on the stream — and the arg name on the right is __x, while the stream stays __is. 🦋
and the very last one on this stretch... she's literally mid-sentence:
template<typename _IntType , typename _RealType , typename _CharT , typename _Traits > std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is,
four template params, _IntType, _RealType, _CharT, _Traits, and then it just... cuts off at &__is,. we don't even get to see the second argument 😭 hold that thought bestie, because the list keeps going —
…and here's the tail of that last one that the page break rudely chopped in half, bestie — nothing missing, promise:
binomial_distribution< _IntType, _RealType > &__x)
💅 the rest of the extractors (operator>>, but make it a whole friend group)
Okay so these are all the operator>> overloads for the random-number distributions and engines — like, every single one gets its own extraction operator, and yes we're listing all of them because we don't gatekeep here:
template<typename _IntType , typename _RealType , typename _CharT ,
typename _Traits > std::basic_istream< _CharT, _Traits > &
operator>> (std::basic_istream< _CharT, _Traits > &__is,
poisson_distribution< _IntType, _RealType > &__x)
template<typename _IntType , typename _CharT , typename _Traits >
std::basic_istream< _CharT, _Traits > & operator>>
(std::basic_istream< _CharT, _Traits > &__is, uniform_int< _IntType
> &__x)
template<class _UniformRandomNumberGenerator1 , int __s1, class
_UniformRandomNumberGenerator2 , int __s2, typename _CharT ,
typename _Traits > std::basic_istream< _CharT, _Traits > &
operator>> (std::basic_istream< _CharT, _Traits > &__is,
xor_combine< _UniformRandomNumberGenerator1, __s1,
_UniformRandomNumberGenerator2, __s2 > &__x)
template<class _UniformRandomNumberGenerator , int __p, int __r,
typename _CharT , typename _Traits > std::basic_istream< _CharT,
_Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is,
discard_block< _UniformRandomNumberGenerator, __p, __r > &__x)
template<typename _RealType , int __w, int __s, int __r, typename _CharT
, typename _Traits > std::basic_istream< _CharT, _Traits > &
operator>> (std::basic_istream< _CharT, _Traits > &__is,
subtract_with_carry_01< _RealType, __w, __s, __r > &__x)
template<typename _IntType , _IntType __m, int __s, int __r, typename
_CharT , typename _Traits > std::basic_istream< _CharT, _Traits > &
operator>> (std::basic_istream< _CharT, _Traits > &__is,
subtract_with_carry< _IntType, __m, __s, __r > &__x)
template<class _UIntType , int __w, int __n, int __m, int __r, _UIntType
__a, int __u, int __s, _UIntType __b, int __t, _UIntType __c, int
__l, typename _CharT , typename _Traits > std::basic_istream<
_CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits
> &__is, mersenne_twister< _UIntType, __w, __n, __m, __r, __a, __u,
__s, __b, __t, __c, __l > &__x)
template<class _UIntType , _UIntType __a, _UIntType __c, _UIntType __m,
typename _CharT , typename _Traits > std::basic_istream< _CharT,
_Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is,
linear_congruential< _UIntType, __a, __c, __m > &__lcr)
Like, mersenne_twister alone has twelve template params and it's still out here living its best life with a __w, __n, __m, __r, __a, __u, __s, __b, __t, __c, __l moment. Slay, honestly. 👑
🦋 operator>> for valarray (the __shift_right era)
Three of these bad boys, one for each combo of constant vs. valarray on either side — plus the all-valarray version at the end:
template<typename _Tp > _Expr< _BinClos< __shift_right, _Constant,
_ValArray, _Tp, _Tp >, typename __fun< __shift_right, _Tp
>::result_type > operator>> (const _Tp &__t, const valarray< _Tp >
&__v)
template<typename _Tp > _Expr< _BinClos< __shift_right, _ValArray,
_Constant, _Tp, _Tp >, typename __fun< __shift_right, _Tp
>::result_type > operator>> (const valarray< _Tp > &__v, const _Tp
&__t)
template<typename _Tp > _Expr< _BinClos< __shift_right, _ValArray,
_ValArray, _Tp, _Tp >, typename __fun< __shift_right, _Tp
>::result_type > operator>> (const valarray< _Tp > &__v, const
valarray< _Tp > &__w)
🎀 the manipulator extractors + complex
_Setw, _Setprecision, _Setfill, _Setbase, _Setiosflags, _Resetiosflags — all six manipulators get pulled off the stream, and complex gets one too. Not one of them is skipped, because we don't do that here:
template<typename _CharT , typename _Traits > basic_istream< _CharT,
_Traits > & operator>> (basic_istream< _CharT, _Traits > &__is,
_Setw __f)
template<typename _CharT , typename _Traits > basic_istream< _CharT,
_Traits > & operator>> (basic_istream< _CharT, _Traits > &__is,
_Setprecision __f)
template<typename _CharT , typename _Traits > basic_istream< _CharT,
_Traits > & operator>> (basic_istream< _CharT, _Traits > &__is,
_Setfill< _CharT > __f)
template<typename _CharT , typename _Traits > basic_istream< _CharT,
_Traits > & operator>> (basic_istream< _CharT, _Traits > &__is,
_Setbase __f)
template<typename _CharT , typename _Traits > basic_istream< _CharT,
_Traits > & operator>> (basic_istream< _CharT, _Traits > &__is,
_Setiosflags __f)
template<typename _CharT , typename _Traits > basic_istream< _CharT,
_Traits > & operator>> (basic_istream< _CharT, _Traits > &__is,
_Resetiosflags __f)
template<typename _Tp , typename _CharT , class _Traits > basic_istream<
_CharT, _Traits > & operator>> (basic_istream< _CharT, _Traits >
&__is, complex< _Tp > &__x)
✨ operator^ — the bitwise-xor gang
First the _Expr versions — five flavours: valarray^_Expr, _Expr^valarray, constant^_Expr, _Expr^constant, and _Expr^_Expr for the full main-character duo:
template<class _Dom > _Expr< _BinClos< __bitwise_xor, _ValArray, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __bitwise_xor,
typename _Dom::value_type >::result_type > operator^ (const
valarray< typename _Dom::value_type > &__v, const _Expr< _Dom,
typename _Dom::value_type > &__e)
template<class _Dom > _Expr< _BinClos< __bitwise_xor, _Expr, _ValArray,
_Dom, typename _Dom::value_type >, typename __fun< __bitwise_xor,
typename _Dom::value_type >::result_type > operator^ (const _Expr<
_Dom, typename _Dom::value_type > &__e, const valarray< typename
_Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __bitwise_xor, _Constant, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __bitwise_xor,
typename _Dom::value_type >::result_type > operator^ (const typename
_Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type
> &__v)
template<class _Dom > _Expr< _BinClos< __bitwise_xor, _Expr, _Constant,
_Dom, typename _Dom::value_type >, typename __fun< __bitwise_xor,
typename _Dom::value_type >::result_type > operator^ (const _Expr<
_Dom, typename _Dom::value_type > &__v, const typename
_Dom::value_type &__t)
template<class _Dom1 , class _Dom2 > _Expr< _BinClos< __bitwise_xor,
_Expr, _Expr, _Dom1, _Dom2 >, typename __fun< __bitwise_xor,
typename _Dom1::value_type >::result_type > operator^ (const _Expr<
_Dom1, typename _Dom1::value_type > &__v, const _Expr< _Dom2,
typename _Dom2::value_type > &__w)
Then the three ios-flavoured ones — _Ios_Iostate, _Ios_Openmode, _Ios_Fmtflags:
_Ios_Iostate operator^ (_Ios_Iostate __a, _Ios_Iostate __b)
_Ios_Openmode operator^ (_Ios_Openmode __a, _Ios_Openmode __b)
_Ios_Fmtflags operator^ (_Ios_Fmtflags __a, _Ios_Fmtflags __b)
And the plain-_Tp valarray trio, with _Constant/_ValArray, _ValArray/_Constant, and _ValArray/_ValArray:
template<typename _Tp > _Expr< _BinClos< __bitwise_xor, _Constant,
_ValArray, _Tp, _Tp >, typename __fun< __bitwise_xor, _Tp
>::result_type > operator^ (const _Tp &__t, const valarray< _Tp >
&__v)
template<typename _Tp > _Expr< _BinClos< __bitwise_xor, _ValArray,
_Constant, _Tp, _Tp >, typename __fun< __bitwise_xor, _Tp
>::result_type > operator^ (const valarray< _Tp > &__v, const _Tp
&__t)
template<typename _Tp > _Expr< _BinClos< __bitwise_xor, _ValArray,
_ValArray, _Tp, _Tp >, typename __fun< __bitwise_xor, _Tp
>::result_type > operator^ (const valarray< _Tp > &__v, const
valarray< _Tp > &__w)
And obviously the compound-assign besties, operator^= for all three ios types:
_Ios_Iostate & operator^= (_Ios_Iostate &__a, _Ios_Iostate __b)
_Ios_Openmode & operator^= (_Ios_Openmode &__a, _Ios_Openmode __b)
_Ios_Fmtflags & operator^= (_Ios_Fmtflags &__a, _Ios_Fmtflags __b)
🌈 operator| — bitwise-or, but make it fashion
Same energy, different glyph. _Expr crew first:
template<class _Dom > _Expr< _BinClos< __bitwise_or, _ValArray, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __bitwise_or,
typename _Dom::value_type >::result_type > operator| (const
valarray< typename _Dom::value_type > &__v, const _Expr< _Dom,
typename _Dom::value_type > &__e)
template<class _Dom > _Expr< _BinClos< __bitwise_or, _Expr, _ValArray,
_Dom, typename _Dom::value_type >, typename __fun< __bitwise_or,
typename _Dom::value_type >::result_type > operator| (const _Expr<
_Dom, typename _Dom::value_type > &__e, const valarray< typename
_Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __bitwise_or, _Constant, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __bitwise_or,
typename _Dom::value_type >::result_type > operator| (const typename
_Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type
> &__v)
template<class _Dom > _Expr< _BinClos< __bitwise_or, _Expr, _Constant,
_Dom, typename _Dom::value_type >, typename __fun< __bitwise_or,
typename _Dom::value_type >::result_type > operator| (const _Expr<
_Dom, typename _Dom::value_type > &__v, const typename
_Dom::value_type &__t)
template<class _Dom1 , class _Dom2 > _Expr< _BinClos< __bitwise_or,
_Expr, _Expr, _Dom1, _Dom2 >, typename __fun< __bitwise_or, typename
_Dom1::value_type >::result_type > operator| (const _Expr< _Dom1,
typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename
_Dom2::value_type > &__w)
The ios trio:
_Ios_Iostate operator| (_Ios_Iostate __a, _Ios_Iostate __b)
_Ios_Openmode operator| (_Ios_Openmode __a, _Ios_Openmode __b)
_Ios_Fmtflags operator| (_Ios_Fmtflags __a, _Ios_Fmtflags __b)
The _Tp/valarray trio:
template<typename _Tp > _Expr< _BinClos< __bitwise_or, _Constant,
_ValArray, _Tp, _Tp >, typename __fun< __bitwise_or, _Tp
>::result_type > operator| (const _Tp &__t, const valarray< _Tp >
&__v)
template<typename _Tp > _Expr< _BinClos< __bitwise_or, _ValArray,
_Constant, _Tp, _Tp >, typename __fun< __bitwise_or, _Tp
>::result_type > operator| (const valarray< _Tp > &__v, const _Tp
&__t)
template<typename _Tp > _Expr< _BinClos< __bitwise_or, _ValArray,
_ValArray, _Tp, _Tp >, typename __fun< __bitwise_or, _Tp
>::result_type > operator| (const valarray< _Tp > &__v, const
valarray< _Tp > &__w)
And operator|=, the compound-assign version, all three ios flavours:
_Ios_Iostate & operator|= (_Ios_Iostate &__a, _Ios_Iostate __b)
_Ios_Openmode & operator|= (_Ios_Openmode &__a, _Ios_Openmode __b)
_Ios_Fmtflags & operator|= (_Ios_Fmtflags &__a, _Ios_Fmtflags __b)
💜 operator|| — logical-or, the finale of this batch
Five _Expr overloads, same pattern as before (_ValArray/_Expr, _Expr/_ValArray, _Constant/_Expr, _Expr/_Constant, _Expr/_Expr). This is the last crew in this part and they're gonna go on to the next part too, so stay tuned:
template<class _Dom > _Expr< _BinClos< __logical_or, _ValArray, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __logical_or,
typename _Dom::value_type >::result_type > operator|| (const
valarray< typename _Dom::value_type > &__v, const _Expr< _Dom,
typename _Dom::value_type > &__e)
template<class _Dom > _Expr< _BinClos< __logical_or, _Expr, _ValArray,
_Dom, typename _Dom::value_type >, typename __fun< __logical_or,
typename _Dom::value_type >::result_type > operator|| (const _Expr<
_Dom, typename _Dom::value_type > &__e, const valarray< typename
_Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __logical_or, _Constant, _Expr,
typename _Dom::value_type, _Dom >, typename __fun< __logical_or,
typename _Dom::value_type >::result_type > operator|| (const
typename _Dom::value_type &__t, const _Expr< _Dom, typename
_Dom::value_type > &__v)
template<class _Dom > _Expr< _BinClos< __logical_or, _Expr, _Constant,
_Dom, typename _Dom::value_type >, typename __fun< __logical_or,
typename _Dom::value_type >::result_type > operator|| (const _Expr<
_Dom, typename _Dom::value_type > &__v, const typename
_Dom::value_type &__t)
template<class _Dom1 , class _Dom2 > _Expr< _BinClos< __logical_or,
_Expr, _Expr, _Dom1, _Dom2 >, typename __fun< __logical_or, typename
_Dom1::value_type >::result_type > operator|| (const _Expr< _Dom1,
typename _Dom1::value_type > &__v, const _Expr< _Dom2, typename
_Dom2::value_type > &__w)
Lowkey that's a lot of overloads and we're not even done — more coming, don't touch that dial 🫶
okay so we're still knee-deep in the SYNOPSIS and this stretch is lowkey the alphabet hitting different — we go from operator|| all the way to replace. it's a lot of templates bestie but every single one is here, no skipping, no summarizing, periodt 💅
🌸 the operator|| trio (valarray edition)
three overloads, one for each combo of "constant" and "valarray" — the way they queued up for this is so organized of them:
template<typename _Tp > _Expr< _BinClos< __logical_or, _Constant, _ValArray, _Tp, _Tp >, typename __fun< __logical_or, _Tp >::result_type > operator|| (const _Tp &__t, const valarray< _Tp > &__v)
template<typename _Tp > _Expr< _BinClos< __logical_or, _ValArray, _Constant, _Tp, _Tp >, typename __fun< __logical_or, _Tp >::result_type > operator|| (const valarray< _Tp > &__v, const _Tp &__t)
template<typename _Tp > _Expr< _BinClos< __logical_or, _ValArray, _ValArray, _Tp, _Tp >, typename __fun< __logical_or, _Tp >::result_type > operator|| (const valarray< _Tp > &__v, const valarray< _Tp > &__w)
💅 the bit-flip girlies
operator~ showing up three times, once for each _Ios_* type — she contains multitudes:
_Ios_Iostate operator~ (_Ios_Iostate __a)
_Ios_Openmode operator~ (_Ios_Openmode __a)
_Ios_Fmtflags operator~ (_Ios_Fmtflags __a)
🦋 partial_sort — four whole versions
two template ones with named params, two _RAIter ones that are just vibes (unnamed params, we love a minimalist):
template<typename _RandomAccessIterator , typename _Compare > void partial_sort (_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last, _Compare __comp)
template<typename _RandomAccessIterator > void partial_sort (_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last)
template<typename _RAIter , typename _Compare > void partial_sort (_RAIter, _RAIter, _RAIter, _Compare)
template<typename _RAIter > void partial_sort (_RAIter, _RAIter, _RAIter)
🎀 partial_sort_copy — same energy, but it copies
literally four of them, matching set, so satisfying:
template<typename _InputIterator , typename _RandomAccessIterator , typename _Compare > _RandomAccessIterator partial_sort_copy (_InputIterator __first, _InputIterator __last, _RandomAccessIterator __result_first, _RandomAccessIterator __result_last, _Compare __comp)
template<typename _InputIterator , typename _RandomAccessIterator > _RandomAccessIterator partial_sort_copy (_InputIterator __first, _InputIterator __last, _RandomAccessIterator __result_first, _RandomAccessIterator __result_last)
template<typename _IIter , typename _RAIter , typename _Compare > _RAIter partial_sort_copy (_IIter, _IIter, _RAIter, _RAIter, _Compare)
template<typename _IIter , typename _RAIter > _RAIter partial_sort_copy (_IIter, _IIter, _RAIter, _RAIter)
✨ partial_sum — the duo
one takes a _BinaryOperation, one doesn't. that's it, that's the whole group 🫶
template<typename _InputIterator , typename _OutputIterator , typename _BinaryOperation > _OutputIterator partial_sum (_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOperation __binary_op)
template<typename _InputIterator , typename _OutputIterator > _OutputIterator partial_sum (_InputIterator __first, _InputIterator __last, _OutputIterator __result)
🔥 the partition family — they ate, honestly
partition itself, two versions:
template<typename _ForwardIterator , typename _Predicate > _ForwardIterator partition (_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
template<typename _BIter , typename _Predicate > _BIter partition (_BIter, _BIter, _Predicate)
partition_copy, which returns a pair of output iterators — two of them:
template<typename _InputIterator , typename _OutputIterator1 , typename _OutputIterator2 , typename _Predicate > pair< _OutputIterator1, _OutputIterator2 > partition_copy (_InputIterator __first, _InputIterator __last, _OutputIterator1 __out_true, _OutputIterator2 __out_false, _Predicate __pred)
template<typename _IIter , typename _OIter1 , typename _OIter2 , typename _Predicate > pair< _OIter1, _OIter2 > partition_copy (_IIter, _IIter, _OIter1, _OIter2, _Predicate)
and partition_point, also two, because symmetry is the moment:
template<typename _ForwardIterator , typename _Predicate > _ForwardIterator partition_point (_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
template<typename _FIter , typename _Predicate > _FIter partition_point (_FIter, _FIter, _Predicate)
🧚 polar — one (1) function, with a little default
notice the &=0 bestie, that default argument is right there in the signature 👀
template<typename _Tp > complex< _Tp > polar (const _Tp &, const _Tp &=0)
💜 pop_heap — four flavors, same as its push sibling later
template<typename _RandomAccessIterator , typename _Compare > void pop_heap (_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
template<typename _RandomAccessIterator > void pop_heap (_RandomAccessIterator __first, _RandomAccessIterator __last)
template<typename _RAIter , typename _Compare > void pop_heap (_RAIter, _RAIter, _Compare)
template<typename _RAIter > void pop_heap (_RAIter, _RAIter)
👑 okay the pow section. girl. LOOK at her.
this is the longest glow-up in the whole synopsis, we've got valarray pow first — constant/valarray, valarray/constant, valarray/valarray:
template<typename _Tp > _Expr< _BinClos< __pow, _Constant, _ValArray, _Tp, _Tp >, _Tp > pow (const _Tp &__t, const valarray< _Tp > &__v)
template<typename _Tp > _Expr< _BinClos< __pow, _ValArray, _Constant, _Tp, _Tp >, _Tp > pow (const valarray< _Tp > &__v, const _Tp &__t)
template<typename _Tp > _Expr< _BinClos< __pow, _ValArray, _ValArray, _Tp, _Tp >, _Tp > pow (const valarray< _Tp > &__v, const valarray< _Tp > &__w)
then the _Dom _Expr crew — five of them, named _Dom, _Dom1, _Dom2 like a little family tree 🌈 (copy this one exactly please, typename _Dom::valarray is genuinely in there, I do not make the rules):
template<class _Dom > _Expr< _BinClos< __pow, _Constant, _Expr, typename _Dom::value_type, _Dom >, typename _Dom::value_type > pow (const typename _Dom::value_type &__t, const _Expr< _Dom, typename _Dom::value_type > &__e)
template<class _Dom > _Expr< _BinClos< __pow, _Expr, _Constant, _Dom, typename _Dom::value_type >, typename _Dom::value_type > pow (const _Expr< _Dom, typename _Dom::value_type > &__e, const typename _Dom::value_type &__t)
template<class _Dom > _Expr< _BinClos< __pow, _ValArray, _Expr, typename _Dom::value_type, _Dom >, typename _Dom::value_type > pow (const valarray< typename _Dom::valarray > &__v, const _Expr< _Dom, typename _Dom::value_type > &__e)
template<class _Dom > _Expr< _BinClos< __pow, _Expr, _ValArray, _Dom, typename _Dom::value_type >, typename _Dom::value_type > pow (const _Expr< _Dom, typename _Dom::value_type > &__e, const valarray< typename _Dom::value_type > &__v)
template<class _Dom1 , class _Dom2 > _Expr< _BinClos< __pow, _Expr, _Expr, _Dom1, _Dom2 >, typename _Dom1::value_type > pow (const _Expr< _Dom1, typename _Dom1::value_type > &__e1, const _Expr< _Dom2, typename _Dom2::value_type > &__e2)
then the std::complex promotions with __gnu_cxx::__promote_2 doing the most (three of them):
template<typename _Tp , typename _Up > std::complex< typename __gnu_cxx::__promote_2< _Tp, _Up >::__type > pow (const std::complex< _Tp > &__x, const std::complex< _Up > &__y)
template<typename _Tp , typename _Up > std::complex< typename __gnu_cxx::__promote_2< _Tp, _Up >::__type > pow (const _Tp &__x, const std::complex< _Up > &__y)
template<typename _Tp , typename _Up > std::complex< typename __gnu_cxx::__promote_2< _Tp, _Up >::__type > pow (const std::complex< _Tp > &__x, const _Up &__y)
then the big __enable_if one — look at that __is_arithmetic< _Tp >::__value &&__is_arithmetic< _Up >::__value gate, she's giving very selective:
template<typename _Tp , typename _Up > __gnu_cxx::__promote_2< typename __gnu_cxx::__enable_if< __is_arithmetic< _Tp >::__value &&__is_arithmetic< _Up >::__value, _Tp >::__type, _Up >::__type pow (_Tp __x, _Up __y)
and the plain-old overloads, long double and float:
long double pow (long double __x, long double __y)
float pow (float __x, float __y)
and finally the complex< _Tp > ones (three):
template<typename _Tp > complex< _Tp > pow (const _Tp &, const complex< _Tp > &)
template<typename _Tp > complex< _Tp > pow (const complex< _Tp > &, const complex< _Tp > &)
template<typename _Tp > complex< _Tp > pow (const complex< _Tp > &, const _Tp &)
like… that's a lot of pow. she's booked and busy 💀
🍓 prev — with a default of 1
sweetie has a ::difference_type __n=1 tucked in there, don't miss it:
template<typename _BidirectionalIterator > _BidirectionalIterator prev (_BidirectionalIterator __x, typename iterator_traits< _BidirectionalIterator >::difference_type __n=1)
🎀 prev_permutation — four, returning bool
template<typename _BidirectionalIterator , typename _Compare > bool prev_permutation (_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp)
template<typename _BidirectionalIterator > bool prev_permutation (_BidirectionalIterator __first, _BidirectionalIterator __last)
template<typename _BIter , typename _Compare > bool prev_permutation (_BIter, _BIter, _Compare)
template<typename _BIter > bool prev_permutation (_BIter, _BIter)
⭐ proj — the pair
one takes a _Tp and promotes it via __gnu_cxx::__promote, one takes a std::complex< _Tp >:
template<typename _Tp > std::complex< typename __gnu_cxx::__promote< _Tp >::__type > proj (_Tp __x)
template<typename _Tp > std::complex< _Tp > proj (const std::complex< _Tp > &)
🌈 ptr_fun — two, and they hand back a functor wrapper
pointer_to_binary_function and pointer_to_unary_function, both taking a function pointer in the signature like (_Result(*__x)(_Arg1, _Arg2)):
template<typename _Arg1 , typename _Arg2 , typename _Result > pointer_to_binary_function< _Arg1, _Arg2, _Result > ptr_fun (_Result(*__x)(_Arg1, _Arg2))
template<typename _Arg , typename _Result > pointer_to_unary_function< _Arg, _Result > ptr_fun (_Result(*__x)(_Arg))
💖 push_heap — the matching four to pop_heap
template<typename _RandomAccessIterator , typename _Compare > void push_heap (_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
template<typename _RandomAccessIterator > void push_heap (_RandomAccessIterator __first, _RandomAccessIterator __last)
template<typename _RAIter , typename _Compare > void push_heap (_RAIter, _RAIter, _Compare)
template<typename _RAIter > void push_heap (_RAIter, _RAIter)
🦋 random_shuffle — four versions, one takes a generator
note the &__rand / & reference on the generator param, that's not a typo bestie:
template<typename _RandomAccessIterator , typename _RandomNumberGenerator > void random_shuffle (_RandomAccessIterator __first, _RandomAccessIterator __last, _RandomNumberGenerator &__rand)
template<typename _RandomAccessIterator > void random_shuffle (_RandomAccessIterator __first, _RandomAccessIterator __last)
template<typename _RAIter , typename _Generator > void random_shuffle (_RAIter, _RAIter, _Generator &)
template<typename _RAIter > void random_shuffle (_RAIter, _RAIter)
🌸 real — two
one promotes a _Tp through __gnu_cxx::__promote, one takes complex< _Tp >:
template<typename _Tp > __gnu_cxx::__promote< _Tp >::__type real (_Tp __x)
template<typename _Tp > _Tp real (const complex< _Tp > &__z)
🎀 ref — two, both returning reference_wrapper< _Tp >
one of them takes another reference_wrapper< _Tp >, one takes a plain _Tp &:
template<typename _Tp > reference_wrapper< _Tp > ref (reference_wrapper< _Tp > __t)
template<typename _Tp > reference_wrapper< _Tp > ref (_Tp &__t)
💜 the remove squad — six functions, all named variations of "remove"
remove itself, two:
template<typename _ForwardIterator , typename _Tp > _ForwardIterator remove (_ForwardIterator __first, _ForwardIterator __last, const _Tp &__value)
template<typename _FIter , typename _Tp > _FIter remove (_FIter, _FIter, const _Tp &)
remove_copy, two:
template<typename _InputIterator , typename _OutputIterator , typename _Tp > _OutputIterator remove_copy (_InputIterator __first, _InputIterator __last, _OutputIterator __result, const _Tp &__value)
template<typename _IIter , typename _OIter , typename _Tp > _OIter remove_copy (_IIter, _IIter, _OIter, const _Tp &)
remove_copy_if, two — this one takes a _Predicate instead of a value:
template<typename _InputIterator , typename _OutputIterator , typename _Predicate > _OutputIterator remove_copy_if (_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred)
template<typename _IIter , typename _OIter , typename _Predicate > _OIter remove_copy_if (_IIter, _IIter, _OIter, _Predicate)
remove_if, two:
template<typename _ForwardIterator , typename _Predicate > _ForwardIterator remove_if (_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
template<typename _FIter , typename _Predicate > _FIter remove_if (_FIter, _FIter, _Predicate)
🔥 replace — and we land the plane here, two of them
__old_value and __new_value, both const _Tp &:
template<typename _ForwardIterator , typename _Tp > void replace (_ForwardIterator __first, _ForwardIterator __last, const _Tp &__old_value, const _Tp &__new_value)
template<typename _FIter , typename _Tp > void replace (_FIter, _FIter, const _Tp &, const _Tp &)
and that's where this chunk of the alphabet runs out — bestie we are NOT done with the synopsis tho, there's more coming, don't you dare close the tab 😭🫶
okay so we're still in the synopsis and we've hit the r's and s's, which is honestly where the standard library goes feral 😭 every single algorithm gets like four overloads and they're all standing there like "hi bestie, pick me." it's giving understudy energy. anyway, buckle up 🎀
🔁 the replace girlies
template<typename _InputIterator , typename _OutputIterator , typename _Tp > _OutputIterator replace_copy (_InputIterator __first, _InputIterator __last, _OutputIterator __result, const _Tp &__old_value, const _Tp &__new_value)
template<typename _IIter , typename _OIter , typename _Tp > _OIter replace_copy (_IIter, _IIter, _OIter, const _Tp &, const _Tp &)
template<typename _InputIterator , typename _OutputIterator , typename _Predicate , typename _Tp > _OutputIterator replace_copy_if (_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred, const _Tp &__new_value)
template<typename _Iter , typename _OIter , typename _Predicate , typename _Tp > _OIter replace_copy_if (_Iter, _Iter, _OIter, _Predicate, const _Tp &)
template<typename _ForwardIterator , typename _Predicate , typename _Tp > void replace_if (_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, const _Tp &__new_value)
template<typename _FIter , typename _Predicate , typename _Tp > void replace_if (_FIter, _FIter, _Predicate, const _Tp &)
see how every single one of these has a twin? the long version names its params all pretty (__first, __last, __result, __old_value, __new_value, __pred), and then the short version just shows up to the party with no parameter names at all — _IIter, _IIter, _OIter, const _Tp &, const _Tp &. iconic. mysterious. doesn't do small talk. 💅
quick vibe check on who takes what: the replace_copy pair takes the old value and the new value, the replace_copy_if and replace_if pairs take a _Predicate __pred instead of an old value (so like, you decide what counts), and the _if versions — yes, they're the picky ones. always. 🦋
🎀 reset / rethrow / return / reverse
_Resetiosflags resetiosflags (ios_base::fmtflags __mask)
void rethrow_exception (exception_ptr) __attribute__((__noreturn__))
template<typename _Tp > void return_temporary_buffer (_Tp *__p)
template<typename _BidirectionalIterator > void reverse (_BidirectionalIterator __first, _BidirectionalIterator __last)
template<typename _BIter > void reverse (_BIter, _BIter)
template<typename _BidirectionalIterator , typename _OutputIterator > _OutputIterator reverse_copy (_BidirectionalIterator __first, _BidirectionalIterator __last, _OutputIterator __result)
template<typename _BIter , typename _OIter > _OIter reverse_copy (_BIter, _BIter, _OIter)
rethrow_exception has __attribute__((__noreturn__)) on it and honestly the drama of that ✨ it is telling you it is not coming back. it said "you won't see me again" and meant it 😭
also pls note reverse and reverse_copy are strictly _BidirectionalIterator business — no forward-only friends allowed, no cap. and again: pretty named twin, mysterious unnamed twin. same for the whole list, lowkey.
🔄 rotate rotation (and the iomanip-adjacent crew)
ios_base & right (ios_base &__base)
template<typename _ForwardIterator > void rotate (_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last)
template<typename _FIter > void rotate (_FIter, _FIter, _FIter)
template<typename _ForwardIterator , typename _OutputIterator > _OutputIterator rotate_copy (_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, _OutputIterator __result)
template<typename _FIter , typename _OIter > _OIter rotate_copy (_FIter, _FIter, _FIter, _OIter)
ios_base & scientific (ios_base &__base)
rotate and rotate_copy are the only three-iterator girlies in this whole stretch — __first, __middle, __last, that's the whole squad 🫶 and then right and scientific are just sitting there being ios_base & manipulators that take ios_base &__base and hand it right back. iykyk.
🔎 search & search_n
template<typename _ForwardIterator1 , typename _ForwardIterator2 , typename _BinaryPredicate > _ForwardIterator1 search (_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __predicate)
template<typename _ForwardIterator1 , typename _ForwardIterator2 > _ForwardIterator1 search (_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2)
template<typename _FIter1 , typename _FIter2 , typename _BinaryPredicate > _FIter1 search (_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate)
template<typename _FIter1 , typename _FIter2 > _FIter1 search (_FIter1, _FIter1, _FIter2, _FIter2)
template<typename _ForwardIterator , typename _Integer , typename _Tp , typename _BinaryPredicate > _ForwardIterator search_n (_ForwardIterator __first, _ForwardIterator __last, _Integer __count, const _Tp &__val, _BinaryPredicate __binary_pred)
template<typename _ForwardIterator , typename _Integer , typename _Tp > _ForwardIterator search_n (_ForwardIterator __first, _ForwardIterator __last, _Integer __count, const _Tp &__val)
template<typename _FIter , typename _Size , typename _Tp , typename _BinaryPredicate > _FIter search_n (_FIter, _FIter, _Size, const _Tp &, _BinaryPredicate)
template<typename _FIter , typename _Size , typename _Tp > _FIter search_n (_FIter, _FIter, _Size, const _Tp &)
not me counting the overloads: search has four, search_n has four. we love a balanced collection 👑
little detail bestie, don't skip it: search is a two-range situation — __first1/__last1 is range one, __first2/__last2 is range two — and the _BinaryPredicate ones name it __predicate. meanwhile search_n takes an _Integer __count and a const _Tp &__val, and its predicate is named __binary_pred. and the search_n short versions call that count param _Size instead of _Integer. the way they couldn't even agree on a template param name 😭 fr fr.
💜 the set operations (yes all of them)
template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _Compare > _OutputIterator set_difference (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator > _OutputIterator set_difference (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result)
template<typename _IIter1 , typename _IIter2 , typename _OIter , typename _Compare > _OIter set_difference (_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare)
template<typename _IIter1 , typename _IIter2 , typename _OIter > _OIter set_difference (_IIter1, _IIter1, _IIter2, _IIter2, _OIter)
template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _Compare > _OutputIterator set_intersection (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator > _OutputIterator set_intersection (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result)
template<typename _IIter1 , typename _IIter2 , typename _OIter , typename _Compare > _OIter set_intersection (_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare)
template<typename _IIter1 , typename _IIter2 , typename _OIter > _OIter set_intersection (_IIter1, _IIter1, _IIter2, _IIter2, _OIter)
four for set_difference, four for set_intersection — two ranges in (__first1/__last1, __first2/__last2), one range out (__result), and optionally a _Compare __comp if you're feeling extra. and yes, the unnamed twins are right there the whole time, lurking 🫶
and crammed in the middle of all this set math, completely unbothered:
new_handler set_new_handler (new_handler) throw ()
look at it. living its best life. no templates. just vibes and a throw (). 💀
🌈 set_symmetric_difference, set_union, and the terminate trio
template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _Compare > _OutputIterator set_symmetric_difference (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator > _OutputIterator set_symmetric_difference (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result)
template<typename _IIter1 , typename _IIter2 , typename _OIter , typename _Compare > _OIter set_symmetric_difference (_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare)
template<typename _IIter1 , typename _IIter2 , typename _OIter > _OIter set_symmetric_difference (_IIter1, _IIter1, _IIter2, _IIter2, _OIter)
terminate_handler set_terminate (terminate_handler) throw ()
unexpected_handler set_unexpected (unexpected_handler) throw ()
template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator , typename _Compare > _OutputIterator set_union (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
template<typename _InputIterator1 , typename _InputIterator2 , typename _OutputIterator > _OutputIterator set_union (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result)
template<typename _IIter1 , typename _IIter2 , typename _OIter , typename _Compare > _OIter set_union (_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare)
template<typename _IIter1 , typename _IIter2 , typename _OIter > _OIter set_union (_IIter1, _IIter1, _IIter2, _IIter2, _OIter)
set_symmetric_difference — say that five times fast, I dare you 😭 — gets the full four-pack, set_union gets the full four-pack, and sandwiched between them, again just chillin': set_terminate (terminate_handler) and set_unexpected (unexpected_handler), both with throw (), both taking a handler and giving you a handler back. the handler-swap girlies. 🎀
🌸 setbase, setfill, setiosflags, setprecision, setw, show*
_Setbase setbase (int __base)
template<typename _CharT > _Setfill< _CharT > setfill (_CharT __c)
_Setiosflags setiosflags (ios_base::fmtflags __mask)
_Setprecision setprecision (int __n)
_Setw setw (int __n)
ios_base & showbase (ios_base &__base)
ios_base & showpoint (ios_base &__base)
ios_base & showpos (ios_base &__base)
the set squad! setbase takes an int __base, setprecision and setw both take an int __n (different names, same type, we love consistency bestie 💀), setfill is the only templated one here with _CharT __c returning _Setfill< _CharT >, and setiosflags takes an ios_base::fmtflags __mask. then the show trio — showbase, showpoint, showpos — all take ios_base &__base and hand it back to you. cute. consistent. obsessed. ✨
🧚 sin & sinh (the math corner)
template<typename _Tp > _Expr< _UnClos< __sin, _ValArray, _Tp >, _Tp > sin (const valarray< _Tp > &__v)
template<class _Dom > _Expr< _UnClos< __sin, _Expr, _Dom >, typename _Dom::value_type > sin (const _Expr< _Dom, typename _Dom::value_type > &__e)
template<typename _Tp > __gnu_cxx::__enable_if< __is_integer< _Tp >::__value, double >::__type sin (_Tp __x)
long double sin (long double __x)
float sin (float __x)
template<typename _Tp > complex< _Tp > sin (const complex< _Tp > &)
template<typename _Tp > _Expr< _UnClos< __sinh, _ValArray, _Tp >, _Tp > sinh (const valarray< _Tp > &__v)
template<class _Dom > _Expr< _UnClos< __sinh, _Expr, _Dom >, typename _Dom::value_type > sinh (const _Expr< _Dom, typename _Dom::value_type > &__e)
template<typename _Tp > __gnu_cxx::__enable_if< __is_integer< _Tp >::__value, double >::__type sinh (_Tp __x)
long double sinh (long double __x)
float sinh (float __x)
template<typename _Tp > complex< _Tp > sinh (const complex< _Tp > &)
six sins. six sinhs. and they're identical in shape, which — okay, respect the symmetry, but also 🫠
look at the range of it: one for const valarray< _Tp > &__v, one for the const _Expr< _Dom, typename _Dom::value_type > &__e expression-template situation, one __gnu_cxx::__enable_if version gated on __is_integer< _Tp >::__value that hands back a double, then plain long double sin (long double __x), plain float sin (float __x), and finally complex< _Tp > sin (const complex< _Tp > &). that last one doesn't even name its parameter, the confidence is unreal 💅
🌟 skipws, sort, sort_heap
ios_base & skipws (ios_base &__base)
template<typename _RandomAccessIterator , typename _Compare > void sort (_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
template<typename _RandomAccessIterator > void sort (_RandomAccessIterator __first, _RandomAccessIterator __last)
template<typename _RAIter , typename _Compare > void sort (_RAIter, _RAIter, _Compare)
template<typename _RAIter > void sort (_RAIter, _RAIter)
template<typename _RandomAccessIterator , typename _Compare > void sort_heap (_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
template<typename _RandomAccessIterator > void sort_heap (_RandomAccessIterator __first, _RandomAccessIterator __last)
template<typename _RAIter , typename _Compare > void sort_heap (_RAIter, _RAIter, _Compare)
template<typename _RAIter > void sort_heap (_RAIter, _RAIter)
sort: four overloads. sort_heap: four overloads. both strictly _RandomAccessIterator / _RAIter — no bidirectional peasants here, it's random access or nothing 🔥 and the two _Compare versions take _Compare __comp, the two without just take the range. skipws is up top doing its ios_base & thing and honestly? good for her. 🦋
💜 sqrt, stable_partition, and a cliffhanger
template<typename _Tp > _Expr< _UnClos< __sqrt, _ValArray, _Tp >, _Tp > sqrt (const valarray< _Tp > &__v)
template<class _Dom > _Expr< _UnClos< __sqrt, _Expr, _Dom >, typename _Dom::value_type > sqrt (const _Expr< _Dom, typename _Dom::value_type > &__e)
template<typename _Tp > __gnu_cxx::__enable_if< __is_integer< _Tp >::__value, double >::__type sqrt (_Tp __x)
long double sqrt (long double __x)
float sqrt (float __x)
template<typename _Tp > complex< _Tp > sqrt (const complex< _Tp > &)
template<typename _ForwardIterator , typename _Predicate > _ForwardIterator stable_partition (_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
template<typename _BIter , typename _Predicate > _BIter stable_partition (_BIter, _BIter, _Predicate)
template<typename _RandomAccessIterator , typename _Compare > void
sqrt is a perfect sixth-copy of the sin/sinh pattern — valarray one, _Expr one, __gnu_cxx::__enable_if one returning double, long double, float, complex< _Tp >. same six, new name, __sqrt instead of __sin. slay but also make it make sense 😭
stable_partition gives you the named pair (__first, __last, __pred) and the unnamed pair (_BIter, _BIter, _Predicate).
and then—
template<typename _RandomAccessIterator , typename _Compare > void
—that's it. that's where this part ends. mid-declaration. no function name. no params. just void and vibes 💀 not me hitting the next part with no closure whatsoever, bestie.
okay bestie we're still in the synopsis and it is a lot — like the compiler just kept saying "and another one" 💀 but honestly? slay, we love a thorough header. finishing the stable_sort family and then the string girls:
stable_sort (_RandomAccessIterator __first, _RandomAccessIterator
__last, _Compare __comp)
template<typename _RandomAccessIterator > void stable_sort
(_RandomAccessIterator __first, _RandomAccessIterator __last)
template<typename _RAIter , typename _Compare > void stable_sort
(_RAIter, _RAIter, _Compare)
template<typename _RAIter > void stable_sort (_RAIter, _RAIter)
char * strchr (char *__s1, int __n)
char * strpbrk (char *__s1, const char *__s2)
char * strrchr (char *__s1, int __n)
char * strstr (char *__s1, const char *__s2)
fr fr the string ones are the classics and then it's swap time, and the swap section is the main character of this synopsis. ✨
starting with smart pointers and the two most iconic containers:
template<typename _Tp , typename _Tp_Deleter > void swap (unique_ptr<
_Tp, _Tp_Deleter > &__x, unique_ptr< _Tp, _Tp_Deleter > &&__y)
template<typename _Tp , typename _Tp_Deleter > void swap (unique_ptr<
_Tp, _Tp_Deleter > &&__x, unique_ptr< _Tp, _Tp_Deleter > &__y)
template<typename _Tp , typename _Tp_Deleter > void swap (unique_ptr<
_Tp, _Tp_Deleter > &__x, unique_ptr< _Tp, _Tp_Deleter > &__y)
template<typename _Tp , typename _Alloc > void swap (vector< _Tp, _Alloc
> &__x, vector< _Tp, _Alloc > &&__y)
template<typename _Tp , typename _Alloc > void swap (vector< _Tp, _Alloc
> &&__x, vector< _Tp, _Alloc > &__y)
template<typename _Tp , typename _Alloc > void swap (vector< _Tp, _Alloc
> &__x, vector< _Tp, _Alloc > &__y)
see the pattern? & + &&, && + &, & + & — every container gets the trio. it's giving copy-paste but make it ⌜template⌟ 💅
then the red-black tree internal flex, and the container adaptors living their truth:
template<typename _Key , typename _Val , typename _KeyOfValue , typename
_Compare , typename _Alloc > void swap (_Rb_tree< _Key, _Val,
_KeyOfValue, _Compare, _Alloc > &__x, _Rb_tree< _Key, _Val,
_KeyOfValue, _Compare, _Alloc > &__y)
template<typename _Tp , typename _Seq > void swap (stack< _Tp, _Seq >
&__x, stack< _Tp, _Seq > &&__y)
template<typename _Tp , typename _Seq > void swap (stack< _Tp, _Seq >
&&__x, stack< _Tp, _Seq > &__y)
template<typename _Tp , typename _Seq > void swap (stack< _Tp, _Seq >
&__x, stack< _Tp, _Seq > &__y)
template<typename _Key , typename _Compare , typename _Alloc > void swap
(set< _Key, _Compare, _Alloc > &__x, set< _Key, _Compare, _Alloc >
&&__y)
template<typename _Key , typename _Compare , typename _Alloc > void swap
(set< _Key, _Compare, _Alloc > &&__x, set< _Key, _Compare, _Alloc >
&__y)
template<typename _Key , typename _Compare , typename _Alloc > void swap
(set< _Key, _Compare, _Alloc > &__x, set< _Key, _Compare, _Alloc >
&__y)
template<typename _Tp , typename _Sequence , typename _Compare > void
swap (priority_queue< _Tp, _Sequence, _Compare > &__x,
priority_queue< _Tp, _Sequence, _Compare > &&__y)
template<typename _Tp , typename _Sequence , typename _Compare > void
swap (priority_queue< _Tp, _Sequence, _Compare > &&__x,
priority_queue< _Tp, _Sequence, _Compare > &__y)
template<typename _Tp , typename _Sequence , typename _Compare > void
swap (priority_queue< _Tp, _Sequence, _Compare > &__x,
priority_queue< _Tp, _Sequence, _Compare > &__y)
template<typename _Tp , typename _Seq > void swap (queue< _Tp, _Seq >
&__x, queue< _Tp, _Seq > &&__y)
template<typename _Tp , typename _Seq > void swap (queue< _Tp, _Seq >
&&__x, queue< _Tp, _Seq > &__y)
template<typename _Tp , typename _Seq > void swap (queue< _Tp, _Seq >
&__x, queue< _Tp, _Seq > &__y)
template<class _T1 , class _T2 > void swap (pair< _T1, _T2 > &__x, pair<
_T1, _T2 > &&__y)
template<class _T1 , class _T2 > void swap (pair< _T1, _T2 > &&__x,
pair< _T1, _T2 > &__y)
template<class _T1 , class _T2 > void swap (pair< _T1, _T2 > &__x, pair<
_T1, _T2 > &__y)
note how pair uses class instead of typename? bestie they're the same thing here, the header's just being ✨quirky✨ — but copy it exactly, don't @ me 🙈
the multi-girlies and the map girls, then the sequential besties:
template<typename _Key , typename _Compare , typename _Alloc > void swap
(multiset< _Key, _Compare, _Alloc > &__x, multiset< _Key, _Compare,
_Alloc > &&__y)
template<typename _Key , typename _Compare , typename _Alloc > void swap
(multiset< _Key, _Compare, _Alloc > &&__x, multiset< _Key, _Compare,
_Alloc > &__y)
template<typename _Key , typename _Compare , typename _Alloc > void swap
(multiset< _Key, _Compare, _Alloc > &__x, multiset< _Key, _Compare,
_Alloc > &__y)
template<typename _Key , typename _Tp , typename _Compare , typename
_Alloc > void swap (multimap< _Key, _Tp, _Compare, _Alloc > &__x,
multimap< _Key, _Tp, _Compare, _Alloc > &&__y)
template<typename _Key , typename _Tp , typename _Compare , typename
_Alloc > void swap (multimap< _Key, _Tp, _Compare, _Alloc > &&__x,
multimap< _Key, _Tp, _Compare, _Alloc > &__y)
template<typename _Key , typename _Tp , typename _Compare , typename
_Alloc > void swap (multimap< _Key, _Tp, _Compare, _Alloc > &__x,
multimap< _Key, _Tp, _Compare, _Alloc > &__y)
template<typename _Key , typename _Tp , typename _Compare , typename
_Alloc > void swap (map< _Key, _Tp, _Compare, _Alloc > &__x, map<
_Key, _Tp, _Compare, _Alloc > &&__y)
template<typename _Key , typename _Tp , typename _Compare , typename
_Alloc > void swap (map< _Key, _Tp, _Compare, _Alloc > &&__x, map<
_Key, _Tp, _Compare, _Alloc > &__y)
template<typename _Key , typename _Tp , typename _Compare , typename
_Alloc > void swap (map< _Key, _Tp, _Compare, _Alloc > &__x, map<
_Key, _Tp, _Compare, _Alloc > &__y)
template<typename _Tp , typename _Alloc > void swap (list< _Tp, _Alloc >
&__x, list< _Tp, _Alloc > &&__y)
template<typename _Tp , typename _Alloc > void swap (list< _Tp, _Alloc >
&&__x, list< _Tp, _Alloc > &__y)
template<typename _Tp , typename _Alloc > void swap (list< _Tp, _Alloc >
&__x, list< _Tp, _Alloc > &__y)
template<typename _Tp , typename _Alloc > void swap (deque< _Tp, _Alloc
> &__x, deque< _Tp, _Alloc > &&__y)
template<typename _Tp , typename _Alloc > void swap (deque< _Tp, _Alloc
> &&__x, deque< _Tp, _Alloc > &__y)
template<typename _Tp , typename _Alloc > void swap (deque< _Tp, _Alloc
> &__x, deque< _Tp, _Alloc > &__y)
template<typename _Tp , typename _Alloc > void swap (forward_list< _Tp,
_Alloc > &__lx, forward_list< _Tp, _Alloc > &&__ly)
template<typename _Tp , typename _Alloc > void swap (forward_list< _Tp,
_Alloc > &&__lx, forward_list< _Tp, _Alloc > &__ly)
template<typename _Tp , typename _Alloc > void swap (forward_list< _Tp,
_Alloc > &__lx, forward_list< _Tp, _Alloc > &__ly)
okay important detail 👀 forward_list uses __lx and __ly instead of __x and __y — no cap, that's literally in there, don't "fix" it, just type it.
and here's the strings + arrays + the humble universal one:
template<typename _CharT , typename _Traits , typename _Alloc > void
swap (basic_string< _CharT, _Traits, _Alloc > &__lhs, basic_string<
_CharT, _Traits, _Alloc > &__rhs)
template<typename _Tp , size_t _Nm> void swap (_Tp(&)[_Nm], _Tp(&)[_Nm])
template<typename _Tp > void swap (_Tp &__a, _Tp &__b)
that last one? the plain swap, no frills, _Tp &__a, _Tp &__b — she's the blueprint, the moment, the icon 👑
now the unordered era (hash girlies rise):
template<class _Value , class _Hash , class _Pred , class _Alloc > void
swap (unordered_multiset< _Value, _Hash, _Pred, _Alloc > &__x,
unordered_multiset< _Value, _Hash, _Pred, _Alloc > &&__y)
template<class _Value , class _Hash , class _Pred , class _Alloc > void
swap (unordered_multiset< _Value, _Hash, _Pred, _Alloc > &&__x,
unordered_multiset< _Value, _Hash, _Pred, _Alloc > &__y)
template<class _Value , class _Hash , class _Pred , class _Alloc > void
swap (unordered_set< _Value, _Hash, _Pred, _Alloc > &__x,
unordered_set< _Value, _Hash, _Pred, _Alloc > &&__y)
template<class _Value , class _Hash , class _Pred , class _Alloc > void
swap (unordered_set< _Value, _Hash, _Pred, _Alloc > &&__x,
unordered_set< _Value, _Hash, _Pred, _Alloc > &__y)
template<class _Value , class _Hash , class _Pred , class _Alloc > void
swap (unordered_multiset< _Value, _Hash, _Pred, _Alloc > &__x,
unordered_multiset< _Value, _Hash, _Pred, _Alloc > &__y)
template<class _Value , class _Hash , class _Pred , class _Alloc > void
swap (unordered_set< _Value, _Hash, _Pred, _Alloc > &__x,
unordered_set< _Value, _Hash, _Pred, _Alloc > &__y)
and the double-underscore internals — these are implementation-flavoured, they've got that extra bool __cache_hash_code at the end:
template<class _Value , class _Hash , class _Pred , class _Alloc , bool
__cache_hash_code> void swap (__unordered_multiset< _Value, _Hash,
_Pred, _Alloc, __cache_hash_code > &__x, __unordered_multiset<
_Value, _Hash, _Pred, _Alloc, __cache_hash_code > &__y)
template<class _Value , class _Hash , class _Pred , class _Alloc , bool
__cache_hash_code> void swap (__unordered_set< _Value, _Hash, _Pred,
_Alloc, __cache_hash_code > &__x, __unordered_set< _Value, _Hash,
_Pred, _Alloc, __cache_hash_code > &__y)
maps now, hash edition 💅
template<class _Key , class _Tp , class _Hash , class _Pred , class
_Alloc > void swap (unordered_multimap< _Key, _Tp, _Hash, _Pred,
_Alloc > &__x, unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc >
&&__y)
template<class _Key , class _Tp , class _Hash , class _Pred , class
_Alloc > void swap (unordered_multimap< _Key, _Tp, _Hash, _Pred,
_Alloc > &&__x, unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc
> &__y)
template<class _Key , class _Tp , class _Hash , class _Pred , class
_Alloc > void swap (unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >
&__x, unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > &&__y)
template<class _Key , class _Tp , class _Hash , class _Pred , class
_Alloc > void swap (unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >
&&__x, unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > &__y)
template<class _Key , class _Tp , class _Hash , class _Pred , class
_Alloc > void swap (unordered_multimap< _Key, _Tp, _Hash, _Pred,
_Alloc > &__x, unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc >
&__y)
template<class _Key , class _Tp , class _Hash , class _Pred , class
_Alloc > void swap (unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >
&__x, unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > &__y)
template<class _Key , class _Tp , class _Hash , class _Pred , class
_Alloc , bool __cache_hash_code> void swap (__unordered_multimap<
_Key, _Tp, _Hash, _Pred, _Alloc, __cache_hash_code > &__x,
__unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc,
__cache_hash_code > &__y)
template<class _Key , class _Tp , class _Hash , class _Pred , class
_Alloc , bool __cache_hash_code> void swap (__unordered_map< _Key,
_Tp, _Hash, _Pred, _Alloc, __cache_hash_code > &__x,
__unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc, __cache_hash_code
> &__y)
and the finale of this little chunk — regex, function, array, tuple. baby the variadic is here 😭
template<typename _Bi_iter , typename _Allocator > void swap
(match_results< _Bi_iter, _Allocator > &__lhs, match_results<
_Bi_iter, _Allocator > &__rhs)
template<typename _Ch_type , typename _Rx_traits > void swap
(basic_regex< _Ch_type, _Rx_traits > &__lhs, basic_regex< _Ch_type,
_Rx_traits > &__rhs)
template<typename _Signature > void swap (function< _Signature > &__x,
function< _Signature > &__y)
template<typename _Tp , std::size_t _Nm> void swap (array< _Tp, _Nm >
&__one, array< _Tp, _Nm > &__two)
template<typename... _Elements> void swap (tuple< _Elements...> &__x,
tuple< _Elements...> &&__y)
template<typename... _Elements> void swap (tuple< _Elements...> &&__x,
yes bestie that last line just… ends there mid-signature 😭 that's not me being lazy, that's where the page cuts off — and the list keeps going, so stay tuned 🫶
ok so the swap girlies are still going, and honestly? they're thriving 💅
tuple< _Elements...> &__y)
template<typename... _Elements> void swap (tuple< _Elements...> &__x,
tuple< _Elements...> &__y)
void swap (thread &__x, thread &&__y)
void swap (thread &&__x, thread &__y)
void swap (thread &__x, thread &__y)
template<typename _Mutex > void swap (unique_lock< _Mutex > &__x,
unique_lock< _Mutex > &&__y)
template<typename _Mutex > void swap (unique_lock< _Mutex > &&__x,
unique_lock< _Mutex > &__y)
template<typename _Mutex > void swap (unique_lock< _Mutex > &__x,
unique_lock< _Mutex > &__y)
template<typename _ForwardIterator1 , typename _ForwardIterator2 >
_ForwardIterator2 swap_ranges (_ForwardIterator1 __first1,
_ForwardIterator1 __last1, _ForwardIterator2 __first2)
template<typename _FIter1 , typename _FIter2 > _FIter2 swap_ranges
(_FIter1, _FIter1, _FIter2)
const error_category & system_category ()
the way that swap has like nine overloads in this list alone 😭 tuple, thread, unique_lock — everybody getting their own little swap moment. main character energy for real. and then swap_ranges shows up with its own _FIter1/_FIter2 remix at the end, because of course it does ✨
next up: the trig-adjacent besties 🌸 and then terminate, whose only personality trait is __attribute__((__noreturn__)) 💀
template<typename _Tp > _Expr< _UnClos< __tan, _ValArray, _Tp >, _Tp >
tan (const valarray< _Tp > &__v)
template<class _Dom > _Expr< _UnClos< __tan, _Expr, _Dom >, typename
_Dom::value_type > tan (const _Expr< _Dom, typename _Dom::value_type
> &__e)
template<typename _Tp > __gnu_cxx::__enable_if< __is_integer< _Tp
>::__value, double >::__type tan (_Tp __x)
long double tan (long double __x)
float tan (float __x)
template<typename _Tp > complex< _Tp > tan (const complex< _Tp > &)
template<typename _Tp > _Expr< _UnClos< __tanh, _ValArray, _Tp >, _Tp >
tanh (const valarray< _Tp > &__v)
template<class _Dom > _Expr< _UnClos< __tanh, _Expr, _Dom >, typename
_Dom::value_type > tanh (const _Expr< _Dom, typename
_Dom::value_type > &__e)
template<typename _Tp > __gnu_cxx::__enable_if< __is_integer< _Tp
>::__value, double >::__type tanh (_Tp __x)
long double tanh (long double __x)
float tanh (float __x)
template<typename _Tp > complex< _Tp > tanh (const complex< _Tp > &)
void terminate () __attribute__((__noreturn__))
template<typename... _Elements> tuple< _Elements &...> tie (_Elements
&...__args)
tan and tanh are literally the same five-overload pattern twice in a row — valarray, _Expr, the __gnu_cxx::__enable_if gate, long double, float, complex. it's giving twin sisters matching outfits 🎀 and yes, tanh gets the exact same glow-up. periodt.
then terminate — no args, no chill, marked __noreturn__ — and tie just vibing there making a tuple< _Elements &...> out of _Elements &...__args 🫶
char-adjacent icons, plus the transform quadruplets (yes, four of them, iykyk):
template<typename _CharT > _CharT tolower (_CharT __c, const locale
&__loc)
template<typename _CharT > _CharT toupper (_CharT __c, const locale
&__loc)
template<typename _InputIterator1 , typename _InputIterator2 , typename
_OutputIterator , typename _BinaryOperation > _OutputIterator
transform (_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _OutputIterator __result, _BinaryOperation
__binary_op)
template<typename _InputIterator , typename _OutputIterator , typename
_UnaryOperation > _OutputIterator transform (_InputIterator __first,
_InputIterator __last, _OutputIterator __result, _UnaryOperation
__unary_op)
template<typename _IIter1 , typename _IIter2 , typename _OIter ,
typename _BinaryOperation > _OIter transform (_IIter1, _IIter1,
_IIter2, _OIter, _BinaryOperation)
template<typename _IIter , typename _OIter , typename _UnaryOperation >
_OIter transform (_IIter, _IIter, _OIter, _UnaryOperation)
template<typename _Lock1 , typename _Lock2 , typename... _Lock3> int
try_lock (_Lock1 &__l1, _Lock2 &__l2, _Lock3 &...__l3)
the transform duplication arc is sending me 😭 you get the long-name version and the short-name version (_IIter/_OIter) — binary op edition and unary op edition — so that's four. four!! no cap, four whole declarations. and try_lock is out here taking _Lock1 &__l1, _Lock2 &__l2 and then a whole _Lock3 &...__l3 pack like it's collecting infinity stones 💀
tuple_cat said four overloads or nothing 🦋 and then the memory/uninitialized crew rolled in:
template<typename... _TElements, typename... _UElements> tuple<
_TElements..., _UElements...> tuple_cat (tuple< _TElements...>
&&__t, tuple< _UElements...> &&__u)
template<typename... _TElements, typename... _UElements> tuple<
_TElements..., _UElements...> tuple_cat (const tuple< _TElements...>
&__t, tuple< _UElements...> &&__u)
template<typename... _TElements, typename... _UElements> tuple<
_TElements..., _UElements...> tuple_cat (tuple< _TElements...>
&&__t, const tuple< _UElements...> &__u)
template<typename... _TElements, typename... _UElements> tuple<
_TElements..., _UElements...> tuple_cat (const tuple< _TElements...>
&__t, const tuple< _UElements...> &__u)
bool uncaught_exception () throw ()
void unexpected () __attribute__((__noreturn__))
template<typename _InputIterator , typename _ForwardIterator >
_ForwardIterator uninitialized_copy (_InputIterator __first,
_InputIterator __last, _ForwardIterator __result)
template<typename _InputIterator , typename _Size , typename
_ForwardIterator > _ForwardIterator uninitialized_copy_n
(_InputIterator __first, _Size __n, _ForwardIterator __result)
template<typename _ForwardIterator , typename _Tp > void
uninitialized_fill (_ForwardIterator __first, _ForwardIterator
__last, const _Tp &__x)
template<typename _ForwardIterator , typename _Size , typename _Tp >
void uninitialized_fill_n (_ForwardIterator __first, _Size __n,
const _Tp &__x)
the tuple_cat four-way is so satisfying honestly — &&/&&, const&/&&, &&/const&, const&/const&. every combination, covered, iconic ✨ and note the return type always be like tuple< _TElements..., _UElements...> — concatenation behaviour, slay 💅
also uncaught_exception() is still rocking a throw () like it's 2003 and I respect the vintage 😌 while unexpected() gets the __attribute__((__noreturn__)) treatment. and then uninitialized_copy, uninitialized_copy_n, uninitialized_fill, uninitialized_fill_n — the whole uninitialized fam, together, in order, beautiful 🎀
unique & unique_copy, the double-feature 🍓:
template<typename _ForwardIterator , typename _BinaryPredicate >
_ForwardIterator unique (_ForwardIterator __first, _ForwardIterator
__last, _BinaryPredicate __binary_pred)
template<typename _ForwardIterator > _ForwardIterator unique
(_ForwardIterator __first, _ForwardIterator __last)
template<typename _FIter , typename _BinaryPredicate > _FIter unique
(_FIter, _FIter, _BinaryPredicate)
template<typename _FIter > _FIter unique (_FIter, _FIter)
template<typename _InputIterator , typename _OutputIterator , typename
_BinaryPredicate > _OutputIterator unique_copy (_InputIterator
__first, _InputIterator __last, _OutputIterator __result,
_BinaryPredicate __binary_pred)
template<typename _InputIterator , typename _OutputIterator >
_OutputIterator unique_copy (_InputIterator __first, _InputIterator
__last, _OutputIterator __result)
template<typename _IIter , typename _OIter , typename _BinaryPredicate >
_OIter unique_copy (_IIter, _IIter, _OIter, _BinaryPredicate)
template<typename _IIter , typename _OIter > _OIter unique_copy (_IIter,
_IIter, _OIter)
ok so the pattern is: long-name version, short-name version, with-predicate version, without-predicate version — and both unique and unique_copy get the full set of four. consistency ate, fr fr 👑
then some ios_base manipulator-core, plus upper_bound x4 and friends:
ios_base & unitbuf (ios_base &__base)
template<typename _ForwardIterator , typename _Tp , typename _Compare >
_ForwardIterator upper_bound (_ForwardIterator __first,
_ForwardIterator __last, const _Tp &__val, _Compare __comp)
template<typename _ForwardIterator , typename _Tp > _ForwardIterator
upper_bound (_ForwardIterator __first, _ForwardIterator __last,
const _Tp &__val)
template<typename _FIter , typename _Tp , typename _Compare > _FIter
upper_bound (_FIter, _FIter, const _Tp &, _Compare)
template<typename _FIter , typename _Tp > _FIter upper_bound (_FIter,
_FIter, const _Tp &)
ios_base & uppercase (ios_base &__base)
template<typename _Facet > const _Facet & use_facet (const locale
&__loc)
wchar_t * wcschr (wchar_t *__p, wchar_t __c)
wchar_t * wcspbrk (wchar_t *__s1, const wchar_t *__s2)
wchar_t * wcsrchr (wchar_t *__p, wchar_t __c)
wchar_t * wcsstr (wchar_t *__s1, const wchar_t *__s2)
wchar_t * wmemchr (wchar_t *__p, wchar_t __c, size_t __n)
template<typename _CharT , typename _Traits > basic_istream< _CharT,
_Traits > & ws (basic_istream< _CharT, _Traits > &__is)
unitbuf and uppercase both take ios_base &__base and hand it right back — same energy, matching little ios_base & bookends 🎀 and upper_bound is out here with its own four-overload set too, because everybody in this synopsis has a squad 😭
then the wide-char girlies: wcschr, wcspbrk, wcsrchr, wcsstr (all returning wchar_t *, all with __p or __s1/__s2), plus wmemchr who brought a size_t __n to the party 🦋 and ws closing it out with the whole basic_istream< _CharT, _Traits > template situation. chef's kiss ✨
and now bestie… the indented section 👀 this one's visually set apart in the original, so I'm keeping it set apart. reverse_iterator squad first:
template<typename _IteratorL , typename _IteratorR > bool operator!=
(const reverse_iterator< _IteratorL > &__x, const
reverse_iterator< _IteratorR > &__y)
template<typename _Iterator > bool operator!= (const
reverse_iterator< _Iterator > &__x, const reverse_iterator<
_Iterator > &__y)
template<typename _Iterator > reverse_iterator< _Iterator >
operator+ (typename reverse_iterator< _Iterator
>::difference_type __n, const reverse_iterator< _Iterator >
&__x)
template<typename _IteratorL , typename _IteratorR > auto operator-
(const reverse_iterator< _IteratorL > &__x, const
reverse_iterator< _IteratorR > &__y)->
decltype(__y.base()-__x.base())
template<typename _Iterator > reverse_iterator< _Iterator
>::difference_type operator- (const reverse_iterator< _Iterator
> &__x, const reverse_iterator< _Iterator > &__y)
template<typename _IteratorL , typename _IteratorR > bool operator<
(const reverse_iterator< _IteratorL > &__x, const
reverse_iterator< _IteratorR > &__y)
template<typename _Iterator > bool operator< (const
reverse_iterator< _Iterator > &__x, const reverse_iterator<
_Iterator > &__y)
template<typename _IteratorL , typename _IteratorR > bool operator<=
(const reverse_iterator< _IteratorL > &__x, const
reverse_iterator< _IteratorR > &__y)
template<typename _Iterator > bool operator<= (const
reverse_iterator< _Iterator > &__x, const reverse_iterator<
_Iterator > &__y)
template<typename _IteratorL , typename _IteratorR > bool operator==
(const reverse_iterator< _IteratorL > &__x, const
reverse_iterator< _IteratorR > &__y)
template<typename _Iterator > bool operator== (const
reverse_iterator< _Iterator > &__x, const reverse_iterator<
_Iterator > &__y)
template<typename _IteratorL , typename _IteratorR > bool operator>
(const reverse_iterator< _IteratorL > &__x, const
reverse_iterator< _IteratorR > &__y)
template<typename _Iterator > bool operator> (const
reverse_iterator< _Iterator > &__x, const reverse_iterator<
_Iterator > &__y)
template<typename _IteratorL , typename _IteratorR > bool operator>=
(const reverse_iterator< _IteratorL > &__x, const
reverse_iterator< _IteratorR > &__y)
template<typename _Iterator > bool operator>= (const
reverse_iterator< _Iterator > &__x, const reverse_iterator<
_Iterator > &__y)
THE WAY THERE ARE SIXTEEN OF THESE 💀 ok let me breathe. so it's !=, +, -, <, <=, ==, >, >= — and for every single one you get the mixed-type version (_IteratorL + _IteratorR) and the same-type version (_Iterator + _Iterator). sixteen declarations. sixteen!! that's not a vibe check, that's a vibe audit 😭
special shoutouts 🫶:
operator+is the only one hanging out intypename reverse_iterator< _Iterator >::difference_type __nfirst position, then the iterator — icon behaviouroperator-(the mixed one) is the only one with a trailing-> decltype(__y.base()-__x.base())and it's giving auto-return-type main character ✨operator-(the same-type one) returnsreverse_iterator< _Iterator >::difference_typeinstead — ngl that contrast is chef's kiss 🎀
deep breath. complex girlies 🦋:
template<typename _Tp > bool operator!= (const _Tp &__x, const
complex< _Tp > &__y)
template<typename _Tp > bool operator!= (const complex< _Tp > &__x,
const _Tp &__y)
template<typename _Tp > bool operator!= (const complex< _Tp > &__x,
const complex< _Tp > &__y)
three flavours of operator!= — scalar-complex, complex-scalar, complex-complex — in that exact order, no notes 💅
and the bitset bitwise trio 🔥:
template<size_t _Nb> bitset< _Nb > operator& (const bitset< _Nb >
&__x, const bitset< _Nb > &__y)
template<size_t _Nb> bitset< _Nb > operator^ (const bitset< _Nb >
&__x, const bitset< _Nb > &__y)
template<size_t _Nb> bitset< _Nb > operator| (const bitset< _Nb >
&__x, const bitset< _Nb > &__y)
ok so &, ^, | — all template<size_t _Nb>, all returning bitset< _Nb >, all taking two const bitset< _Nb > &. it's giving perfectly aligned girl group formation 👑 and they're written in & → ^ → | order, so don't go "fixing" that ordering bestie 🙈
and we close this stretch with three operator* overloads for complex ⭐:
template<typename _Tp > complex< _Tp > operator* (const _Tp &__x,
const complex< _Tp > &__y)
template<typename _Tp > complex< _Tp > operator* (const complex< _Tp
> &__x, const _Tp &__y)
template<typename _Tp > complex< _Tp > operator* (const complex< _Tp
> &__x, const complex< _Tp > &__y)
scalar × complex, complex × scalar, complex × complex — all returning complex< _Tp >, all template<typename _Tp>, all accounted for 😌 the symmetry is immaculate and honestly this is a great place to pause before the next batch rolls in 💖
okay bestie we're deep in the operator pit now and honestly? the complex-number girlies are thriving 💅
template<typename _Tp > complex< _Tp > operator+ (const _Tp &__x,
const complex< _Tp > &__y)
template<typename _Tp > complex< _Tp > operator+ (const complex< _Tp
> &__x, const _Tp &__y)
template<typename _Tp > complex< _Tp > operator+ (const complex< _Tp
> &__x, const complex< _Tp > &__y)
plus. adding. slay. mixing a scalar _Tp with a complex< _Tp > either direction, or two complexes together 🫶
template<typename _Tp > complex< _Tp > operator- (const _Tp &__x,
const complex< _Tp > &__y)
template<typename _Tp > complex< _Tp > operator- (const complex< _Tp
> &__x, const _Tp &__y)
template<typename _Tp > complex< _Tp > operator- (const complex< _Tp
> &__x, const complex< _Tp > &__y)
same energy, but minus. subtraction really said "let me also cover scalar-minus-complex, complex-minus-scalar, and complex-minus-complex" and we love the thoroughness 🔥
template<typename _Tp > complex< _Tp > operator/ (const _Tp &__x,
const complex< _Tp > &__y)
template<typename _Tp > complex< _Tp > operator/ (const complex< _Tp
> &__x, const _Tp &__y)
template<typename _Tp > complex< _Tp > operator/ (const complex< _Tp
> &__x, const complex< _Tp > &__y)
division, all three combos, no notes. iconic behavior honestly 🎀
now the output stream glow-up section 📤
template<class _Traits > basic_ostream< char, _Traits > & operator<<
(basic_ostream< char, _Traits > &__out, const unsigned char
*__s)
template<class _Traits > basic_ostream< char, _Traits > & operator<<
(basic_ostream< char, _Traits > &__out, const signed char *__s)
template<class _Traits > basic_ostream< char, _Traits > & operator<<
(basic_ostream< char, _Traits > &__out, const char *__s)
template<typename _CharT , typename _Traits > basic_ostream< _CharT,
_Traits > & operator<< (basic_ostream< _CharT, _Traits > &__out,
const char *__s)
template<typename _CharT , typename _Traits > basic_ostream< _CharT,
_Traits > & operator<< (basic_ostream< _CharT, _Traits > &__out,
const _CharT *__s)
five overloads just for shoving strings at a stream 😭 unsigned char *, signed char *, char *, plus the _CharT-flavored versions and one where _CharT meets a const char *. the way they covered every pointer flavor… thorough queen behavior 👑
template<class _Traits > basic_ostream< char, _Traits > & operator<<
(basic_ostream< char, _Traits > &__out, unsigned char __c)
template<class _Traits > basic_ostream< char, _Traits > & operator<<
(basic_ostream< char, _Traits > &__out, signed char __c)
template<class _Traits > basic_ostream< char, _Traits > & operator<<
(basic_ostream< char, _Traits > &__out, char __c)
template<typename _CharT , typename _Traits > basic_ostream< _CharT,
_Traits > & operator<< (basic_ostream< _CharT, _Traits > &__out,
char __c)
template<typename _CharT , typename _Traits > basic_ostream< _CharT,
_Traits > & operator<< (basic_ostream< _CharT, _Traits > &__out,
_CharT __c)
and for single characters! unsigned char, signed char, char, then the _CharT ones. one character. five doors. we stan a maximalist ✨
template<class _CharT , class _Traits , size_t _Nb>
std::basic_ostream< _CharT, _Traits > & operator<<
(std::basic_ostream< _CharT, _Traits > &__os, const bitset< _Nb
> &__x)
template<class _CharT , class _Traits , size_t _Nb>
std::basic_istream< _CharT, _Traits > & operator>>
(std::basic_istream< _CharT, _Traits > &__is, bitset< _Nb >
&__x)
bitset gets both directions too — operator<< writes out to a std::basic_ostream< _CharT, _Traits > and operator>> reads in from a std::basic_istream< _CharT, _Traits >, for a bitset< _Nb > 🦋
template<typename _Tp > bool operator== (const _Tp &__x, const
complex< _Tp > &__y)
template<typename _Tp > bool operator== (const complex< _Tp > &__x,
const _Tp &__y)
template<typename _Tp > bool operator== (const complex< _Tp > &__x,
const complex< _Tp > &__y)
equality for complex, returns bool, all three scalar/complex pairings. comparing my brain to a complex number rn ngl 💀
template<class _Traits > basic_istream< char, _Traits > & operator>>
(basic_istream< char, _Traits > &__in, signed char *__s)
template<class _Traits > basic_istream< char, _Traits > & operator>>
(basic_istream< char, _Traits > &__in, unsigned char *__s)
template<> basic_istream< char > & operator>> (basic_istream< char >
&__in, char *__s)
template<typename _CharT , typename _Traits > basic_istream< _CharT,
_Traits > & operator>> (basic_istream< _CharT, _Traits > &__in,
_CharT *__s)
input side of strings — signed char *, unsigned char *, a full specialization template<> basic_istream< char > & operator>> (basic_istream< char > &__in, char *__s), and the generic _CharT * one. note the specialization is doing main character energy there 👀
template<class _Traits > basic_istream< char, _Traits > & operator>>
(basic_istream< char, _Traits > &__in, signed char &__c)
template<class _Traits > basic_istream< char, _Traits > & operator>>
(basic_istream< char, _Traits > &__in, unsigned char &__c)
template<typename _CharT , typename _Traits > basic_istream< _CharT,
_Traits > & operator>> (basic_istream< _CharT, _Traits > &__in,
_CharT &__c)
and single characters into a reference: signed char &__c, unsigned char &__c, _CharT &__c. bestie really said "every char type gets to be read" 🍓
✨ Matching, Searching, and Replacing ✨
the regex era 🧚 this is where the string girlies pop off.
template<typename _Ch_traits , typename _Str_allocator , typename
_Ch_type , typename _Rx_traits > bool regex_match (const
basic_string< _Ch_type, _Ch_traits, _Str_allocator > &__s, const
basic_regex< _Ch_type, _Rx_traits > &__re,
regex_constants::match_flag_type
__flags=regex_constants::match_default)
template<typename _Ch_type , class _Rx_traits > bool regex_match
(const _Ch_type *__s, const basic_regex< _Ch_type, _Rx_traits >
&__re, regex_constants::match_flag_type
__f=regex_constants::match_default)
template<typename _Ch_traits , typename _Ch_alloc , typename
_Allocator , typename _Ch_type , typename _Rx_traits > bool
regex_match (const basic_string< _Ch_type, _Ch_traits, _Ch_alloc
> &__s, match_results< typename basic_string< _Ch_type,
_Ch_traits, _Ch_alloc >::const_iterator, _Allocator > &__m,
const basic_regex< _Ch_type, _Rx_traits > &__re,
regex_constants::match_flag_type
__flags=regex_constants::match_default)
template<typename _Ch_type , typename _Allocator , typename
_Rx_traits > bool regex_match (const _Ch_type *__s,
match_results< const _Ch_type *, _Allocator > &__m, const
basic_regex< _Ch_type, _Rx_traits > &__re,
regex_constants::match_flag_type
__f=regex_constants::match_default)
template<typename _Bi_iter , typename _Ch_type , typename _Rx_traits
> bool regex_match (_Bi_iter __first, _Bi_iter __last, const
basic_regex< _Ch_type, _Rx_traits > &__re,
regex_constants::match_flag_type
__flags=regex_constants::match_default)
template<typename _Bi_iter , typename _Allocator , typename _Ch_type
, typename _Rx_traits > bool regex_match (_Bi_iter __first,
_Bi_iter __last, match_results< _Bi_iter, _Allocator > &__m,
const basic_regex< _Ch_type, _Rx_traits > &__re,
regex_constants::match_flag_type
__flags=regex_constants::match_default)
six flavors of regex_match 🎀 string or _Ch_type * or an iterator pair _Bi_iter __first, _Bi_iter __last, and each either with or without a match_results<...> &__m to catch the groups. every single one defaults to regex_constants::match_default (some name it __flags, some __f, we don't judge).
template<typename _Rx_traits , typename _Ch_type > basic_string<
_Ch_type > regex_replace (const basic_string< _Ch_type > &__s,
const basic_regex< _Ch_type, _Rx_traits > &__e, const
basic_string< _Ch_type > &__fmt,
regex_constants::match_flag_type
__flags=regex_constants::match_default)
template<typename _Out_iter , typename _Bi_iter , typename
_Rx_traits , typename _Ch_type > _Out_iter regex_replace
(_Out_iter __out, _Bi_iter __first, _Bi_iter __last, const
basic_regex< _Ch_type, _Rx_traits > &__e, const basic_string<
_Ch_type > &__fmt, regex_constants::match_flag_type
__flags=regex_constants::match_default)
regex_replace has exactly two forms 💖 the one that takes a string &__s, a regex &__e, and a format string &__fmt and hands you back a basic_string< _Ch_type >; and the iterator one that writes into _Out_iter __out from _Bi_iter __first, _Bi_iter __last and returns that _Out_iter. both default to regex_constants::match_default.
template<typename _Ch_traits , typename _Ch_alloc , typename
_Allocator , typename _Ch_type , typename _Rx_traits > bool
regex_search (const basic_string< _Ch_type, _Ch_traits,
_Ch_alloc > &__s, match_results< typename basic_string<
_Ch_type, _Ch_traits, _Ch_alloc >::const_iterator, _Allocator >
&__m, const basic_regex< _Ch_type, _Rx_traits > &__e,
regex_constants::match_flag_type
__f=regex_constants::match_default)
template<typename _Ch_traits , typename _String_allocator , typename
_Ch_type , typename _Rx_traits > bool regex_search (const
basic_string< _Ch_type, _Ch_traits, _String_allocator > &__s,
const basic_regex< _Ch_type, _Rx_traits > &__e,
regex_constants::match_flag_type
__flags=regex_constants::match_default)
template<typename _Ch_type , typename _Rx_traits > bool regex_search
(const _Ch_type *__s, const basic_regex< _Ch_type, _Rx_traits >
&__e, regex_constants::match_flag_type
__f=regex_constants::match_default)
template<typename _Ch_type , class _Allocator , class _Rx_traits >
bool regex_search (const _Ch_type *__s, match_results< const
_Ch_type *, _Allocator > &__m, const basic_regex< _Ch_type,
_Rx_traits > &__e, regex_constants::match_flag_type
__f=regex_constants::match_default)
template<typename _Bi_iter , typename _Ch_type , typename _Rx_traits
> bool regex_search (_Bi_iter __first, _Bi_iter __last, const
basic_regex< _Ch_type, _Rx_traits > &__re,
regex_constants::match_flag_type
__flags=regex_constants::match_default)
template<typename _Bi_iter , typename _Allocator , typename _Ch_type
, typename _Rx_traits > bool regex_search (_Bi_iter __first,
_Bi_iter __last, match_results< _Bi_iter, _Allocator > &__m,
const basic_regex< _Ch_type, _Rx_traits > &__re,
regex_constants::match_flag_type
__flags=regex_constants::match_default)
and regex_search matches regex_match's whole lineup — six of them, string / pointer / iterator-pair, with and without match_results out-params, all defaulting to regex_constants::match_default. searching for the difference between regex_match and regex_search? that's above my pay grade in this part bestie, they're just both here being iconic 💅
🌈 Variables 🌈
static ios_base::Init __ioinit
function< void()> __once_functor
struct std::auto_ptr_ref _GLIBCXX_DEPRECATED_ATTR
const adopt_lock_t adopt_lock
const defer_lock_t defer_lock
const nothrow_t nothrow
const try_to_lock_t try_to_lock
seven variables, zero chill:
static ios_base::Init __ioinit— the static init object doing stream setup dutyfunction< void()> __once_functor— afunction< void()>, as one doesstruct std::auto_ptr_ref _GLIBCXX_DEPRECATED_ATTR— ⚠️ bestie this one is deprecated, the_GLIBCXX_DEPRECATED_ATTRis literally right there in the name, do not build a whole personality onauto_ptr🙈const adopt_lock_t adopt_lock— aconst adopt_lock_ttagconst defer_lock_t defer_lock— aconst defer_lock_ttagconst nothrow_t nothrow— theconst nothrow_ttagconst try_to_lock_t try_to_lock— aconst try_to_lock_ttag
lock tags and nothrow tags all just vibing as const objects 👑
💜 Standard Stream Objects 💜
The <iostream> header declares the eight standard stream objects. For other declarations, see http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch24.html and the I/O forward declarations.
They are required by default to cooperate with the global C library's FILE streams, and to be available during program startup and termination. For more information, see the HOWTO linked to above.
ostream cerr
istream cin
ostream clog
ostream cout
wostream wcerr
wistream wcin
wostream wclog
wostream wcout
eight of them, four narrow and four wide 🫶 and yes, they have to play nice with C's FILE streams by default, and they've gotta exist during program startup and termination — that's the whole requirement, no cap.
✨ Detailed Description ✨
ISO C++ entities toplevel namespace is std.
that's it. that's the whole description. the toplevel namespace is std. ten words. ate and left no crumbs 🎀
💖 Typedef Documentation 💖
Okay so typedefs are just lil nicknames for types, and these are the ones living in std that you're gonna bump into. Slay.
🎀 std::new_handler
typedef void(* std::new_handler)()
Bestie, if you're writing your own error handler that new calls when it's spiraling, it has to be this exact type. That's the vibe check, no exceptions 💅
Definition at line 73 of file new.
🦋 std::streamoff
typedef long long std::streamoff
This is the type used by fpos, char_traits<char>, and char_traits<wchar_t> 🫶
Ngl, in clauses 21.1.3.1 and 27.4.1streamoffis described as an implementation defined type. And heads up: in versions of GCC up to and including GCC 3.3,streamoffwastypedef long. So yeah, it changed, iconic of it.
Definition at line 94 of file postypes.h.
🌸 std::streampos
typedef fpos<mbstate_t> std::streampos
File position for char streams. That's it, that's the whole thing ✨
Definition at line 228 of file postypes.h.
🧚 std::streamsize
typedef ptrdiff_t std::streamsize
Integral type for I/O operation counts and buffer sizes — literally the number-goes-here type for how much I/O you're doing 💜
Definition at line 98 of file postypes.h.
⭐ std::u16streampos
typedef fpos<mbstate_t> std::u16streampos
File position for char16_t streams 🎀
Definition at line 234 of file postypes.h.
🌈 std::u32streampos
typedef fpos<mbstate_t> std::u32streampos
File position for char32_t streams 🦋
Definition at line 236 of file postypes.h.
👑 std::wstreampos
typedef fpos<mbstate_t> std::wstreampos
File position for wchar_t streams. Yes it's the same shape as the others, it's a whole matching set, we stan a coordinated collection 💖
Definition at line 230 of file postypes.h.
✨ Enumeration Type Documentation ✨
anonymous enum
Okay this one is sending me:
Todo: Doc me! See doc/doxygen/TODO and http://gcc.gnu.org/ml/libstdc++/2002-02/msg00003.html for more. This controls some aspect of the sort routines.
"Some aspect of the sort routines" 😭 bestie the documentation said idk her. Also it's an anonymous enum so it's giving mystery main character energy.
Definition at line 2168 of file stl_algo.h.
🔥 std::float_denorm_style
enum std::float_denorm_style
Describes the denormalization for floating-point types 💅 These values represent the presence or absence of a variable number of exponent bits, and this type is used in the std::numeric_limits class.
Enumerators:
denorm_indeterminate— indeterminate at compile time whether denormalized values are allowed 🫥denorm_absent— the type does not allow denormalized values 🚫denorm_present— the type does allow denormalized values ✅
Definition at line 168 of file limits.
🎀 std::float_round_style
enum std::float_round_style
Describes the rounding style for floating-point types, and it's used in the std::numeric_limits class 🦋
Enumerators:
round_indeterminate— self-explanatory 😌round_toward_zero— self-explanatory 😌round_to_nearest— to the nearest representable value 🎯round_toward_infinity— self-explanatory 😌round_toward_neg_infinity— self-explanatory 😌
Definition at line 153 of file limits.
💜 Function Documentation 💜
std::__deque_buf_size
size_t std::__deque_buf_size (size_t __size) [inline]
This function controls the size of memory nodes 🧠✨
Parameters:
size— the size of an element.
Returns: the number (not byte size!) of elements per node. Read that again bestie, number, not bytes 💀
So the lore: this function started off as a compiler kludge from SGI, but it seems to be a useful wrapper around a repeated constant expression. The '512' is tunable (and no other code needs to change), but no investigation has been done since inheriting the SGI code 🙈
Definition at line 78 of file stl_deque.h.
Referenced by std::_Deque_base< _Tp, _Alloc >::_M_initialize_map().
std::__final_insertion_sort (with __comp)
template<typename _RandomAccessIterator , typename _Compare > void std::__final_insertion_sort (_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) [inline]
This is a helper function for the sort routine 🫶
Definition at line 2188 of file stl_algo.h.
References __insertion_sort(), and __unguarded_insertion_sort().
std::__final_insertion_sort (no __comp)
template<typename _RandomAccessIterator > void std::__final_insertion_sort (_RandomAccessIterator __first, _RandomAccessIterator __last) [inline]
Also a helper function for the sort routine ✨
Definition at line 2173 of file stl_algo.h.
References __insertion_sort(), and __unguarded_insertion_sort().
Referenced by sort().
std::__find (random access iterator case)
template<typename _RandomAccessIterator , typename _Tp > _RandomAccessIterator std::__find (_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp & __val, random_access_iterator_tag) [inline]
This is an overload used by find() for the RAI case 👑 (RAI = random access iterator, iykyk)
Definition at line 166 of file stl_algo.h.
std::__find (input iterator case)
template<typename _InputIterator , typename _Tp > _InputIterator std::__find (_InputIterator __first, _InputIterator __last, const _Tp & __val, input_iterator_tag) [inline]
This is an overload used by find() for the Input Iterator case 🦋
Definition at line 144 of file stl_algo.h.
Referenced by find().
std::__find_if (random access iterator case)
template<typename _RandomAccessIterator , typename _Predicate > _RandomAccessIterator std::__find_if (_RandomAccessIterator __first, _RandomAccessIterator __last, _Predicate __pred, random_access_iterator_tag) [inline]
This is an overload used by find_if() for the RAI case 💅
Definition at line 214 of file stl_algo.h.
References __find_if().
std::__find_if (input iterator case)
template<typename _InputIterator , typename _Predicate > _InputIterator std::__find_if (_InputIterator __first, _InputIterator __last, _Predicate __pred, input_iterator_tag) [inline]
This is an overload used by find_if() for the Input Iterator case 🌸
Definition at line 155 of file stl_algo.h.
References __find_if().
Referenced by __find_if(), and find_if().
std::__find_if_not (random access iterator case)
template<typename _RandomAccessIterator , typename _Predicate > _RandomAccessIterator std::__find_if_not (_RandomAccessIterator __first, _RandomAccessIterator __last, _Predicate __pred, random_access_iterator_tag) [inline]
This is an overload used by find_if_not() for the RAI case ✨
Definition at line 274 of file stl_algo.h.
std::__find_if_not (input iterator case)
template<typename _InputIterator , typename _Predicate > _InputIterator std::__find_if_not (_InputIterator __first, _InputIterator __last, _Predicate __pred, input_iterator_tag) [inline]
This is an overload used by find_if_not() for the Input Iterator case 🎀
Definition at line 263 of file stl_algo.h.
Referenced by find_if_not().
std::__gcd
template<typename _EuclideanRingElement > _EuclideanRingElement std::__gcd (_EuclideanRingElement __m, _EuclideanRingElement __n) [inline]
This is a helper function for the rotate algorithm, specialized on RAIs. It returns the greatest common divisor of two integer values 🔢💖
Definition at line 1503 of file stl_algo.h.
Referenced by __rotate().
std::__heap_select (with __comp)
template<typename _RandomAccessIterator , typename _Compare > void std::__heap_select (_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last, _Compare __comp) [inline]
This is a helper function for the sort routines 🫶
Definition at line 1913 of file stl_algo.h.
References make_heap().
std::__heap_select (no __comp)
template<typename _RandomAccessIterator > void std::__heap_select (_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last) [inline]
Also a helper function for the sort routines 🦋
Definition at line 1900 of file stl_algo.h.
References make_heap().
Referenced by partial_sort().
std::__inplace_stable_partition
template<typename _ForwardIterator , typename _Predicate , typename _Distance > _ForwardIterator std::__inplace_stable_partition (_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, _Distance __len) [inline]
This is a helper function... 😭 and that's literally all it says, the sentence just trails off into the void. Not me being left on read by the docs.
Definition at line 1777 of file stl_algo.h.
References advance(), distance(), and rotate().
Referenced by stable_partition().
std::__inplace_stable_sort (with __comp)
template<typename _RandomAccessIterator , typename _Compare > void std::__inplace_stable_sort (_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) [inline]
This is a helper function for the stable sorting routines 💅
Definition at line 3428 of file stl_algo.h.
References __inplace_stable_sort(), __insertion_sort(), and __merge_without_buffer().
std::__inplace_stable_sort (no __comp)
template<typename _RandomAccessIterator > void std::__inplace_stable_sort (_RandomAccessIterator __first, _RandomAccessIterator __last) [inline]
Also a helper function for the stable sorting routines 🌸
Definition at line 3409 of file stl_algo.h.
References __insertion_sort(), and __merge_without_buffer().
Referenced by __inplace_stable_sort(), and stable_sort().
std::__insertion_sort (with __comp)
template<typename _RandomAccessIterator , typename _Compare > void std::__insertion_sort (_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) [inline]
This is a helper function for the sort routine ✨
Definition at line 2119 of file stl_algo.h.
References __unguarded_linear_insert(), and copy_backward().
std::__insertion_sort (no __comp)
template<typename _RandomAccessIterator > void std::__insertion_sort (_RandomAccessIterator __first, _RandomAccessIterator __last) [inline]
Also a helper function for the sort routine 🎀
Definition at line 2096 of file stl_algo.h.
References __unguarded_linear_insert(), and copy_backward().
Referenced by __final_insertion_sort(), and __inplace_stable_sort().
std::__introsort_loop (with __comp)
template<typename _RandomAccessIterator , typename _Size , typename _Compare > void std::__introsort_loop (_RandomAccessIterator __first, _RandomAccessIterator __last, _Size __depth_limit, _Compare __comp) [inline]
This is a helper function for the sort routine 🦋
Definition at line 2277 of file stl_algo.h.
References __introsort_loop(), __median(), and __unguarded_partition().
std::__introsort_loop (no __comp)
template<typename _RandomAccessIterator , typename _Size > void std::__introsort_loop (_RandomAccessIterator __first, _RandomAccessIterator __last, _Size __depth_limit) [inline]
Also a helper function for the sort routine 💜
Definition at line 2245 of file stl_algo.h.
References __median(), and __unguarded_partition().
Referenced by __introsort_loop(), and sort().
std::__invoke
template<typename _Functor , typename... _Args> __gnu_cxx::__enable_if< (is_member_pointer< _Functor >::value &&!is_function< _Functor >::value &&!is_function< typename remove_pointer< _Functor >::type >::value), typename result_of< _Functor(_Args...)>::type >::__type std::__invoke (_Functor & __f, _Args &... __args) [inline]
Okay this return type is a whole paragraph bestie, look at her go 😭
What it does: invoke a function object, which may be either a member pointer or a function object. The first parameter will tell which 👑
Definition at line 265 of file tr1_impl/functional.
std::__lg
template<typename _Size > _Size std::__lg (_Size __n) [inline]
This is a helper function for the sort routines. Precondition: __n > 0 ⚠️ like, do not call this with zero, that's not the vibe.
Definition at line 2310 of file stl_algo.h.
References __lg().
Referenced by __lg(), std::tr1::__detail::__log_gamma_bernoulli(), nth_element(), and sort().
std::__merge_adaptive
template<typename _BidirectionalIterator , typename _Distance , typename _Pointer , typename _Compare > void std::__merge_adaptive (_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Distance __len1, _Distance __len2, _Pointer __buffer, _Distance __buffer_size, _Compare __comp) [inline]
This is a helper function for the merge routines 🌈 (she's got nine parameters, absolute queen behaviour, no cap)
Definition at line 2966 of file stl_algo.h.
References __merge_adaptive(), __merge_backward(), __rotate_adaptive(), advance(), distance(), lower_bound(), and upper_bound().
✨ std::__merge_adaptive ✨
template<typename _BidirectionalIterator, typename _Distance, typename _Pointer>
void std::__merge_adaptive(_BidirectionalIterator __first,
_BidirectionalIterator __middle,
_BidirectionalIterator __last,
_Distance __len1, _Distance __len2,
_Pointer __buffer, _Distance __buffer_size) [inline]
okay so bestie, this one is literally a helper function for the merge routines — it's the backstage crew of the whole merge situation and it does NOT get enough credit. 🫶
Definition at line 2910 of file stl_algo.h.
References __merge_backward(), __rotate_adaptive(), advance(), distance(), lower_bound(), and upper_bound().
Referenced by __merge_adaptive(), and inplace_merge().
🦋 std::__merge_backward (the _Compare one) 🦋
template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
typename _BidirectionalIterator3, typename _Compare>
_BidirectionalIterator3 std::__merge_backward(_BidirectionalIterator1 __first1,
_BidirectionalIterator1 __last1,
_BidirectionalIterator2 __first2,
_BidirectionalIterator2 __last2,
_BidirectionalIterator3 __result,
_Compare __comp) [inline]
this is a helper function for the merge routines — same vibe as above, just going backwards and with your own _Compare in the mix. 💅
Definition at line 2842 of file stl_algo.h.
References copy_backward().
🌸 std::__merge_backward (no _Compare) 🌸
template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
typename _BidirectionalIterator3>
_BidirectionalIterator3 std::__merge_backward(_BidirectionalIterator1 __first1,
_BidirectionalIterator1 __last1,
_BidirectionalIterator2 __first2,
_BidirectionalIterator2 __last2,
_BidirectionalIterator3 __result) [inline]
also a helper function for the merge routines — this is the no-custom-comparator twin, the lowkey version. 🎀
Definition at line 2807 of file stl_algo.h.
References copy_backward().
Referenced by __merge_adaptive().
🧚 std::__merge_without_buffer (with _Compare) 🧚
template<typename _BidirectionalIterator, typename _Distance, typename _Compare>
void std::__merge_without_buffer(_BidirectionalIterator __first,
_BidirectionalIterator __middle,
_BidirectionalIterator __last,
_Distance __len1, _Distance __len2,
_Compare __comp) [inline]
bestie this is a helper function for the merge routines — the "no buffer, no problem" branch of the family, and yes it's doing the most with recursion. 😭
Definition at line 3067 of file stl_algo.h.
References __merge_without_buffer(), advance(), distance(), iter_swap(), lower_bound(), rotate(), and upper_bound().
💜 std::__merge_without_buffer (no _Compare) 💜
template<typename _BidirectionalIterator, typename _Distance>
void std::__merge_without_buffer(_BidirectionalIterator __first,
_BidirectionalIterator __middle,
_BidirectionalIterator __last,
_Distance __len1, _Distance __len2) [inline]
still a helper function for the merge routines — same no-buffer energy, just without the custom comparator, periodt. 💅
Definition at line 3023 of file stl_algo.h.
References advance(), distance(), iter_swap(), lower_bound(), rotate(), and upper_bound().
Referenced by __inplace_stable_sort(), __merge_without_buffer(), and inplace_merge().
🌈 std::__partition (bidirectional iterators) 🌈
template<typename _BidirectionalIterator, typename _Predicate>
_BidirectionalIterator std::__partition(_BidirectionalIterator __first,
_BidirectionalIterator __last,
_Predicate __pred,
bidirectional_iterator_tag) [inline]
this is a helper function... (that's literally all the docs say, and honestly? iconic. keeping it mysterious. 🙈)
Definition at line 1747 of file stl_algo.h.
References iter_swap().
⭐ std::__partition (forward iterators) ⭐
template<typename _ForwardIterator, typename _Predicate>
_ForwardIterator std::__partition(_ForwardIterator __first,
_ForwardIterator __last,
_Predicate __pred,
forward_iterator_tag) [inline]
also a helper function... 👀 (the forward-iterator flavor of the same mysterious situation)
Definition at line 1722 of file stl_algo.h.
References iter_swap().
Referenced by partition().
🍓 std::__reverse (random access) 🍓
template<typename _RandomAccessIterator>
void std::__reverse(_RandomAccessIterator __first,
_RandomAccessIterator __last,
random_access_iterator_tag) [inline]
okay so the docs call this "an uglified reverse(_BidirectionalIterator, _BidirectionalIterator) overloaded for random access iterators" — the uglified is doing a lot of work here and I respect it. 💀
Definition at line 1423 of file stl_algo.h.
References iter_swap().
🎀 std::__reverse (bidirectional) 🎀
template<typename _BidirectionalIterator>
void std::__reverse(_BidirectionalIterator __first,
_BidirectionalIterator __last,
bidirectional_iterator_tag) [inline]
same deal but the bidirectional edition — the docs describe it as "an uglified reverse(_BidirectionalIterator, _BidirectionalIterator) overloaded for bidirectional iterators." no cap. 🫶
Definition at line 1403 of file stl_algo.h.
References iter_swap().
Referenced by __rotate(), and reverse().
🔥 std::__rotate (random access) 🔥
template<typename _RandomAccessIterator>
void std::__rotate(_RandomAccessIterator __first,
_RandomAccessIterator __middle,
_RandomAccessIterator __last,
random_access_iterator_tag) [inline]
this is a helper function for the rotate algorithm — it's giving main character energy for the random-access crowd. 👑
Definition at line 1583 of file stl_algo.h.
References __gcd(), and swap_ranges().
Referenced by __gnu_cxx::bitmap_allocator< _Tp >::_M_deallocate_single_object().
🦋 std::__rotate (bidirectional) 🦋
template<typename _BidirectionalIterator>
void std::__rotate(_BidirectionalIterator __first,
_BidirectionalIterator __middle,
_BidirectionalIterator __last,
bidirectional_iterator_tag) [inline]
another helper function for the rotate algorithm, bestie — bidirectional flavor, still slaying. ✨
Definition at line 1553 of file stl_algo.h.
References __reverse(), and iter_swap().
🌸 std::__rotate (forward) 🌸
template<typename _ForwardIterator>
void std::__rotate(_ForwardIterator __first,
_ForwardIterator __middle,
_ForwardIterator __last,
forward_iterator_tag) [inline]
yep, still a helper function for the rotate algorithm — forward-iterator era. 💅
Definition at line 1517 of file stl_algo.h.
References iter_swap().
Referenced by rotate().
🧚 std::__rotate_adaptive 🧚
template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
typename _Distance>
_BidirectionalIterator1 std::__rotate_adaptive(_BidirectionalIterator1 __first,
_BidirectionalIterator1 __middle,
_BidirectionalIterator1 __last,
_Distance __len1, _Distance __len2,
_BidirectionalIterator2 __buffer,
_Distance __buffer_size) [inline]
this is a helper function for the merge routines — the "adaptive" in the name is lowkey telling you it's making smart choices and I love that for it. 🧠✨
Definition at line 2878 of file stl_algo.h.
References advance(), copy_backward(), distance(), and rotate().
Referenced by __merge_adaptive().
⭐ std::__search_n (random access, with _BinaryPredicate) ⭐
template<typename _RandomAccessIter, typename _Integer, typename _Tp,
typename _BinaryPredicate>
_RandomAccessIter std::__search_n(_RandomAccessIter __first,
_RandomAccessIter __last,
_Integer __count,
const _Tp & __val,
_BinaryPredicate __binary_pred,
std::random_access_iterator_tag) [inline]
the docs describe this as "an uglified search_n(_ForwardIterator, _ForwardIterator, _Integer, const _Tp&, _BinaryPredicate) overloaded for random access iterators." a whole mouthful but ok we love a thorough icon. 💅
Definition at line 465 of file stl_algo.h.
🍓 std::__search_n (forward, with _BinaryPredicate) 🍓
template<typename _ForwardIterator, typename _Integer, typename _Tp,
typename _BinaryPredicate>
_ForwardIterator std::__search_n(_ForwardIterator __first,
_ForwardIterator __last,
_Integer __count,
const _Tp & __val,
_BinaryPredicate __binary_pred,
std::forward_iterator_tag) [inline]
"an uglified search_n(_ForwardIterator, _ForwardIterator, _Integer, const _Tp&, _BinaryPredicate) overloaded for forward iterators" — same energy, forward flavor. 🫶
Definition at line 426 of file stl_algo.h.
🎀 std::__search_n (random access, no _BinaryPredicate) 🎀
template<typename _RandomAccessIter, typename _Integer, typename _Tp>
_RandomAccessIter std::__search_n(_RandomAccessIter __first,
_RandomAccessIter __last,
_Integer __count,
const _Tp & __val,
std::random_access_iterator_tag) [inline]
described as "an uglified search_n(_ForwardIterator, _ForwardIterator, _Integer, const _Tp&) overloaded for random access iterators." no predicate, all business. 💅
Definition at line 372 of file stl_algo.h.
💜 std::__search_n (forward, no _BinaryPredicate) 💜
template<typename _ForwardIterator, typename _Integer, typename _Tp>
_ForwardIterator std::__search_n(_ForwardIterator __first,
_ForwardIterator __last,
_Integer __count,
const _Tp & __val,
std::forward_iterator_tag) [inline]
"an uglified search_n(_ForwardIterator, _ForwardIterator, _Integer, const _Tp&) overloaded for forward iterators" — the gentle forward-iterator one, bestie. 🌸
Definition at line 340 of file stl_algo.h.
Referenced by search_n().
✨ std::__stable_partition_adaptive ✨
template<typename _ForwardIterator, typename _Pointer, typename _Predicate,
typename _Distance>
_ForwardIterator std::__stable_partition_adaptive(_ForwardIterator __first,
_ForwardIterator __last,
_Predicate __pred,
_Distance __len,
_Pointer __buffer,
_Distance __buffer_size) [inline]
this is a helper function... again with the mystery 💀 — but the "adaptive" is right there in the name and it's doing its best, ok?
Definition at line 1802 of file stl_algo.h.
References advance(), distance(), and rotate().
Referenced by stable_partition().
🌈 std::__unguarded_insertion_sort (with _Compare) 🌈
template<typename _RandomAccessIterator, typename _Compare>
void std::__unguarded_insertion_sort(_RandomAccessIterator __first,
_RandomAccessIterator __last,
_Compare __comp) [inline]
this is a helper function for the sort routine — "unguarded" is literally in the name so you KNOW it's living dangerously (but responsibly, it's internal). 🔥
Definition at line 2154 of file stl_algo.h.
References __unguarded_linear_insert().
🦋 std::__unguarded_insertion_sort (no _Compare) 🦋
template<typename _RandomAccessIterator>
void std::__unguarded_insertion_sort(_RandomAccessIterator __first,
_RandomAccessIterator __last) [inline]
also a helper function for the sort routine — same unguarded energy, no custom comparator. 💅
Definition at line 2141 of file stl_algo.h.
References __unguarded_linear_insert().
Referenced by __final_insertion_sort().
🧚 std::__unguarded_linear_insert (with _Compare) 🧚
template<typename _RandomAccessIterator, typename _Tp, typename _Compare>
void std::__unguarded_linear_insert(_RandomAccessIterator __last,
_Tp __val,
_Compare __comp) [inline]
a helper function for the sort routine — the linear-insertion bestie with your own comparator. 🫶
Definition at line 2079 of file stl_algo.h.
⭐ std::__unguarded_linear_insert (no _Compare) ⭐
template<typename _RandomAccessIterator, typename _Tp>
void std::__unguarded_linear_insert(_RandomAccessIterator __last,
_Tp __val) [inline]
a helper function for the sort routine — the no-comparator twin, doing the exact same job but simpler. 🎀
Definition at line 2063 of file stl_algo.h.
Referenced by __insertion_sort(), and __unguarded_insertion_sort().
🍓 std::__unguarded_partition (with _Compare) 🍓
template<typename _RandomAccessIterator, typename _Tp, typename _Compare>
_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator __first,
_RandomAccessIterator __last,
_Tp __pivot,
_Compare __comp) [inline]
this is a helper function... (the docs are being shy again 🙈) — the compare-y partition bestie.
Definition at line 2224 of file stl_algo.h.
References iter_swap().
💜 std::__unguarded_partition (no _Compare) 💜
template<typename _RandomAccessIterator, typename _Tp>
_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator __first,
_RandomAccessIterator __last,
_Tp __pivot) [inline]
this is a helper function... — same mystery, no comparator, still iconic. ✨
Definition at line 2204 of file stl_algo.h.
References iter_swap().
Referenced by __introsort_loop().
🌸 std::__unique_copy (input iterators, forward iterator result) 🌸
template<typename _InputIterator, typename _ForwardIterator, typename _BinaryPredicate>
_ForwardIterator std::__unique_copy(_InputIterator __first,
_InputIterator __last,
_ForwardIterator __result,
_BinaryPredicate __binary_pred,
input_iterator_tag,
forward_iterator_tag) [inline]
described as "an uglified unique_copy(_InputIterator, _InputIterator, _OutputIterator, _BinaryPredicate) overloaded for input iterators and forward iterator as result." a whole sentence but it's serving. 💅
Definition at line 1380 of file stl_algo.h.
🎀 std::__unique_copy (input iterators, output iterator result) 🎀
template<typename _InputIterator, typename _OutputIterator, typename _BinaryPredicate>
_OutputIterator std::__unique_copy(_InputIterator __first,
_InputIterator __last,
_OutputIterator __result,
_BinaryPredicate __binary_pred,
input_iterator_tag,
output_iterator_tag) [inline]
and the docs call this "an uglified unique_copy(_InputIterator, _InputIterator, _OutputIterator, _BinaryPredicate) overloaded for input iterators and output iterator as result." last one of this batch, bestie — go off. 🦋
Definition at line 1351 of file stl_algo.h.
std::__unique_copy — forward iterators, output iterator, with a predicate
template<typename _ForwardIterator , typename _OutputIterator , typename
_BinaryPredicate > _OutputIterator std::__unique_copy (_ForwardIterator
__first, _ForwardIterator __last, _OutputIterator __result,
_BinaryPredicate __binary_pred, forward_iterator_tag,
output_iterator_tag) [inline]
okay so this one is, and I quote, an "uglified" unique_copy(_InputIterator, _InputIterator, _OutputIterator, _BinaryPredicate) — overloaded for forward iterators and output iterator as result. yes bestie, "uglified" is the actual term, the libstdc++ girlies are nothing if not honest 💅 it's the internal behind-the-scenes version so the pretty public one can be pretty.
Definition at line 1322 of file stl_algo.h.
std::__unique_copy — input iterators, forward iterator result
template<typename _InputIterator , typename _ForwardIterator >
_ForwardIterator std::__unique_copy (_InputIterator __first,
_InputIterator __last, _ForwardIterator __result, input_iterator_tag,
forward_iterator_tag) [inline]
another uglified unique_copy(_InputIterator, _InputIterator, _OutputIterator) — this time overloaded for input iterators and forward iterator as result 🦋
Definition at line 1301 of file stl_algo.h.
std::__unique_copy — input iterators, output iterator result
template<typename _InputIterator , typename _OutputIterator >
_OutputIterator std::__unique_copy (_InputIterator __first,
_InputIterator __last, _OutputIterator __result, input_iterator_tag,
output_iterator_tag) [inline]
third uglified unique_copy(_InputIterator, _InputIterator, _OutputIterator), overloaded for input iterators and output iterator as result ✨
Definition at line 1278 of file stl_algo.h.
std::__unique_copy — forward iterators, output iterator (no predicate)
template<typename _ForwardIterator , typename _OutputIterator >
_OutputIterator std::__unique_copy (_ForwardIterator __first,
_ForwardIterator __last, _OutputIterator __result, forward_iterator_tag,
output_iterator_tag) [inline]
the fourth and final uglified unique_copy(_InputIterator, _InputIterator, _OutputIterator), overloaded for forward iterators and output iterator as result. the whole set is giving "four twins in matching outfits" energy 👑
Definition at line 1255 of file stl_algo.h.
Referenced by unique_copy().
std::_Construct
template<typename _T1 , typename _T2 > void std::_Construct (_T1 * __p,
const _T2 & __value) [inline]
constructs an object in existing memory by invoking an allocated object's constructor with an initializer. that's it, that's the whole vibe — placing a baby object into memory that's already been reserved for it 🎀
Definition at line 70 of file stl_construct.h.
std::_Destroy — a whole range
template<typename _ForwardIterator > void std::_Destroy (_ForwardIterator
__first, _ForwardIterator __last) [inline]
destroy a range of objects. and here's the tea: if the value_type of the object has a trivial destructor, the compiler should optimize all of this away — literally nothing happens, free of charge. otherwise the objects' destructors must be invoked. so either it's a no-op or it's a whole cleanup era, no in-between 💀
Definition at line 92 of file stl_construct.h.
References _Destroy().
std::_Destroy — just one pointer
template<typename _Tp > void std::_Destroy (_Tp * __pointer) [inline]
destroy the object pointed to by a pointer type. single-target destruction, very main character energy 🫶
Definition at line 82 of file stl_construct.h.
References _Destroy().
Referenced by _Destroy(), std::deque< _Tp, _Alloc >::_M_fill_initialize(), std::deque< _Tp, _Alloc >::_M_range_initialize(), std::vector< _Tp, _Alloc >::operator=(), std::vector< _Tp, _Alloc >::reserve(), and std::vector< _Node *, _Nodeptr_Alloc >::~vector().
std::accumulate — with a binary operation
template<typename _InputIterator , typename _Tp , typename _BinaryOperation
> _Tp std::accumulate (_InputIterator __first, _InputIterator __last,
_Tp __init, _BinaryOperation __binary_op) [inline]
accumulate values in a range with operation. it accumulates the values in the range [first,last) using the function object binary_op, the initial value is init, and the values are processed in order. disciplined. orderly. obsessed 💖
Parameters:
first— start of range.last— end of range.init— starting value to add other values to.binary_op— function object to accumulate with.
Returns: the final sum.
Definition at line 141 of file stl_numeric.h.
std::accumulate — the plain one
template<typename _InputIterator , typename _Tp > _Tp std::accumulate
(_InputIterator __first, _InputIterator __last, _Tp __init) [inline]
accumulate values in a range. this one accumulates the values in the range [first,last) using operator+(), initial value init, values processed in order. the original girl, the blueprint, the classic 🌸
Parameters:
first— start of range.last— end of range.init— starting value to add other values to.
Returns: the final sum.
Definition at line 115 of file stl_numeric.h.
Referenced by __gnu_parallel::parallel_partial_sum_linear().
std::adjacent_difference — with a binary operation
template<typename _InputIterator , typename _OutputIterator , typename
_BinaryOperation > _OutputIterator std::adjacent_difference
(_InputIterator __first, _InputIterator __last, _OutputIterator
__result, _BinaryOperation __binary_op) [inline]
return differences between adjacent values. it computes the difference between adjacent values in the range [first,last) using the function object binary_op and writes the result to result ✨
Parameters:
first— start of input range.last— end of input range.result— output to write sums to.
Returns: iterator pointing just beyond the values written to result.
Definition at line 347 of file stl_numeric.h.
std::adjacent_difference — the plain one
template<typename _InputIterator , typename _OutputIterator >
_OutputIterator std::adjacent_difference (_InputIterator __first,
_InputIterator __last, _OutputIterator __result) [inline]
return differences between adjacent values. computes the difference between adjacent values in the range [first,last) using operator-() and writes the result to result. subtraction era 🦋
Parameters:
first— start of input range.last— end of input range.result— output to write sums to.
Returns: iterator pointing just beyond the values written to result.
Definition at line 308 of file stl_numeric.h.
std::advance
template<typename _InputIterator , typename _Distance > void std::advance
(_InputIterator & __i, _Distance __n) [inline]
a generalization of pointer arithmetic. honestly the glow-up of "just add to the pointer" 👑
Parameters:
i— an input iterator.n— the 'delta' by which to changei.
Returns: nothing.
this increments i by n. for bidirectional and random access iterators, n may be negative, in which case i is decremented. ngl the negative-delta thing is such a slay.
for random access iterators, this uses their + and - operations and are constant time. for other iterator classes they are linear time. so like, know your iterator category before you start bragging about speed 💀
Definition at line 168 of file stl_iterator_base_funcs.h.
References __iterator_category().
Referenced by __inplace_stable_partition(), __merge_adaptive(), __merge_without_buffer(), __rotate_adaptive(), __stable_partition_adaptive(), std::deque< _Tp, _Alloc >::_M_range_initialize(), equal_range(), lower_bound(), partition_point(), and upper_bound().
std::back_inserter
template<typename _Container > back_insert_iterator<_Container>
std::back_inserter (_Container & __x) [inline]
Parameters:
x— a container of arbitrary type.
Returns: an instance of back_insert_iterator working on x.
this wrapper function helps in creating back_insert_iterator instances. typing the name of the iterator requires knowing the precise full type of the container, which can be tedious and impedes generic programming — literally why would you hand-type that whole monster. using this function lets you take advantage of automatic template parameter deduction, making the compiler match the correct types for you. compiler does the homework, you take the credit 🎀
Definition at line 459 of file stl_iterator.h.
Referenced by regex_replace().
std::bind
template<typename _Functor , typename... _ArgTypes> _Bind_result< _Result,
typename _Maybe_wrap_member_pointer< _Functor >::type(_ArgTypes...)>
std::bind (_Functor __f, _ArgTypes... __args) [inline]
bind. that's the whole description bestie, the docs said "bind" and clocked out 😭 we respect the minimalism.
Definition at line 1343 of file tr1_impl/functional.
Referenced by call_once().
std::boolalpha
ios_base& std::boolalpha (ios_base & __base) [inline]
calls base.setf(ios_base::boolalpha). so your bools print as true/false instead of 1/0 — the character development we all needed 💅
Definition at line 799 of file ios_base.h.
References std::ios_base::setf().
Referenced by noboolalpha().
std::dec
ios_base& std::dec (ios_base & __base) [inline]
calls base.setf(ios_base::dec, ios_base::basefield). base-10 for the base-10 girlies 🔥
Definition at line 937 of file ios_base.h.
References std::ios_base::setf().
std::distance
template<typename _InputIterator >
iterator_traits<_InputIterator>::difference_type std::distance
(_InputIterator __first, _InputIterator __last) [inline]
a generalization of pointer arithmetic. the "how far apart are these two" of it all ✨
Parameters:
first— an input iterator.last— an input iterator.
Returns: the distance between them.
returns n such that first + n == last. this requires that last must be reachable from first. note that n may be negative — yes, negative, we love a signed difference 🦋
for random access iterators, this uses their + and - operations and are constant time. for other iterator classes they are linear time. again: vibe check your iterator before assuming it's fast 💀
Definition at line 110 of file stl_iterator_base_funcs.h.
References __iterator_category().
Referenced by __inplace_stable_partition(), __merge_adaptive(), __merge_without_buffer(), __rotate_adaptive(), __stable_partition_adaptive(), std::deque< _Tp, _Alloc >::_M_range_initialize(), equal_range(), inplace_merge(), is_heap_until(), std::sub_match< _Bi_iter >::length(), lower_bound(), __gnu_parallel::multiseq_partition(), __gnu_parallel::multiseq_selection(), partition_point(), std::match_results< _Bi_iter >::position(), __gnu_cxx::random_sample_n(), std::list< _Tp, _Alloc >::size(), and upper_bound(). that is a LOT of friends, she's booked and busy 👑
std::endl
template<typename _CharT , typename _Traits > basic_ostream<_CharT,
_Traits>& std::endl (basic_ostream< _CharT, _Traits > & __os) [inline]
write a newline and flush the stream. okay so listen — this manipulator is often mistakenly used when a simple newline is desired, leading to poor buffering performance 😭 the flush is the sneaky part and it is not free, bestie. see http://gcc.gnu.org/onlinedocs/libstdc++/27_io/howto.html#2 for more on this subject.
Definition at line 538 of file ostream.
References flush(), std::basic_ostream< _CharT, _Traits >::put(), and std::basic_ios< _CharT, _Traits >::widen().
std::ends
template<typename _CharT , typename _Traits > basic_ostream<_CharT,
_Traits>& std::ends (basic_ostream< _CharT, _Traits > & __os) [inline]
write a null character into the output sequence. tiny, humble, does exactly one thing 🎀
Definition at line 549 of file ostream.
References std::basic_ostream< _CharT, _Traits >::put().
std::fixed
ios_base& std::fixed (ios_base & __base) [inline]
calls base.setf(ios_base::fixed, ios_base::floatfield). fixed-point notation gang, stand up 🌸
Definition at line 962 of file ios_base.h.
References std::ios_base::setf().
std::flush
template<typename _CharT , typename _Traits > basic_ostream<_CharT,
_Traits>& std::flush (basic_ostream< _CharT, _Traits > & __os) [inline]
flushes the output stream. this manipulator simply calls the stream's flush() member function — no plot twists, no hidden lore 💖
Definition at line 559 of file ostream.
References std::basic_ostream< _CharT, _Traits >::flush().
Referenced by endl().
std::front_inserter
template<typename _Container > front_insert_iterator<_Container>
std::front_inserter (_Container & __x) [inline]
Parameters:
x— a container of arbitrary type.
Returns: an instance of front_insert_iterator working on x.
the front-of-the-line sibling of back_inserter, same energy, opposite end 🫶
(okay we're carrying straight on from the last part — this is still one function's writeup, so no new heading, just vibes) 💅
This wrapper function helps in creating front_insert_iterator instances.
Typing the name of the iterator requires knowing the precise full type of the container, which can be tedious and impedes generic programming. Using this function lets you take advantage of automatic template parameter deduction, making the compiler match the correct types for you. Like bestie, the compiler is literally doing the matching for you so you don't have to spell out types that look like a captcha. 🎀
Definition at line 542 of file stl_iterator.h.
💖 std::get_temporary_buffer — the temporary-buffer bestie
template<typename _Tp > pair<_Tp*, ptrdiff_t> std::get_temporary_buffer
(ptrdiff_t __len) [inline]
Allocates a temporary buffer. 🌸
Parameters:
len— The number of objects of typeTp.
Returns: See full description. (iykyk, keep reading 👀)
Reinventing the wheel, but this time with prettier spokes! ✨
This function tries to obtain storage for len adjacent Tp objects. The objects themselves are not constructed, of course. A pair<> is returned containing 'the buffer s address and capacity (in the units of sizeof(Tp)), or a pair of 0 values if no storage can be obtained.' Note that the capacity obtained may be less than that requested if the memory is unavailable; you should compare len with the .second return value. Non-negotiable, fr fr — always check .second. 🫶
Provides the nothrow exception guarantee. 💀 (no throwing, we're chill)
Definition at line 85 of file stl_tempbuf.h.
Referenced by std::_Temporary_buffer< _ForwardIterator, _Tp >::_Temporary_buffer().
🦋 std::getline — the __versa_string one, no delimiter
template<typename _CharT , typename _Traits , typename _Alloc , template<
typename, typename, typename > class _Base> basic_istream<_CharT,
_Traits>& std::getline (basic_istream< _CharT, _Traits > & __is,
__gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > & __str)
[inline]
Read a line from stream into a string. 📥
Parameters:
__is— Input stream.__str— Buffer to store into.
Returns: Reference to the input stream.
Stores characters from is into __str until '
no bestie the manpage itself gets cut off right there 😭 that's not me being lazy, that's genuinely where the text stops. The full behaviour lives in the sibling overload below, keep scrolling 💖
Definition at line 2435 of file vstring.h.
References std::basic_ios< _CharT, _Traits >::widen().
Referenced by getline().
🎀 std::getline — the __versa_string one, with a delimiter
template<typename _CharT , typename _Traits , typename _Alloc , template<
typename, typename, typename > class _Base> basic_istream< _CharT,
_Traits > & std::getline (basic_istream< _CharT, _Traits > & __is,
__gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > & __str,
_CharT __delim) [inline]
Read a line from stream into a string. 🌈
Parameters:
__is— Input stream.__str— Buffer to store into.__delim— Character marking end of line.
Returns: Reference to the input stream.
Stores characters from __is into __str until __delim is found, the end of the stream is encountered, or str.max_size() is reached. If is.width() is non-zero, that is the limit on the number of characters stored into __str. Any previous contents of __str are erased. If delim was encountered, it is extracted but not stored into __str. 🫶 (delim gets yeeted, not kept)
Definition at line 622 of file vstring.tcc.
References std::basic_ios< _CharT, _Traits >::_M_setstate(), __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::append(), __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::erase(), __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::max_size(), std::basic_ios< _CharT, _Traits >::rdbuf(), std::basic_streambuf< _CharT, _Traits >::sbumpc(), std::basic_ios< _CharT, _Traits >::setstate(), std::basic_streambuf< _CharT, _Traits >::sgetc(), and std::basic_streambuf< _CharT, _Traits >::snextc().
🌸 std::getline — the basic_string one, no delimiter
template<typename _CharT , typename _Traits , typename _Alloc >
basic_istream<_CharT, _Traits>& std::getline (basic_istream< _CharT,
_Traits > & __is, basic_string< _CharT, _Traits, _Alloc > & __str)
[inline]
Read a line from stream into a string. 📖
Parameters:
is— Input stream.str— Buffer to store into.
Returns: Reference to the input stream.
Stores characters from is into str until '
again, the page itself stops mid-sentence right there 😭 — same deal as above, the delimiter overload has the full description 🧚
Definition at line 2541 of file basic_string.h.
References getline(), and std::basic_ios< _CharT, _Traits >::widen().
👑 std::getline — the basic_string one, with a delimiter
template<typename _CharT , typename _Traits , typename _Alloc >
basic_istream< _CharT, _Traits > & std::getline (basic_istream< _CharT,
_Traits > & __is, basic_string< _CharT, _Traits, _Alloc > & __str,
_CharT __delim) [inline]
Read a line from stream into a string. ✨
Parameters:
is— Input stream.str— Buffer to store into.delim— Character marking end of line.
Returns: Reference to the input stream.
Stores characters from is into str until delim is found, the end of the stream is encountered, or str.max_size() is reached. If is.width() is non-zero, that is the limit on the number of characters stored into str. Any previous contents of str are erased. If delim was encountered, it is extracted but not stored into str. 💅
Definition at line 1046 of file basic_string.tcc.
References std::basic_ios< _CharT, _Traits >::_M_setstate(), std::basic_string< _CharT, _Traits, _Alloc >::erase(), std::basic_string< _CharT, _Traits, _Alloc >::max_size(), std::basic_ios< _CharT, _Traits >::rdbuf(), std::basic_streambuf< _CharT, _Traits >::sbumpc(), std::basic_ios< _CharT, _Traits >::setstate(), std::basic_streambuf< _CharT, _Traits >::sgetc(), and std::basic_streambuf< _CharT, _Traits >::snextc().
🔥 std::has_facet — facet vibe check
template<typename _Facet > bool std::has_facet (const locale & __loc) throw
() [inline]
Test for the presence of a facet. 🕵️♀️
has_facet tests the locale argument for the presence of the facet type provided as the template parameter. Facets derived from the facet parameter will also return true — so like, the whole family tree counts, periodt. 👑
Parameters:
Facet— The facet type to test the presence of.locale— The locale to test.
Returns: true if locale contains a facet of type Facet, else false.
Definition at line 91 of file locale_classes.tcc.
💜 std::hex — hex era
ios_base& std::hex (ios_base & __base) [inline]
Calls base.setf(ios_base::hex, ios_base::basefield). 🔢
Definition at line 945 of file ios_base.h.
References std::ios_base::setf().
Referenced by std::basic_ostream< _CharT, _Traits >::operator<<(), and std::regex_traits< _Ch_type >::value().
🧚 std::inner_product — the six-argument glow-up
template<typename _InputIterator1 , typename _InputIterator2 , typename _Tp
, typename _BinaryOperation1 , typename _BinaryOperation2 > _Tp
std::inner_product (_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _Tp __init, _BinaryOperation1 __binary_op1,
_BinaryOperation2 __binary_op2) [inline]
Compute inner product of two ranges. 🧮✨
Starting with an initial value of init, applies binary_op2 to successive elements from the two ranges and accumulates each result into the accumulated value using binary_op1. The values in the ranges are processed in order. No skipping the queue, bestie. 🚶♀️
Parameters:
first1— Start of range 1.last1— End of range 1.first2— Start of range 2.init— Starting value to add other values to.binary_op1— Function object to accumulate with.binary_op2— Function object to apply to pairs of input values.
Returns: The final inner product.
Definition at line 201 of file stl_numeric.h.
🌟 std::inner_product — the chill four-argument one
template<typename _InputIterator1 , typename _InputIterator2 , typename _Tp
> _Tp std::inner_product (_InputIterator1 __first1, _InputIterator1
__last1, _InputIterator2 __first2, _Tp __init) [inline]
Compute inner product of two ranges. 🧮
Starting with an initial value of init, multiplies successive elements from the two ranges and adds each product into the accumulated value using operator+(). The values in the ranges are processed in order.
Parameters:
first1— Start of range 1.last1— End of range 1.first2— Start of range 2.init— Starting value to add other values to.
Returns: The final inner product.
Definition at line 169 of file stl_numeric.h.
🎀 std::inserter — iterator wrapper magic
template<typename _Container , typename _Iterator >
insert_iterator<_Container> std::inserter (_Container & __x, _Iterator
__i) [inline]
Parameters:
x— A container of arbitrary type.
Returns: An instance of insert_iterator working on x.
This wrapper function helps in creating insert_iterator instances. Typing the name of the iterator requires knowing the precise full type of the container, which can be tedious and impedes generic programming. Using this function lets you take advantage of automatic template parameter deduction, making the compiler match the correct types for you. 💫 (yes bestie, it's the same trick as the front_insert_iterator one up top — iconic behaviour)
Definition at line 648 of file stl_iterator.h.
🌈 std::internal — the padding alignment one
ios_base& std::internal (ios_base & __base) [inline]
Calls base.setf(ios_base::internal, ios_base::adjustfield). ↔️
Definition at line 912 of file ios_base.h.
References std::ios_base::setf().
🍓 std::iota — filling ranges, one ++value at a time
template<typename _ForwardIterator , typename _Tp > void std::iota
(_ForwardIterator __first, _ForwardIterator __last, _Tp __value)
[inline]
Create a range of sequentially increasing values. 🔢➡️🔢
For each element in the range [first,last) assigns value and increments value as if by ++value.
Parameters:
first— Start of range.last— End of range.value— Starting value.
Returns: Nothing. (empty-handed but emotionally fulfilled 💀)
Definition at line 80 of file stl_numeric.h.
💅 the ctype convenience squad — character class checks, but make it locale
Okay so these next ones are all the same shape: you hand over a character plus a locale, and they ask that locale's ctype facet whether the char belongs to some class. Same energy, different class. 👯♀️
✨ std::isalnum
template<typename _CharT > bool std::isalnum (_CharT __c, const locale &
__loc) [inline]
Convenience interface to ctype.is(ctype_base::alnum, __c). 🔤
Definition at line 2575 of file locale_facets.h.
✨ std::isalpha
template<typename _CharT > bool std::isalpha (_CharT __c, const locale &
__loc) [inline]
Convenience interface to ctype.is(ctype_base::alpha, __c). 🅰️
Definition at line 2551 of file locale_facets.h.
✨ std::iscntrl
template<typename _CharT > bool std::iscntrl (_CharT __c, const locale &
__loc) [inline]
Convenience interface to ctype.is(ctype_base::cntrl, __c). 🎛️
Definition at line 2533 of file locale_facets.h.
✨ std::isdigit
template<typename _CharT > bool std::isdigit (_CharT __c, const locale &
__loc) [inline]
Convenience interface to ctype.is(ctype_base::digit, __c). 🔟
Definition at line 2557 of file locale_facets.h.
✨ std::isgraph
template<typename _CharT > bool std::isgraph (_CharT __c, const locale &
__loc) [inline]
Convenience interface to ctype.is(ctype_base::graph, __c). 🖨️
Definition at line 2581 of file locale_facets.h.
✨ std::islower
template<typename _CharT > bool std::islower (_CharT __c, const locale &
__loc) [inline]
Convenience interface to ctype.is(ctype_base::lower, __c). 🔡
Definition at line 2545 of file locale_facets.h.
✨ std::isprint
template<typename _CharT > bool std::isprint (_CharT __c, const locale &
__loc) [inline]
Convenience interface to ctype.is(ctype_base::print, __c). 📄
Definition at line 2527 of file locale_facets.h.
✨ std::ispunct
template<typename _CharT > bool std::ispunct (_CharT __c, const locale &
__loc) [inline]
Convenience interface to ctype.is(ctype_base::punct, __c). ❗
Definition at line 2563 of file locale_facets.h.
✨ std::isspace
template<typename _CharT > bool std::isspace (_CharT __c, const locale &
__loc) [inline]
Convenience interface to ctype.is(ctype_base::space, __c). ␣
Definition at line 2521 of file locale_facets.h.
real talk though — these are convenience wrappers, so the classification truth comes from thelocale'sctypefacet, not from your assumptions. Locale-sensitive, bestie. 🌍💖
💜 std::isupper — the uppercase vibe check
template<typename _CharT > bool std::isupper (_CharT __c, const locale & __loc) [inline]
Okay so this one is genuinely just a lil convenience wrapper — it hands the whole thing off to ctype.is(ctype_base::upper, __c) so you don't have to go digging through the facet yourself. Bestie behaviour, honestly. 🫶
Definition lives at line 2539 of file locale_facets.h.
🌸 std::isxdigit — hexadecimal girlie check
template<typename _CharT > bool std::isxdigit (_CharT __c, const locale & __loc) [inline]
Same energy, different flag: literally just calls ctype.is(ctype_base::xdigit, __c). That's it, that's the whole function. Iconic minimalism. ✨
Definition at line 2569 of file locale_facets.h.
🎀 std::left — left-align slay
ios_base& std::left (ios_base & __base) [inline]
Does exactly one thing: calls base.setf(ios_base::left, ios_base::adjustfield). Your output goes left, periodt. 💅
Definition at line 920 of file ios_base.h.
References: std::ios_base::setf().
Referenced by: __gnu_parallel::LoserTree< false, T, Comparator >::init_winner(), operator<<(), and __gnu_parallel::parallel_partition().
🦋 std::mem_fn — glow-up for member pointers
template<typename _Tp , typename _Class > _Mem_fn<_Tp _Class::*> std::mem_fn (_Tp _Class::* __pm) [inline]
Returns you a function object that forwards to the member pointer pm. So your dusty old member pointer gets a main-character makeover into something callable. Ngl, very useful. 🔥
Definition at line 794 of file tr1_impl/functional.
💀 std::noboolalpha — un-set the bool aesthetic
ios_base& std::noboolalpha (ios_base & __base) [inline]
Calls base.unsetf(ios_base::boolalpha). Translation: booleans go back to being 1 and 0 instead of true/false. The way that it simply toggles a flag… we love a low-effort icon. 😭
Definition at line 807 of file ios_base.h.
References: boolalpha(), and std::ios_base::unsetf().
🌈 std::noshowbase — no base reveal
ios_base& std::noshowbase (ios_base & __base) [inline]
Calls base.unsetf(ios_base::showbase) — so no more 0x prefixes hyping up your hex numbers. Keeping it subtle fr fr.
Definition at line 823 of file ios_base.h.
References: showbase(), and std::ios_base::unsetf().
💖 std::noshowpoint — point, but make it not
ios_base& std::noshowpoint (ios_base & __base) [inline]
Calls base.unsetf(ios_base::showpoint). The decimal point stops being the main event. 🎀
Definition at line 839 of file ios_base.h.
References: showpoint(), and std::ios_base::unsetf().
⭐ std::noshowpos — no plus sign moment
ios_base& std::noshowpos (ios_base & __base) [inline]
Calls base.unsetf(ios_base::showpos) — positive numbers stop flexing that + in front of them. Humble era. 🙈
Definition at line 855 of file ios_base.h.
References: showpos(), and std::ios_base::unsetf().
🧚 std::noskipws — stop skipping the whitespace bestie
ios_base& std::noskipws (ios_base & __base) [inline]
Calls base.unsetf(ios_base::skipws). Now whitespace gets read in like the main character it always was. No more ghosting the spaces. 😤
Definition at line 871 of file ios_base.h.
References: skipws(), and std::ios_base::unsetf().
🍓 std::nounitbuf — no flush-everything chaos
ios_base& std::nounitbuf (ios_base & __base) [inline]
Calls base.unsetf(ios_base::unitbuf). The buffer stops flushing after literally every single operation, so your stream can chill for a sec. Self-care. 🫶
Definition at line 903 of file ios_base.h.
References: unitbuf(), and std::ios_base::unsetf().
🌸 std::nouppercase — lowercase era
ios_base& std::nouppercase (ios_base & __base) [inline]
Calls base.unsetf(ios_base::uppercase). No more 0XFF yelling at you — back to lowercase, soft girl mode. 🦋
Definition at line 887 of file ios_base.h.
References: std::ios_base::unsetf(), and uppercase().
🔥 std::oct — octal, but make it a whole format
ios_base& std::oct (ios_base & __base) [inline]
Calls base.setf(ios_base::oct, ios_base::basefield). Boom, your stream is doing octal now. Eight-based and thriving. ⭐
Definition at line 953 of file ios_base.h.
References: std::ios_base::setf().
Referenced by: std::basic_ostream< _CharT, _Traits >::operator<<(), and std::regex_traits< _Ch_type >::value().
😭 std::operator!= — the istream_iterator one
template<class _Tp , class _CharT , class _Traits , class _Dist > bool std::operator!= (const istream_iterator< _Tp, _CharT, _Traits, _Dist > & __x, const istream_iterator< _Tp, _CharT, _Traits, _Dist > & __y) [inline]
Returns false if x and y are both end or not end, or x and y are the same. So basically: they're "not different" in those cases. Weirdly worded? Yes. Correct? Also yes. 💀
Definition at line 130 of file stream_iterator.h.
References: std::istream_iterator< _Tp, _CharT, _Traits, _Dist >::_M_equal().
🎀 std::operator!= — vector vs vector
template<typename _Tp , typename _Alloc > bool std::operator!= (const vector< _Tp, _Alloc > & __x, const vector< _Tp, _Alloc > & __y) [inline]
Based on operator==. That's the whole note, bestie. It's just == with a ! attitude. 💅
Definition at line 1192 of file stl_vector.h.
💜 std::operator!= — stack vs stack
template<typename _Tp , typename _Seq > bool std::operator!= (const stack< _Tp, _Seq > & __x, const stack< _Tp, _Seq > & __y) [inline]
Based on operator==. Short and sweet. 🌸
Definition at line 259 of file stl_stack.h.
✨ std::operator!= — set vs set
template<typename _Key , typename _Compare , typename _Alloc > bool std::operator!= (const set< _Key, _Compare, _Alloc > & __x, const set< _Key, _Compare, _Alloc > & __y) [inline]
Returns !(x == y). Literally. Nothing else going on here and honestly? Respect. 👑
Definition at line 663 of file stl_set.h.
🦋 std::operator!= — queue vs queue
template<typename _Tp , typename _Seq > bool std::operator!= (const queue< _Tp, _Seq > & __x, const queue< _Tp, _Seq > & __y) [inline]
Based on operator==. Same story, different container. 🎀
Definition at line 294 of file stl_queue.h.
🌈 std::operator!= — pair vs pair
template<class _T1 , class _T2 > bool std::operator!= (const pair< _T1, _T2 > & __x, const pair< _T1, _T2 > & __y) [inline]
Uses operator== to find the result. Two elements, one equality check, zero drama. 💖
Definition at line 159 of file stl_pair.h.
🌸 std::operator!= — multiset vs multiset
template<typename _Key , typename _Compare , typename _Alloc > bool std::operator!= (const multiset< _Key, _Compare, _Alloc > & __x, const multiset< _Key, _Compare, _Alloc > & __y) [inline]
Returns !(x == y). Same as its set sibling but with duplicates invited to the party. 🫶
Definition at line 649 of file stl_multiset.h.
💀 std::operator!= — multimap vs multimap
template<typename _Key , typename _Tp , typename _Compare , typename _Alloc > bool std::operator!= (const multimap< _Key, _Tp, _Compare, _Alloc > & __x, const multimap< _Key, _Tp, _Compare, _Alloc > & __y) [inline]
Based on operator==. Fr fr that's the whole thing. 🎀
Definition at line 752 of file stl_multimap.h.
⭐ std::operator!= — map vs map
template<typename _Key , typename _Tp , typename _Compare , typename _Alloc > bool std::operator!= (const map< _Key, _Tp, _Compare, _Alloc > & __x, const map< _Key, _Tp, _Compare, _Alloc > & __y) [inline]
Based on operator==. Your key-value girlies get compared properly. 💜
Definition at line 823 of file stl_map.h.
🧚 std::operator!= — list vs list
template<typename _Tp , typename _Alloc > bool std::operator!= (const list< _Tp, _Alloc > & __x, const list< _Tp, _Alloc > & __y) [inline]
Based on operator==. Linked-list inequality, served fresh. 🍓
Definition at line 1492 of file stl_list.h.
🔥 std::operator!= — reverse_iterator vs reverse_iterator (mixed types)
template<typename _IteratorL , typename _IteratorR > bool std::operator!= (const reverse_iterator< _IteratorL > & __x, const reverse_iterator< _IteratorR > & __y) [inline]
Parameters:
x— Areverse_iterator.y— Areverse_iterator.
Returns: A simple bool.
So here's the lore: reverse iterators forward many operations to their underlying base() iterators. Others are implemented in terms of one another. It's giving delegation, and honestly it's efficient. ✨
Definition at line 340 of file stl_iterator.h.
🎀 std::operator!= — reverse_iterator vs reverse_iterator (same type)
template<typename _Iterator > bool std::operator!= (const reverse_iterator< _Iterator > & __x, const reverse_iterator< _Iterator > & __y) [inline]
Parameters:
x— Areverse_iterator.y— Areverse_iterator.
Returns: A simple bool.
Same deal as above: reverse iterators forward many operations to their underlying base() iterators, and others are implemented in terms of one another. Two flavours, one vibe. 💅
Definition at line 290 of file stl_iterator.h.
🌸 std::operator!= — deque vs deque
template<typename _Tp , typename _Alloc > bool std::operator!= (const deque< _Tp, _Alloc > & __x, const deque< _Tp, _Alloc > & __y) [inline]
Based on operator==. Double-ended, equally unbothered. 🦋
Definition at line 1774 of file stl_deque.h.
💜 std::operator!= — forward_list vs forward_list
template<typename _Tp , typename _Alloc > bool std::operator!= (const forward_list< _Tp, _Alloc > & __lx, const forward_list< _Tp, _Alloc > & __ly) [inline]
Based on operator==. Note the params are named __lx and __ly here, not __x/__y — we keep the lore accurate. 🎀
Definition at line 1256 of file forward_list.h.
⭐ std::operator!= — forward list iterators, const meets non-const
template<typename _Tp , typename _Alloc > bool std::operator!= (const _Fwd_list_iterator< _Tp, _Alloc > & __x, const _Fwd_list_const_iterator< _Tp, _Alloc > & __y) [inline]
Forward list iterator inequality comparison. That's the whole description, bestie — it compares, it's forward-list-y, it's inequality. Done. 💀
Definition at line 254 of file forward_list.h.
References: std::_Fwd_list_const_iterator< _Tp, _Alloc >::_M_node, and std::_Fwd_list_iterator< _Tp, _Alloc >::_M_node.
🍓 std::operator!= — string vs C string
template<typename _CharT , typename _Traits , typename _Alloc > bool std::operator!= (const basic_string< _CharT, _Traits, _Alloc > & __lhs, const _CharT * __rhs) [inline]
Test difference of string and C string. Classic matchup. 🥊
Parameters:
lhs— String.rhs— C string.
Returns: true if lhs.compare(rhs) != 0. false otherwise.
Definition at line 2305 of file basic_string.h.
🦋 std::operator!= — C string vs string
template<typename _CharT , typename _Traits , typename _Alloc > bool std::operator!= (const _CharT * __lhs, const basic_string< _CharT, _Traits, _Alloc > & __rhs) [inline]
Test difference of C string and string — yes, the order is flipped, and yes, it matters for which side you pass what. 🙈
Parameters:
lhs— C string.rhs— String.
Returns: true if rhs.compare(lhs) != 0. false otherwise.
Notice it's rhs.compare(lhs) here, not the other way round — the arguments swap because the C string is on the left. Don't get it twisted, bestie. 💅
Definition at line 2293 of file basic_string.h.
🎀 std::operator!= — string vs string
template<typename _CharT , typename _Traits , typename _Alloc > bool std::operator!= (const basic_string< _CharT, _Traits, _Alloc > & __lhs, const basic_string< _CharT, _Traits, _Alloc > & __rhs) [inline]
Test difference of two strings. The classic. The original. The blueprint. 👑
Parameters:
lhs— First string.rhs— Second string.
Returns: true if lhs.compare(rhs) != 0. false otherwise.
Definition at line 2281 of file basic_string.h.
🌈 std::operator!= — _M_clear_type * vs function
template<typename _Signature > bool std::operator!= (_M_clear_type *, const function< _Signature > & __f) [inline]
Heads up: this is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. That's the official note and we're not gonna pretend it's deeper than that. 🫶
Definition at line 2114 of file tr1_impl/functional.
💖 std::operator!= — function vs _M_clear_type *
template<typename _Signature > bool std::operator!= (const function< _Signature > & __f, _M_clear_type *) [inline]
Compares a polymorphic function object wrapper against 0 (the NULL pointer).
Returns: false if the wrapper has no target, true otherwise.
This function will not throw an exception. Very demure, very mindful. 🧘♀️
Definition at line 2108 of file tr1_impl/functional.
🔥 std::operator& — bitset bitwise boogaloo
template<size_t _Nb> bitset<_Nb> std::operator& (const bitset< _Nb > & __x, const bitset< _Nb > & __y) [inline]
Global bitwise operations on bitsets. Yes, both of them — it's the whole family. 🎀
Parameters:
x— A bitset.y— A bitset of the same size asx.
Important:yhas to be the same size asx. Don't be out here matching a 4-bit with an 8-bit, it's not gonna slay. ⭐
Returns: A new bitset.
The original says these should be self-explanatory, and honestly? They are. Bitwise AND, babes. 💅
Definition at line 1269 of file bitset.
References: operator&().
Referenced by: operator&().
🧚 std::operator+ — number plus reverse_iterator
template<typename _Iterator > reverse_iterator<_Iterator> std::operator+ (typename reverse_iterator< _Iterator >::difference_type __n, const reverse_iterator< _Iterator > & __x) [inline]
Parameters:
x— Areverse_iterator.y— Areverse_iterator.
Returns: A simple bool.
Yeah, bestie, we clocked it too — the description mentionsyand abooleven though the signature takes__nand__xand returns areverse_iterator. That's what the page says, so that's what we're telling you. No cap, don't come for me. 😭
Reverse iterators forward many operations to their underlying base() iterators. Others are implemented in terms of one another.
Definition at line 320 of file stl_iterator.h.
References: std::reverse_iterator< _Iterator >::base().
🌸 std::operator+ — string plus character
template<typename _CharT , typename _Traits , typename _Alloc > basic_string<_CharT, _Traits, _Alloc> std::operator+ (const basic_string< _CharT, _Traits, _Alloc > & __lhs, _CharT __rhs) [inline]
Concatenate string and character. Glue a single char onto the end of your string and vibe. 🫶
Parameters:
lhs— First string.rhs— Last string.
Returns: New string with lhs followed by rhs.
Definition at line 2217 of file basic_string.h.
💜 std::operator+ — string plus C string
template<typename _CharT , typename _Traits , typename _Alloc > basic_string<_CharT, _Traits, _Alloc> std::operator+ (const basic_string< _CharT, _Traits, _Alloc > & __lhs, const _CharT * __rhs) [inline]
Concatenate string and C string. The crossover episode we all needed. ✨
Parameters:
lhs— First string.rhs— Last string.
Returns: New string with lhs followed by rhs.
Definition at line 2201 of file basic_string.h.
References: std::basic_string< _CharT, _Traits, _Alloc >::append().
🌸 std::operator+ — character + string, the duo we didn't know we needed
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string< _CharT, _Traits, _Alloc >
std::operator+ (_CharT __lhs,
const basic_string< _CharT, _Traits, _Alloc > & __rhs) [inline]
Bestie, this one is literally "glue a single character onto the front of a string." Concatenate character and string, that's the whole vibe 💅
lhs— First string. (yes, a lone_CharT, living its best solo life)rhs— Last string.
Returns: New string with lhs followed by rhs. Fresh object, nobody gets mutated 🫶
Definition at line 686 of file basic_string.tcc.
References std::basic_string< _CharT, _Traits, _Alloc >::size().
🎀 std::operator+ — C string + string
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string< _CharT, _Traits, _Alloc >
std::operator+ (const _CharT * __lhs,
const basic_string< _CharT, _Traits, _Alloc > & __rhs) [inline]
Concatenate C string and string. So you've got your old-school const _CharT * on the left and your fancy basic_string on the right, and they hold hands ✨
lhs— First string.rhs— Last string.
Returns: New string with value of lhs followed by rhs. Note the "value of" — it's the contents being copied in, no cap.
Definition at line 670 of file basic_string.tcc.
References std::basic_string< _CharT, _Traits, _Alloc >::size().
🦋 std::operator+ — string + string, the classic
template<typename _CharT, typename _Traits, typename _Alloc>
basic_string<_CharT, _Traits, _Alloc>
std::operator+ (const basic_string< _CharT, _Traits, _Alloc > & __lhs,
const basic_string< _CharT, _Traits, _Alloc > & __rhs) [inline]
Concatenate two strings. Two strings. One +. Iconic behaviour, honestly 👑
lhs— First string.rhs— Last string.
Returns: New string with value of lhs followed by rhs. Brand new string, both originals stay unbothered 💖
Definition at line 2164 of file basic_string.h.
References std::basic_string< _CharT, _Traits, _Alloc >::append().
💀 std::operator- — reverse_iterator minus reverse_iterator (the templated two-type one)
template<typename _IteratorL, typename _IteratorR>
auto
std::operator- (const reverse_iterator< _IteratorL > & __x,
const reverse_iterator< _IteratorR > & __y) [inline]
x— Areverse_iterator.y— Areverse_iterator.
Returns: A simple bool. (Yes, the docs say bool, and yes, the return type up top is auto — we're just reporting what's written, don't come for me 🙈)
Reverse iterators forward many operations to their underlying base() iterators. Others are implemented in terms of one another 🧚
Definition at line 366 of file stl_iterator.h.
References std::reverse_iterator< _Iterator >::base(), and operator-().
🌈 std::operator- — reverse_iterator minus reverse_iterator (single-type edition)
template<typename _Iterator>
reverse_iterator<_Iterator>::difference_type
std::operator- (const reverse_iterator< _Iterator > & __x,
const reverse_iterator< _Iterator > & __y) [inline]
x— Areverse_iterator.y— Areverse_iterator.
Returns: A simple bool. (Again — same wording as above, same difference_type-shaped signature up top. The docs keep it consistent, we keep it exact 😭)
Reverse iterators forward many operations to their underlying base() iterators. Others are implemented in terms of one another 🫶
Definition at line 314 of file stl_iterator.h.
References std::reverse_iterator< _Iterator >::base(), and operator-().
⭐ std::operator< — vector ordering relation
template<typename _Tp, typename _Alloc>
bool
std::operator< (const vector< _Tp, _Alloc > & __x,
const vector< _Tp, _Alloc > & __y) [inline]
Vector ordering relation — it's giving "who comes first in the dictionary" but for vectors 📚
x— A vector.y— A vector of the same type asx.
Returns: True iff x is lexicographically less than y.
This is a total ordering relation. It is linear in the size of the vectors. The elements must be comparable with <.
See std::lexicographical_compare() for how the determination is made.
Definition at line 1185 of file stl_vector.h.
References lexicographical_compare().
🍓 std::operator< — stack ordering relation
template<typename _Tp, typename _Seq>
bool
std::operator< (const stack< _Tp, _Seq > & __x,
const stack< _Tp, _Seq > & __y) [inline]
Stack ordering relation. Yes, you can compare stacks. Yes, it's a whole thing 💅
x— A stack.y— A stack of the same type asx.
Returns: True iff x is lexicographically less than y.
This is an total ordering relation. Complexity and semantics depend on the underlying sequence type, but the expected rules are: this relation is linear in the size of the sequences, the elements must be comparable with <, and std::lexicographical_compare() is usually used to make the determination.
ngl "an total ordering relation" is exactly how the docs word it — copying the vibe, not fixing the grammar 🙈
Definition at line 253 of file stl_stack.h.
🎀 std::operator< — set ordering relation
template<typename _Key, typename _Compare, typename _Alloc>
bool
std::operator< (const set< _Key, _Compare, _Alloc > & __x,
const set< _Key, _Compare, _Alloc > & __y) [inline]
Set ordering relation, living its sorted little life ✨
x— A set.y— A set of the same type asx.
Returns: True iff x is lexicographically less than y.
This is a total ordering relation. It is linear in the size of the maps. The elements must be comparable with <.
See std::lexicographical_compare() for how the determination is made.
fr fr the docs say "maps" in the set entry. I'm not editing the source material, I'm just the messenger 💀
Definition at line 656 of file stl_set.h.
🦋 std::operator< — queue ordering relation
template<typename _Tp, typename _Seq>
bool
std::operator< (const queue< _Tp, _Seq > & __x,
const queue< _Tp, _Seq > & __y) [inline]
Queue ordering relation — first in line gets compared first, iykyk 🚶♀️
x— A queue.y— A queue of the same type asx.
Returns: True iff x is lexicographically less than y.
This is an total ordering relation. Complexity and semantics depend on the underlying sequence type, but the expected rules are: this relation is linear in the size of the sequences, the elements must be comparable with <, and std::lexicographical_compare() is usually used to make the determination.
Definition at line 288 of file stl_queue.h.
👑 std::operator< — pair ordering relation
template<class _T1, class _T2>
bool
std::operator< (const pair< _T1, _T2 > & __x,
const pair< _T1, _T2 > & __y) [inline]
No cute one-liner description here bestie, just a link and a location:
<http://gcc.gnu.org/onlinedocs/libstdc++/manual/utilities.html>
Definition at line 152 of file stl_pair.h.
🌸 std::operator< — multiset ordering relation
template<typename _Key, typename _Compare, typename _Alloc>
bool
std::operator< (const multiset< _Key, _Compare, _Alloc > & __x,
const multiset< _Key, _Compare, _Alloc > & __y) [inline]
Multiset ordering relation — like set, but it said "and another one" 🫶
x— A multiset.y— A multiset of the same type asx.
Returns: True iff x is lexicographically less than y.
This is a total ordering relation. It is linear in the size of the maps. The elements must be comparable with <.
See std::lexicographical_compare() for how the determination is made.
Definition at line 642 of file stl_multiset.h.
💜 std::operator< — multimap ordering relation
template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
bool
std::operator< (const multimap< _Key, _Tp, _Compare, _Alloc > & __x,
const multimap< _Key, _Tp, _Compare, _Alloc > & __y) [inline]
Multimap ordering relation. Key-value pairs, but make it a whole comparison arc 😌
x— A multimap.y— A multimap of the same type asx.
Returns: True iff x is lexicographically less than y.
This is a total ordering relation. It is linear in the size of the multimaps. The elements must be comparable with <.
See std::lexicographical_compare() for how the determination is made.
Definition at line 745 of file stl_multimap.h.
🔥 std::operator< — map ordering relation
template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
bool
std::operator< (const map< _Key, _Tp, _Compare, _Alloc > & __x,
const map< _Key, _Tp, _Compare, _Alloc > & __y) [inline]
Map ordering relation — the main character of associative containers 🗺️
x— A map.y— A map of the same type asx.
Returns: True iff x is lexicographically less than y.
This is a total ordering relation. It is linear in the size of the maps. The elements must be comparable with <.
See std::lexicographical_compare() for how the determination is made.
Definition at line 816 of file stl_map.h.
🧚 std::operator< — list ordering relation
template<typename _Tp, typename _Alloc>
bool
std::operator< (const list< _Tp, _Alloc > & __x,
const list< _Tp, _Alloc > & __y) [inline]
List ordering relation. Linked lists get to be compared too, they contain multitudes 💫
x— A list.y— A list of the same type asx.
Returns: True iff x is lexicographically less than y.
This is a total ordering relation. It is linear in the size of the lists. The elements must be comparable with <.
See std::lexicographical_compare() for how the determination is made.
Definition at line 1485 of file stl_list.h.
References lexicographical_compare().
🌈 std::operator< — reverse_iterator < reverse_iterator (two iterator types)
template<typename _IteratorL, typename _IteratorR>
bool
std::operator< (const reverse_iterator< _IteratorL > & __x,
const reverse_iterator< _IteratorR > & __y) [inline]
x— Areverse_iterator.y— Areverse_iterator.
Returns: A simple bool.
Reverse iterators forward many operations to their underlying base() iterators. Others are implemented in terms of one another 🎀
Definition at line 334 of file stl_iterator.h.
⭐ std::operator< — reverse_iterator < reverse_iterator (single iterator type)
template<typename _Iterator>
bool
std::operator< (const reverse_iterator< _Iterator > & __x,
const reverse_iterator< _Iterator > & __y) [inline]
x— Areverse_iterator.y— Areverse_iterator.
Returns: A simple bool.
Reverse iterators forward many operations to their underlying base() iterators. Others are implemented in terms of one another 💖
Definition at line 284 of file stl_iterator.h.
🦋 std::operator< — deque ordering relation
template<typename _Tp, typename _Alloc>
bool
std::operator< (const deque< _Tp, _Alloc > & __x,
const deque< _Tp, _Alloc > & __y) [inline]
Deque ordering relation — double-ended, double-iconic 🎀
x— A deque.y— A deque of the same type asx.
Returns: True iff x is lexicographically less than y.
This is a total ordering relation. It is linear in the size of the deques. The elements must be comparable with <.
See std::lexicographical_compare() for how the determination is made.
Definition at line 1766 of file stl_deque.h.
References lexicographical_compare().
🍓 std::operator< — forward_list ordering relation
template<typename _Tp, typename _Alloc>
bool
std::operator< (const forward_list< _Tp, _Alloc > & __lx,
const forward_list< _Tp, _Alloc > & __ly) [inline]
Forward list ordering relation — and heads up, this one names its params lx and ly, not x and y. Different names, same energy ✨
lx— Aforward_list.ly— Aforward_listof the same type aslx.
Returns: True iff lx is lexicographically less than ly.
This is a total ordering relation. It is linear in the size of the forward lists. The elements must be comparable with <.
See std::lexicographical_compare() for how the determination is made.
Definition at line 1248 of file forward_list.h.
References lexicographical_compare().
💅 std::operator< — C string precedes string?
template<typename _CharT, typename _Traits, typename _Alloc>
bool
std::operator< (const _CharT * __lhs,
const basic_string< _CharT, _Traits, _Alloc > & __rhs) [inline]
Test if C string precedes string. Old school on the left, glow-up on the right 🔥
lhs— C string.rhs— String.
Returns: True if lhs precedes rhs. False otherwise.
Definition at line 2342 of file basic_string.h.
References std::basic_string< _CharT, _Traits, _Alloc >::compare().
🫶 std::operator< — string precedes C string?
template<typename _CharT, typename _Traits, typename _Alloc>
bool
std::operator< (const basic_string< _CharT, _Traits, _Alloc > & __lhs,
const _CharT * __rhs) [inline]
Test if string precedes C string. Same deal, sides swapped 💫
lhs— String.rhs— C string.
Returns: True if lhs precedes rhs. False otherwise.
Definition at line 2330 of file basic_string.h.
✨ std::operator< — basic_string edition 🎀
template<typename _CharT , typename _Traits , typename _Alloc > bool
std::operator< (const basic_string< _CharT, _Traits, _Alloc > & __lhs,
const basic_string< _CharT, _Traits, _Alloc > & __rhs) [inline]
okay so this one literally just tells you if one string comes before another in the ordering. that's it, that's the whole vibe 💅
Parameters:
lhs— first string, bestie numero unorhs— second string, the challenger
Returns: True if lhs precedes rhs. False otherwise. no in-between, no "it's complicated" 😌
Definition at line 2318 of file basic_string.h.
✨ std::operator<< — __versa_string into a stream 🦋
template<typename _CharT , typename _Traits , typename _Alloc , template<
typename, typename, typename > class _Base> basic_ostream<_CharT,
_Traits>& std::operator<< (basic_ostream< _CharT, _Traits > & __os,
const __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > &
__str) [inline]
Write string to a stream — the classic "put the string in the stream" moment, but for the __gnu_cxx::__versa_string flavor 🌸
Parameters:
__os— output stream, where the text is headed__str— the string to write out
Returns: reference to the output stream, so you can keep chaining like the main character you are 👑
Output characters of __str into os following the same rules as for writing a C string.
Definition at line 2389 of file vstring.h.
✨ std::operator<< — basic_string into a stream 💖
template<typename _CharT , typename _Traits , typename _Alloc >
basic_ostream<_CharT, _Traits>& std::operator<< (basic_ostream< _CharT,
_Traits > & __os, const basic_string< _CharT, _Traits, _Alloc > & __str)
[inline]
Write string to a stream — the basic_string remix, and yes it ate ✨
Parameters:
os— output streamstr— string to write out
Returns: reference to the output stream 🫶
Output characters of str into os following the same rules as for writing a C string.
Definition at line 2501 of file basic_string.h.
✨ std::operator<< — bernoulli_distribution 🎲
template<typename _CharT , typename _Traits > std::basic_ostream<_CharT,
_Traits>& std::operator<< (std::basic_ostream< _CharT, _Traits > & __os,
const bernoulli_distribution & __x) [inline]
Inserts a bernoulli_distribution random number distribution __x into the output stream __os. showing off your RNG internals to a stream, iconic behavior honestly 🍓
Parameters:
__os— an output stream__x— abernoulli_distributionrandom number distribution
Returns: the output stream with the state of __x inserted or in an error state 😭 (either slays or flops, no middle ground)
Definition at line 823 of file random.tcc.
References: std::ios_base::flags(), left(), and scientific().
✨ std::operator<< — const unsigned char * string inserter 🌈
template<class _Traits > basic_ostream<char, _Traits>& std::operator<<
(basic_ostream< char, _Traits > & __out, const unsigned char * __s)
[inline]
String inserters — the unsigned char * one, living its best life 💜
Parameters:
out— an output streams— a character string
Returns: out
Precondition: s must be a non-NULL pointer ⚠️ like fr fr do not pass NULL here
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object with good status, this function inserts traits::length(s) characters starting at s, widened if necessary, followed by any required padding (as determined by [22.2.2.2.2]). out.width(0) is then called.
Definition at line 523 of file ostream.
✨ std::operator<< — const signed char * string inserter 🦋
template<class _Traits > basic_ostream<char, _Traits>& std::operator<<
(basic_ostream< char, _Traits > & __out, const signed char * __s)
[inline]
String inserters — signed char sibling, same energy, different type 💫
Parameters:
out— an output streams— a character string
Returns: out
Precondition: s must be a non-NULL pointer ⚠️
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object with good status, this function inserts traits::length(s) characters starting at s, widened if necessary, followed by any required padding (as determined by [22.2.2.2.2]). out.width(0) is then called.
Definition at line 518 of file ostream.
✨ std::operator<< — const char * string inserter (char stream) 🌸
template<class _Traits > basic_ostream<char, _Traits>& std::operator<<
(basic_ostream< char, _Traits > & __out, const char * __s) [inline]
String inserters — the plain const char * classic, the original influencer of this whole family 👑
Parameters:
out— an output streams— a character string
Returns: out
Precondition: s must be a non-NULL pointer ⚠️
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object with good status, this function inserts traits::length(s) characters starting at s, widened if necessary, followed by any required padding (as determined by [22.2.2.2.2]). out.width(0) is then called.
Definition at line 505 of file ostream.
✨ std::operator<< — const char * string inserter (templated stream) 🧚
template<typename _CharT , typename _Traits > basic_ostream< _CharT, _Traits
> & std::operator<< (basic_ostream< _CharT, _Traits > & __out, const
char * __s) [inline]
String inserters — now with _CharT and _Traits in the mix, the glow-up version ✨
Parameters:
out— an output streams— a character string
Returns: out
Precondition: s must be a non-NULL pointer ⚠️
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object with good status, this function inserts traits::length(s) characters starting at s, widened if necessary, followed by any required padding (as determined by [22.2.2.2.2]). out.width(0) is then called.
Definition at line 321 of file ostream.tcc.
References: std::ios_base::badbit.
✨ std::operator<< — const _CharT * string inserter 💜
template<typename _CharT , typename _Traits > basic_ostream<_CharT,
_Traits>& std::operator<< (basic_ostream< _CharT, _Traits > & __out,
const _CharT * __s) [inline]
String inserters — the fully generic one, no cap it's giving "I work for every character type" 🦋
Parameters:
out— an output streams— a character string
Returns: out
Precondition: s must be a non-NULL pointer ⚠️
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object with good status, this function inserts traits::length(s) characters starting at s, widened if necessary, followed by any required padding (as determined by [22.2.2.2.2]). out.width(0) is then called.
Definition at line 488 of file ostream.
✨ std::operator<< — unsigned char character inserter 🌺
template<class _Traits > basic_ostream<char, _Traits>& std::operator<<
(basic_ostream< char, _Traits > & __out, unsigned char __c) [inline]
Character inserters — one single unsigned char, one single moment of fame 🎀
Parameters:
out— an output streamc— a character
Returns: out
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object with good status, this function inserts a single character and any required padding (as determined by [22.2.2.2.2]). out.width(0) is then called.
If c is of type char and the character type of the stream is not char, the character is widened before insertion.
Definition at line 468 of file ostream.
✨ std::operator<< — signed char character inserter 🍓
template<class _Traits > basic_ostream<char, _Traits>& std::operator<<
(basic_ostream< char, _Traits > & __out, signed char __c) [inline]
Character inserters — the signed char twin, equally adorable, equally single-character 💅
Parameters:
out— an output streamc— a character
Returns: out
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object with good status, this function inserts a single character and any required padding (as determined by [22.2.2.2.2]). out.width(0) is then called.
If c is of type char and the character type of the stream is not char, the character is widened before insertion.
Definition at line 463 of file ostream.
✨ std::operator<< — char character inserter (char stream) 🦋
template<class _Traits > basic_ostream<char, _Traits>& std::operator<<
(basic_ostream< char, _Traits > & __out, char __c) [inline]
Character inserters — plain char into a char stream, the simplest slay there is ⭐
Parameters:
out— an output streamc— a character
Returns: out
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object with good status, this function inserts a single character and any required padding (as determined by [22.2.2.2.2]). out.width(0) is then called.
If c is of type char and the character type of the stream is not char, the character is widened before insertion.
Definition at line 457 of file ostream.
✨ std::operator<< — char character inserter (templated stream) 🌈
template<typename _CharT , typename _Traits > basic_ostream<_CharT,
_Traits>& std::operator<< (basic_ostream< _CharT, _Traits > & __out,
char __c) [inline]
Character inserters — same single-char energy, but the stream can be any character type, versatility is the vibe ✨
Parameters:
out— an output streamc— a character
Returns: out
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object with good status, this function inserts a single character and any required padding (as determined by [22.2.2.2.2]). out.width(0) is then called.
If c is of type char and the character type of the stream is not char, the character is widened before insertion.
Definition at line 451 of file ostream.
✨ std::operator<< — _CharT character inserter 👑
template<typename _CharT , typename _Traits > basic_ostream<_CharT,
_Traits>& std::operator<< (basic_ostream< _CharT, _Traits > & __out,
_CharT __c) [inline]
Character inserters — the final boss of single-character insertion, _CharT straight into a matching stream 💜
Parameters:
out— an output streamc— a character
Returns: out
Behaves like one of the formatted arithmetic inserters described in std::basic_ostream. After constructing a sentry object with good status, this function inserts a single character and any required padding (as determined by [22.2.2.2.2]). out.width(0) is then called.
If c is of type char and the character type of the stream is not char, the character is widened before insertion.
Definition at line 446 of file ostream.
✨ std::operator<< — bitset I/O 🎀
template<class _CharT , class _Traits , size_t _Nb>
std::basic_ostream<_CharT, _Traits>& std::operator<<
(std::basic_ostream< _CharT, _Traits > & __os, const bitset< _Nb > &
__x) [inline]
Global I/O operators for bitsets — the "let me print my bits" pipeline 🌸
Direct I/O between streams and bitsets is supported. Output is straightforward. Input will skip whitespace, only accept '0' and '1' characters, and will only extract as many digits as the bitset will hold. lowkey picky but honestly same 💅
Definition at line 1374 of file bitset.
References: std::__ctype_abstract_base< _CharT >::widen().
✨ std::operator<= — vector edition 🦋
template<typename _Tp , typename _Alloc > bool std::operator<= (const
vector< _Tp, _Alloc > & __x, const vector< _Tp, _Alloc > & __y) [inline]
Based on operator<. that's the whole note, it's a reuse girlie ✨
Definition at line 1204 of file stl_vector.h.
✨ std::operator<= — stack edition 🥞
template<typename _Tp , typename _Seq > bool std::operator<= (const stack<
_Tp, _Seq > & __x, const stack< _Tp, _Seq > & __y) [inline]
Based on operator<. consistent, reliable, no drama 💖
Definition at line 271 of file stl_stack.h.
✨ std::operator<= — set edition 🌿
template<typename _Key , typename _Compare , typename _Alloc > bool
std::operator<= (const set< _Key, _Compare, _Alloc > & __x, const set<
_Key, _Compare, _Alloc > & __y) [inline]
Returns !(y < x). yes it's defined by what it's NOT, we love a negation-based queen 💅
Definition at line 677 of file stl_set.h.
✨ std::operator<= — queue edition 🎟️
template<typename _Tp , typename _Seq > bool std::operator<= (const queue<
_Tp, _Seq > & __x, const queue< _Tp, _Seq > & __y) [inline]
Based on operator<. first in first out but also first in this comparison doc 😌
Definition at line 306 of file stl_queue.h.
✨ std::operator<= — pair edition 👯
template<class _T1 , class _T2 > bool std::operator<= (const pair< _T1, _T2
> & __x, const pair< _T1, _T2 > & __y) [inline]
Uses operator< to find the result. two elements, one comparison, immaculate teamwork 🫶
Definition at line 171 of file stl_pair.h.
okay bestie, we're still deep in the comparison overloads and honestly? this is where it gets fun. every single one of these is [inline], every single one lives in a header file, and every single one has a line number we're gonna cite like the little citation girlies we are. let's go 💅
✨ operator<= — the "not greater than" girlies
no cap, this whole batch is just "is the left thing not bigger than the right thing" energy. same family, different containers. slay.
std::operator<= for multiset 🍓
template<typename _Key , typename _Compare , typename _Alloc > bool std::operator<= (const multiset< _Key, _Compare, _Alloc > & __x, const multiset< _Key, _Compare, _Alloc > & __y) [inline]
lowkey the chillest one in the group — it literally just returns !(y < x). that's the whole entire personality. iconic minimalism.
Definition at line 663 of file stl_multiset.h.
std::operator<= for multimap 🦋
template<typename _Key , typename _Tp , typename _Compare , typename _Alloc > bool std::operator<= (const multimap< _Key, _Tp, _Compare, _Alloc > & __x, const multimap< _Key, _Tp, _Compare, _Alloc > & __y) [inline]
this one's Based on operator<. so it's not out here inventing new math, it's just vibing off the less-than that already exists. we love a delegation queen.
Definition at line 766 of file stl_multimap.h.
std::operator<= for map 🌸
template<typename _Key , typename _Tp , typename _Compare , typename _Alloc > bool std::operator<= (const map< _Key, _Tp, _Compare, _Alloc > & __x, const map< _Key, _Tp, _Compare, _Alloc > & __y) [inline]
same story bestie — Based on operator<. map said "why reinvent the wheel when I can just borrow my sibling's". periodt.
Definition at line 837 of file stl_map.h.
std::operator<= for list 🎀
template<typename _Tp , typename _Alloc > bool std::operator<= (const list< _Tp, _Alloc > & __x, const list< _Tp, _Alloc > & __y) [inline]
also Based on operator<. lists stay consistent, lists stay humble. 💜
Definition at line 1504 of file stl_list.h.
std::operator<= for reverse_iterator (mixed iterator types) 🔥
template<typename _IteratorL , typename _IteratorR > bool std::operator<= (const reverse_iterator< _IteratorL > & __x, const reverse_iterator< _IteratorR > & __y) [inline]
okay so this one has the two-template-parameter glow-up (_IteratorL and _IteratorR can be different types, iykyk). here's the deal:
- Parameters:
x— Areverse_iterator.y— Areverse_iterator.
- Returns: A simple
bool.
and now the important lore: Reverse iterators forward many operations to their underlying base() iterators. Others are implemented in terms of one another. that's the whole mechanic, bestie — they're not doing the work themselves, they're forwarding it to base() like a good little delegate.
Definition at line 352 of file stl_iterator.h.
std::operator<= for reverse_iterator (same iterator type) 🫶
template<typename _Iterator > bool std::operator<= (const reverse_iterator< _Iterator > & __x, const reverse_iterator< _Iterator > & __y) [inline]
the single-parameter twin! same energy, same everything:
- Parameters:
x— Areverse_iterator.y— Areverse_iterator.
- Returns: A simple
bool.
and again, for the girlies in the back: Reverse iterators forward many operations to their underlying base() iterators. Others are implemented in terms of one another.
Definition at line 302 of file stl_iterator.h.
std::operator<= for deque 🌈
template<typename _Tp , typename _Alloc > bool std::operator<= (const deque< _Tp, _Alloc > & __x, const deque< _Tp, _Alloc > & __y) [inline]
Based on operator<. deque really said "same as everyone else, no notes". 💅
Definition at line 1788 of file stl_deque.h.
std::operator<= for forward_list ⭐
template<typename _Tp , typename _Alloc > bool std::operator<= (const forward_list< _Tp, _Alloc > & __lx, const forward_list< _Tp, _Alloc > & __ly) [inline]
Based on operator<. and yes bestie, the parameters here are named __lx and __ly — not __x and __y. don't come for me, that's literally what the header says. 👑
Definition at line 1277 of file forward_list.h.
std::operator<= : C string vs. basic_string 🧚
template<typename _CharT , typename _Traits , typename _Alloc > bool std::operator<= (const _CharT * __lhs, const basic_string< _CharT, _Traits, _Alloc > & __rhs) [inline]
the description is honestly so cute: Test if C string doesn't follow string.
- Parameters:
lhs— C string.rhs— String.
- Returns: True if
lhsdoesn't followrhs. False otherwise.
Definition at line 2416 of file basic_string.h.
References std::basic_string< _CharT, _Traits, _Alloc >::compare().
std::operator<= : basic_string vs. C string 🦋
template<typename _CharT , typename _Traits , typename _Alloc > bool std::operator<= (const basic_string< _CharT, _Traits, _Alloc > & __lhs, const _CharT * __rhs) [inline]
the flippity-flop version: Test if string doesn't follow C string.
- Parameters:
lhs— String.rhs— C string.
- Returns: True if
lhsdoesn't followrhs. False otherwise.
Definition at line 2404 of file basic_string.h.
std::operator<= : basic_string vs. basic_string 💖
template<typename _CharT , typename _Traits , typename _Alloc > bool std::operator<= (const basic_string< _CharT, _Traits, _Alloc > & __lhs, const basic_string< _CharT, _Traits, _Alloc > & __rhs) [inline]
string on string, the classic matchup: Test if string doesn't follow string.
- Parameters:
lhs— First string.rhs— Second string.
- Returns: True if
lhsdoesn't followrhs. False otherwise.
Definition at line 2392 of file basic_string.h.
💖 operator== — the equality girlies
okay NOW we're in the equality era and there are so many of them. grab a snack. 🍓
std::operator== for istream_iterator 🔥
template<typename _Tp , typename _CharT , typename _Traits , typename _Dist > bool std::operator== (const istream_iterator< _Tp, _CharT, _Traits, _Dist > & __x, const istream_iterator< _Tp, _CharT, _Traits, _Dist > & __y) [inline]
the rule here is genuinely so specific and I love it: Return true if x and y are both end or not end, or x and y are the same. so basically two stream iterators are "equal" if they're both sitting at end-of-stream, both not at end-of-stream, or literally the same iterator. the "both end or both not end" bit is doing so much heavy lifting. 😭
Definition at line 123 of file stream_iterator.h.
References std::istream_iterator< _Tp, _CharT, _Traits, _Dist >::_M_equal().
std::operator== for vector 🌸
template<typename _Tp , typename _Alloc > bool std::operator== (const vector< _Tp, _Alloc > & __x, const vector< _Tp, _Alloc > & __y) [inline]
Vector equality comparison.
- Parameters:
x— A vector.y— A vector of the same type asx.
- Returns: True iff the size and elements of the vectors are equal.
This is an equivalence relation. It is linear in the size of the vectors. Vectors are considered equivalent if their sizes are equal, and if corresponding elements compare equal. so yeah — same size, and every corresponding element compares equal. no shortcuts, no vibes-based comparison. 💅
Definition at line 1168 of file stl_vector.h.
References std::vector< _Tp, _Alloc >::begin(), std::vector< _Tp, _Alloc >::end(), equal(), and std::vector< _Tp, _Alloc >::size().
std::operator== for stack 🎀
template<typename _Tp , typename _Seq > bool std::operator== (const stack< _Tp, _Seq > & __x, const stack< _Tp, _Seq > & __y) [inline]
Stack equality comparison.
- Parameters:
x— A stack.y— A stack of the same type asx.
- Returns: True iff the size and elements of the stacks are equal.
here's the nuance bestie, listen up: This is an equivalence relation. Complexity and semantics depend on the underlying sequence type, but the expected rules are: this relation is linear in the size of the sequences, and stacks are considered equivalent if their sequences compare equal. so the expected rules are linear-time and sequence-equality-based — but the actual complexity/semantics come from whatever _Seq you stuffed in there. 👀
Definition at line 235 of file stl_stack.h.
References std::stack< _Tp, _Sequence >::c.
std::operator== for set 🦋
template<typename _Key , typename _Compare , typename _Alloc > bool std::operator== (const set< _Key, _Compare, _Alloc > & __x, const set< _Key, _Compare, _Alloc > & __y) [inline]
Set equality comparison.
- Parameters:
x— A set.y— A set of the same type asx.
- Returns: True iff the size and elements of the sets are equal.
This is an equivalence relation. It is linear in the size of the sets. Sets are considered equivalent if their sizes are equal, and if corresponding elements compare equal.
Definition at line 639 of file stl_set.h.
References std::set< _Key, _Compare, _Alloc >::_M_t.
std::operator== for queue ⭐
template<typename _Tp , typename _Seq > bool std::operator== (const queue< _Tp, _Seq > & __x, const queue< _Tp, _Seq > & __y) [inline]
Queue equality comparison.
- Parameters:
x— A queue.y— A queue of the same type asx.
- Returns: True iff the size and elements of the queues are equal.
same caveat as stack, fr fr: This is an equivalence relation. Complexity and semantics depend on the underlying sequence type, but the expected rules are: this relation is linear in the size of the sequences, and queues are considered equivalent if their sequences compare equal.
Definition at line 270 of file stl_queue.h.
References std::queue< _Tp, _Sequence >::c.
std::operator== for pair 🫶
template<class _T1 , class _T2 > bool std::operator== (const pair< _T1, _T2 > & __x, const pair< _T1, _T2 > & __y) [inline]
one line, zero drama: Two pairs of the same type are equal iff their members are equal. that's it. two things, both members gotta match. cute.
Definition at line 146 of file stl_pair.h.
References std::pair< _T1, _T2 >::first, and std::pair< _T1, _T2 >::second.
std::operator== for multiset 💜
template<typename _Key , typename _Compare , typename _Alloc > bool std::operator== (const multiset< _Key, _Compare, _Alloc > & __x, const multiset< _Key, _Compare, _Alloc > & __y) [inline]
Multiset equality comparison.
- Parameters:
x— A multiset.y— A multiset of the same type asx.
- Returns: True iff the size and elements of the multisets are equal.
This is an equivalence relation. It is linear in the size of the multisets. Multisets are considered equivalent if their sizes are equal, and if corresponding elements compare equal.
Definition at line 625 of file stl_multiset.h.
References std::multiset< _Key, _Compare, _Alloc >::_M_t.
std::operator== for multimap 🌈
template<typename _Key , typename _Tp , typename _Compare , typename _Alloc > bool std::operator== (const multimap< _Key, _Tp, _Compare, _Alloc > & __x, const multimap< _Key, _Tp, _Compare, _Alloc > & __y) [inline]
Multimap equality comparison.
- Parameters:
x— A multimap.y— A multimap of the same type asx.
- Returns: True iff the size and elements of the maps are equal.
This is an equivalence relation. It is linear in the size of the multimaps. Multimaps are considered equivalent if their sizes are equal, and if corresponding elements compare equal. (yes, the Returns line says "maps" — that's exactly what the page says, don't @ me 🙈)
Definition at line 728 of file stl_multimap.h.
References std::multimap< _Key, _Tp, _Compare, _Alloc >::_M_t.
std::operator== for map 👑
template<typename _Key , typename _Tp , typename _Compare , typename _Alloc > bool std::operator== (const map< _Key, _Tp, _Compare, _Alloc > & __x, const map< _Key, _Tp, _Compare, _Alloc > & __y) [inline]
Map equality comparison.
- Parameters:
x— A map.y— A map of the same type asx.
- Returns: True iff the size and elements of the maps are equal.
This is an equivalence relation. It is linear in the size of the maps. Maps are considered equivalent if their sizes are equal, and if corresponding elements compare equal.
Definition at line 799 of file stl_map.h.
References std::map< _Key, _Tp, _Compare, _Alloc >::_M_t.
std::operator== for list 🧚
template<typename _Tp , typename _Alloc > bool std::operator== (const list< _Tp, _Alloc > & __x, const list< _Tp, _Alloc > & __y) [inline]
List equality comparison.
- Parameters:
x— A list.y— A list of the same type asx.
- Returns: True iff the size and elements of the lists are equal.
This is an equivalence relation. It is linear in the size of the lists. Lists are considered equivalent if their sizes are equal, and if corresponding elements compare equal.
Definition at line 1456 of file stl_list.h.
References std::list< _Tp, _Alloc >::begin(), and std::list< _Tp, _Alloc >::end().
std::operator== for reverse_iterator (mixed iterator types) 😭
template<typename _IteratorL , typename _IteratorR > bool std::operator== (const reverse_iterator< _IteratorL > & __x, const reverse_iterator< _IteratorR > & __y) [inline]
- Parameters:
x— Areverse_iterator.y— Areverse_iterator.
- Returns: A simple
bool.
Reverse iterators forward many operations to their underlying base() iterators. Others are implemented in terms of one another.
Definition at line 328 of file stl_iterator.h.
References std::reverse_iterator< _Iterator >::base().
std::operator== for reverse_iterator (same iterator type) 💀
template<typename _Iterator > bool std::operator== (const reverse_iterator< _Iterator > & __x, const reverse_iterator< _Iterator > & __y) [inline]
the matching single-type version, and it's the same three facts every time, we love consistency:
- Parameters:
x— Areverse_iterator.y— Areverse_iterator.
- Returns: A simple
bool.
Reverse iterators forward many operations to their underlying base() iterators. Others are implemented in terms of one another.
Definition at line 278 of file stl_iterator.h.
References std::reverse_iterator< _Iterator >::base().
okay so the operator== parade is still going — deques, positions, forward lists, iterators, strings, and a function-wrapper NULL check all want their moment. Signatures stay exactly as written, bestie. 💅
template<typename _Tp , typename _Alloc > bool std::operator== (const deque< _Tp, _Alloc > & __x, const deque< _Tp, _Alloc > & __y) [inline]— Deque equality comparison.- Parameters:
x— a deque.y— a deque of the same type asx. - Returns: true iff the size and elements of the deques are equal.
- This is an equivalence relation. It is linear in the size of the deques. Deques are considered equivalent if their sizes are equal, and if corresponding elements compare equal.
- Definition at line 1748 of file
stl_deque.h. - References
std::deque< _Tp, _Alloc >::begin(),std::deque< _Tp, _Alloc >::end(),equal(), andstd::deque< _Tp, _Alloc >::size().
- Parameters:
template<typename _StateT > bool std::operator== (const fpos< _StateT > & __lhs, const fpos< _StateT > & __rhs) [inline]— Test if equivalent to another position.- Definition at line 216 of file
postypes.h.
- Definition at line 216 of file
template<typename _Tp , typename _Alloc > bool std::operator== (const forward_list< _Tp, _Alloc > & __lx, const forward_list< _Tp, _Alloc > & __ly) [inline]— Forward list equality comparison.- Parameters:
lx— aforward_list;ly— aforward_listof the same type aslx. - Returns: true iff the size and elements of the forward lists are equal.
- This is an equivalence relation. It is linear in the size of the forward lists. Deques are considered equivalent if corresponding elements compare equal. (yes, it says Deques here — I’m just the messenger 🫶)
- Definition at line 455 of file
forward_list.tcc. - References
std::forward_list< _Tp, _Alloc >::cbegin(), andstd::forward_list< _Tp, _Alloc >::cend().
- Parameters:
template<typename _Tp , typename _Alloc > bool std::operator== (const _Fwd_list_iterator< _Tp, _Alloc > & __x, const _Fwd_list_const_iterator< _Tp, _Alloc > & __y) [inline]— Forward list iterator equality comparison.- Definition at line 245 of file
forward_list.h. - References
std::_Fwd_list_const_iterator< _Tp, _Alloc >::_M_node, andstd::_Fwd_list_iterator< _Tp, _Alloc >::_M_node.
- Definition at line 245 of file
template<typename _CharT , typename _Traits , typename _Alloc > bool std::operator== (const basic_string< _CharT, _Traits, _Alloc > & __lhs, const _CharT * __rhs) [inline]— Test equivalence of string and C string.- Parameters:
lhs— String.rhs— C string. - Returns: true if
lhs.compare(rhs) == 0. False otherwise. - Definition at line 2268 of file
basic_string.h. - References
std::basic_string< _CharT, _Traits, _Alloc >::compare().
- Parameters:
template<typename _CharT , typename _Traits , typename _Alloc > bool std::operator== (const _CharT * __lhs, const basic_string< _CharT, _Traits, _Alloc > & __rhs) [inline]— Test equivalence of C string and string.- Parameters:
lhs— C string.rhs— String. - Returns: true if
rhs.compare(lhs) == 0. False otherwise. - Definition at line 2256 of file
basic_string.h. - References
std::basic_string< _CharT, _Traits, _Alloc >::compare().
- Parameters:
template<typename _CharT , typename _Traits , typename _Alloc > bool std::operator== (const basic_string< _CharT, _Traits, _Alloc > & __lhs, const basic_string< _CharT, _Traits, _Alloc > & __rhs) [inline]— Test equivalence of two strings.- Parameters:
lhs— First string.rhs— Second string. - Returns: true if
lhs.compare(rhs) == 0. False otherwise. - Definition at line 2235 of file
basic_string.h. - References
std::basic_string< _CharT, _Traits, _Alloc >::compare().
- Parameters:
template<typename _Signature > bool std::operator== (_M_clear_type *, const function< _Signature > & __f) [inline]— This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.- Definition at line 2096 of file
tr1_impl/functional.
- Definition at line 2096 of file
template<typename _Signature > bool std::operator== (const function< _Signature > & __f, _M_clear_type *) [inline]— Compares a polymorphic function object wrapper against 0 (the NULL pointer).- Returns: true if the wrapper has no target, false otherwise.
- This function will not throw an exception.
- Definition at line 2090 of file
tr1_impl/functional.
✨ now entering the operator> era ✨ — it’s giving “based on operator<” for days. 😭
template<typename _Tp , typename _Alloc > bool std::operator> (const vector< _Tp, _Alloc > & __x, const vector< _Tp, _Alloc > & __y) [inline]— Based onoperator<.- Definition at line 1198 of file
stl_vector.h.
- Definition at line 1198 of file
template<typename _Tp , typename _Seq > bool std::operator> (const stack< _Tp, _Seq > & __x, const stack< _Tp, _Seq > & __y) [inline]— Based onoperator<.- Definition at line 265 of file
stl_stack.h.
- Definition at line 265 of file
template<typename _Key , typename _Compare , typename _Alloc > bool std::operator> (const set< _Key, _Compare, _Alloc > & __x, const set< _Key, _Compare, _Alloc > & __y) [inline]— Returnsy < x.- Definition at line 670 of file
stl_set.h.
- Definition at line 670 of file
template<typename _Tp , typename _Seq > bool std::operator> (const queue< _Tp, _Seq > & __x, const queue< _Tp, _Seq > & __y) [inline]— Based onoperator<.- Definition at line 300 of file
stl_queue.h.
- Definition at line 300 of file
template<class _T1 , class _T2 > bool std::operator> (const pair< _T1, _T2 > & __x, const pair< _T1, _T2 > & __y) [inline]— Usesoperator<to find the result.- Definition at line 165 of file
stl_pair.h.
- Definition at line 165 of file
template<typename _Key , typename _Compare , typename _Alloc > bool std::operator> (const multiset< _Key, _Compare, _Alloc > & __x, const multiset< _Key, _Compare, _Alloc > & __y) [inline]— Returnsy < x.- Definition at line 656 of file
stl_multiset.h.
- Definition at line 656 of file
template<typename _Key , typename _Tp , typename _Compare , typename _Alloc > bool std::operator> (const multimap< _Key, _Tp, _Compare, _Alloc > & __x, const multimap< _Key, _Tp, _Compare, _Alloc > & __y) [inline]— Based onoperator<.- Definition at line 759 of file
stl_multimap.h.
- Definition at line 759 of file
template<typename _Key , typename _Tp , typename _Compare , typename _Alloc > bool std::operator> (const map< _Key, _Tp, _Compare, _Alloc > & __x, const map< _Key, _Tp, _Compare, _Alloc > & __y) [inline]— Based onoperator<.- Definition at line 830 of file
stl_map.h.
- Definition at line 830 of file
template<typename _Tp , typename _Alloc > bool std::operator> (const list< _Tp, _Alloc > & __x, const list< _Tp, _Alloc > & __y) [inline]— Based onoperator<.- Definition at line 1498 of file
stl_list.h.
- Definition at line 1498 of file
template<typename _IteratorL , typename _IteratorR > bool std::operator> (const reverse_iterator< _IteratorL > & __x, const reverse_iterator< _IteratorR > & __y) [inline]— Compares two reverse iterators.- Parameters:
x— Areverse_iterator.y— Areverse_iterator. - Returns: A simple
bool. - Reverse iterators forward many operations to their underlying
base()iterators. Others are implemented in terms of one another. - Definition at line 346 of file
stl_iterator.h.
- Parameters:
template<typename _Iterator > bool std::operator> (const reverse_iterator< _Iterator > & __x, const reverse_iterator< _Iterator > & __y) [inline]— Compares two reverse iterators.- Parameters:
x— Areverse_iterator.y— Areverse_iterator. - Returns: A simple
bool. - Reverse iterators forward many operations to their underlying
base()iterators. Others are implemented in terms of one another. - Definition at line 296 of file
stl_iterator.h.
- Parameters:
template<typename _Tp , typename _Alloc > bool std::operator> (const deque< _Tp, _Alloc > & __x, const deque< _Tp, _Alloc > & __y) [inline]— Based onoperator<.- Definition at line 1781 of file
stl_deque.h.
- Definition at line 1781 of file
template<typename _Tp , typename _Alloc > bool std::operator> (const forward_list< _Tp, _Alloc > & __lx, const forward_list< _Tp, _Alloc > & __ly) [inline]— Based onoperator<.- Definition at line 1263 of file
forward_list.h.
- Definition at line 1263 of file
template<typename _CharT , typename _Traits , typename _Alloc > bool std::operator> (const _CharT * __lhs, const basic_string< _CharT, _Traits, _Alloc > & __rhs) [inline]— Test if C string follows string.- Parameters:
lhs— C string.rhs— String. - Returns: true if
lhsfollowsrhs. False otherwise. - Definition at line 2379 of file
basic_string.h. - References
std::basic_string< _CharT, _Traits, _Alloc >::compare().
- Parameters:
template<typename _CharT , typename _Traits , typename _Alloc > bool std::operator> (const basic_string< _CharT, _Traits, _Alloc > & __lhs, const _CharT * __rhs) [inline]— Test if string follows C string.- Parameters:
lhs— String.rhs— C string. - Returns: true if
lhsfollowsrhs. False otherwise. - Definition at line 2367 of file
basic_string.h. - References
std::basic_string< _CharT, _Traits, _Alloc >::compare().
- Parameters:
template<typename _CharT , typename _Traits , typename _Alloc > bool std::operator> (const basic_string< _CharT, _Traits, _Alloc > & __lhs, const basic_string< _CharT, _Traits, _Alloc > & __rhs) [inline]— Test if string follows string.- Parameters:
lhs— First string.rhs— Second string. - Returns: true if
lhsfollowsrhs. False otherwise. - Definition at line 2355 of file
basic_string.h. - References
std::basic_string< _CharT, _Traits, _Alloc >::compare().
- Parameters:
💜 and finally, the operator>= girlies 💜 — same energy, slightly bigger or-equal. 🎀
template<typename _Tp , typename _Alloc > bool std::operator>= (const vector< _Tp, _Alloc > & __x, const vector< _Tp, _Alloc > & __y) [inline]— Based onoperator<.- Definition at line 1210 of file
stl_vector.h.
- Definition at line 1210 of file
template<typename _Tp , typename _Seq > bool std::operator>= (const stack< _Tp, _Seq > & __x, const stack< _Tp, _Seq > & __y) [inline]— Based onoperator<.- Definition at line 277 of file
stl_stack.h.
- Definition at line 277 of file
template<typename _Key , typename _Compare , typename _Alloc > bool std::operator>= (const set< _Key, _Compare, _Alloc > & __x, const set< _Key, _Compare, _Alloc > & __y) [inline]— Returns!(x < y).- Definition at line 684 of file
stl_set.h.
- Definition at line 684 of file
template<typename _Tp , typename _Seq > bool std::operator>= (const queue< _Tp, _Seq > & __x, const queue< _Tp, _Seq > & __y) [inline]— Based onoperator<.- Definition at line 312 of file
stl_queue.h.
- Definition at line 312 of file
template<class _T1 , class _T2 > bool std::operator>= (const pair< _T1, _T2 > & __x, const pair< _T1, _T2 > & __y) [inline]— Usesoperator<to find the result.- Definition at line 177 of file
stl_pair.h.
- Definition at line 177 of file
template<typename _Key , typename _Compare , typename _Alloc > bool std::operator>= (const multiset< _Key, _Compare, _Alloc > & __x, const multiset< _Key, _Compare, _Alloc > & __y) [inline]— Returns!(x < y).- Definition at line 670 of file
stl_multiset.h.
- Definition at line 670 of file
template<typename _Key , typename _Tp , typename _Compare , typename _Alloc > bool std::operator>= (const multimap< _Key, _Tp, _Compare, _Alloc > & __x, const multimap< _Key, _Tp, _Compare, _Alloc > & __y) [inline]— Based onoperator<.- Definition at line 773 of file
stl_multimap.h.
- Definition at line 773 of file
template<typename _Key , typename _Tp , typename _Compare , typename _Alloc > bool std::operator>= (const map< _Key, _Tp, _Compare, _Alloc > & __x, const map< _Key, _Tp, _Compare, _Alloc > & __y) [inline]— Based onoperator<.- Definition at line 844 of file
stl_map.h.
- Definition at line 844 of file
✨ std::operator>= — the list glow-up ✨
template<typename _Tp , typename _Alloc > bool std::operator>= (const list< _Tp, _Alloc > & __x, const list< _Tp, _Alloc > & __y) [inline]
okay so this one is literally just built on top of operator<, no cap — it's giving "I outsourced my whole personality to my sibling" and honestly? respect 💅
Definition at line 1510 of file stl_list.h.
🦋 std::operator>= for reverse_iterator (the two-template-param girlie) 🦋
template<typename _IteratorL , typename _IteratorR > bool std::operator>= (const reverse_iterator< _IteratorL > & __x, const reverse_iterator< _IteratorR > & __y) [inline]
Parameters bestie:
x— areverse_iterator.y— areverse_iterator.
Returns:
- A simple
bool. that's it. that's the whole vibe 🎀
Reverse iterators forward so many operations to their underlying base() iterators — like, they're delegating queens 👑 — and the others are implemented in terms of one another.
Definition at line 358 of file stl_iterator.h.
💖 std::operator>= for reverse_iterator (same-type edition) 💖
template<typename _Iterator > bool std::operator>= (const reverse_iterator< _Iterator > & __x, const reverse_iterator< _Iterator > & __y) [inline]
Parameters:
x— areverse_iterator.y— areverse_iterator.
Returns:
- A simple
bool. periodt ✨
Same lil story as above: reverse iterators forward many operations to their underlying base() iterators, and others are implemented in terms of one another.
Definition at line 308 of file stl_iterator.h.
🧚 std::operator>= — deque version 🧚
template<typename _Tp , typename _Alloc > bool std::operator>= (const deque< _Tp, _Alloc > & __x, const deque< _Tp, _Alloc > & __y) [inline]
Based on operator<. that's the whole lore 🫶
Definition at line 1795 of file stl_deque.h.
🌸 std::operator>= — forward_list version 🌸
template<typename _Tp , typename _Alloc > bool std::operator>= (const forward_list< _Tp, _Alloc > & __lx, const forward_list< _Tp, _Alloc > & __ly) [inline]
Based on operator< — she's a forward-thinking icon, literally, it's a forward list, iykyk 💀
Definition at line 1270 of file forward_list.h.
⭐ std::operator>= — C string vs. string ⭐
template<typename _CharT , typename _Traits , typename _Alloc > bool std::operator>= (const _CharT * __lhs, const basic_string< _CharT, _Traits, _Alloc > & __rhs) [inline]
Test if C string doesn't precede string. (very demure, very "not before you" 💅)
Parameters:
lhs— C string.rhs— String.
Returns:
Trueiflhsdoesn't precederhs.Falseotherwise.
Definition at line 2453 of file basic_string.h.
References std::basic_string< _CharT, _Traits, _Alloc >::compare().
🌈 std::operator>= — string vs. C string 🌈
template<typename _CharT , typename _Traits , typename _Alloc > bool std::operator>= (const basic_string< _CharT, _Traits, _Alloc > & __lhs, const _CharT * __rhs) [inline]
Test if string doesn't precede C string. the flip side of the coin bestie 🪙
Parameters:
lhs— String.rhs— C string.
Returns:
Trueiflhsdoesn't precederhs.Falseotherwise.
Definition at line 2441 of file basic_string.h.
References std::basic_string< _CharT, _Traits, _Alloc >::compare().
👑 std::operator>= — string vs. string 👑
template<typename _CharT , typename _Traits , typename _Alloc > bool std::operator>= (const basic_string< _CharT, _Traits, _Alloc > & __lhs, const basic_string< _CharT, _Traits, _Alloc > & __rhs) [inline]
Test if string doesn't precede string. main character energy meets main character energy, honestly obsessed 😭💖
Parameters:
lhs— First string.rhs— Second string.
Returns:
Trueiflhsdoesn't precederhs.Falseotherwise.
Definition at line 2429 of file basic_string.h.
References std::basic_string< _CharT, _Traits, _Alloc >::compare().
🎀 std::operator>> — read a stream into a __versa_string 🎀
template<typename _CharT , typename _Traits , typename _Alloc , template< typename, typename, typename > class _Base> basic_istream< _CharT, _Traits > & std::operator>> (basic_istream< _CharT, _Traits > & __is, __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base > & __str) [inline]
Read stream into a string. slurp it up bestie 🍓
Parameters:
__is— Input stream.__str— Buffer to store into.
Returns:
- Reference to the input stream.
So here's the tea: it stores characters from __is into __str until whitespace is found, the end of the stream is encountered, or str.max_size() is reached. If is.width() is non-zero, that is the limit on the number of characters stored into __str. Any previous contents of __str are erased — yes, wiped, gone, not me being dramatic, that's just what it does 💀
Definition at line 547 of file vstring.tcc.
💜 std::operator>> — read a stream into a basic_string 💜
template<typename _CharT , typename _Traits , typename _Alloc > basic_istream< _CharT, _Traits > & std::operator>> (basic_istream< _CharT, _Traits > & __is, basic_string< _CharT, _Traits, _Alloc > & __str) [inline]
Read stream into a string. the classic, the blueprint, the moment ✨
Parameters:
is— Input stream.str— Buffer to store into.
Returns:
- Reference to the input stream.
Stores characters from is into str until whitespace is found, the end of the stream is encountered, or str.max_size() is reached. If is.width() is non-zero, that is the limit on the number of characters stored into str. Any previous contents of str are erased. no cap, she clears the whole thing first 🙈
Definition at line 974 of file basic_string.tcc.
References std::basic_ios< _CharT, _Traits >::_M_setstate(), std::basic_string< _CharT, _Traits, _Alloc >::append(), std::basic_string< _CharT, _Traits, _Alloc >::erase(), std::ios_base::getloc(), std::basic_string< _CharT, _Traits, _Alloc >::max_size(), std::basic_ios< _CharT, _Traits >::rdbuf(), std::basic_ios< _CharT, _Traits >::setstate(), std::basic_streambuf< _CharT, _Traits >::sgetc(), std::basic_streambuf< _CharT, _Traits >::snextc(), and std::ios_base::width().
🫶 std::operator>> — character string extractor for signed char * 🫶
template<class _Traits > basic_istream<char, _Traits>& std::operator>> (basic_istream< char, _Traits > & __in, signed char * __s) [inline]
Character string extractors. plural, because she has sisters 👯♀️
Parameters:
in— An input stream.s— A pointer to a character array.
Returns:
in
Behaves like one of the formatted arithmetic extractors described in std::basic_istream. After constructing a sentry object with good status, this function extracts up to n characters and stores them into the array starting at s. n is defined as:
- if
width()is greater than zero, n iswidth() - otherwise n is 'the number of elements of the largest array of
char_typethat can store a terminatingeos.' [27.6.1.2.3]/6
Characters are extracted and stored until one of the following happens:
- n-1 characters are stored
EOFis reached- the next character is whitespace according to the current locale
- the next character is a null byte (i.e.,
charT())
width(0) is then called for the input stream. shaping the width back to zero, as she should 💅
If no characters are extracted, sets failbit. bestie fumbled the extraction? failbit. that's the rule 😭
Definition at line 750 of file istream.
🧚 std::operator>> — character string extractor for unsigned char * 🧚
template<class _Traits > basic_istream<char, _Traits>& std::operator>> (basic_istream< char, _Traits > & __in, unsigned char * __s) [inline]
Character string extractors. same energy, different char type 🌸
Parameters:
in— An input stream.s— A pointer to a character array.
Returns:
in
Behaves like one of the formatted arithmetic extractors described in std::basic_istream. After constructing a sentry object with good status, this function extracts up to n characters and stores them into the array starting at s. n is defined as:
- if
width()is greater than zero, n iswidth() - otherwise n is 'the number of elements of the largest array of
char_typethat can store a terminatingeos.' [27.6.1.2.3]/6
Characters are extracted and stored until one of the following happens:
- n-1 characters are stored
EOFis reached- the next character is whitespace according to the current locale
- the next character is a null byte (i.e.,
charT())
width(0) is then called for the input stream.
If no characters are extracted, sets failbit.
Definition at line 745 of file istream.
⭐ std::operator>> — character string extractor for plain char * (the template specialization) ⭐
template<> basic_istream<char>& std::operator>> (basic_istream< char > & __in, char * __s) [inline]
Character string extractors. yes she's a template<> specialization, yes she's iconic, no you can't sit with her 👑
Parameters:
in— An input stream.s— A pointer to a character array.
Returns:
in
Behaves like one of the formatted arithmetic extractors described in std::basic_istream. After constructing a sentry object with good status, this function extracts up to n characters and stores them into the array starting at s. n is defined as:
- if
width()is greater than zero, n iswidth() - otherwise n is 'the number of elements of the largest array of
char_typethat can store a terminatingeos.' [27.6.1.2.3]/6
Characters are extracted and stored until one of the following happens:
- n-1 characters are stored
EOFis reached- the next character is whitespace according to the current locale
- the next character is a null byte (i.e.,
charT())
width(0) is then called for the input stream.
If no characters are extracted, sets failbit.
notice this one has no "Definition at line …" note in the original, so don't come for me, I'm just reporting the facts 🫡
🌈 std::operator>> — character string extractor for _CharT * (the fully generic one) 🌈
template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits > & std::operator>> (basic_istream< _CharT, _Traits > & __in, _CharT * __s) [inline]
Character string extractors. the template-y blueprint that all the char-string girlies look up to 💖
Parameters:
in— An input stream.s— A pointer to a character array.
Returns:
in
Behaves like one of the formatted arithmetic extractors described in std::basic_istream. After constructing a sentry object with good status, this function extracts up to n characters and stores them into the array starting at s. n is defined as:
- if
width()is greater than zero, n iswidth() - otherwise n is 'the number of elements of the largest array of
char_typethat can store a terminatingeos.' [27.6.1.2.3]/6
Characters are extracted and stored until one of the following happens:
- n-1 characters are stored
EOFis reached- the next character is whitespace according to the current locale
- the next character is a null byte (i.e.,
charT())
width(0) is then called for the input stream.
If no characters are extracted, sets failbit.
Definition at line 885 of file istream.tcc.
References std::basic_ios< _CharT, _Traits >::_M_setstate(), std::ios_base::getloc(), std::basic_ios< _CharT, _Traits >::rdbuf(), std::basic_ios< _CharT, _Traits >::setstate(), std::basic_streambuf< _CharT, _Traits >::sgetc(), and std::ios_base::width().
🎀 std::operator>> — single character extractor for signed char & 🎀
template<class _Traits > basic_istream<char, _Traits>& std::operator>> (basic_istream< char, _Traits > & __in, signed char & __c) [inline]
Character extractors. one (1) character. a whole solo moment 💅
Parameters:
in— An input stream.c— A character reference.
Returns:
in
Behaves like one of the formatted arithmetic extractors described in std::basic_istream. After constructing a sentry object with good status, this function extracts a character (if one is available) and stores it in c. Otherwise, sets failbit in the input stream. and if there's literally nothing to grab? failbit. not her fault, the stream was empty 😭
Definition at line 704 of file istream.
🦋 std::operator>> — single character extractor for unsigned char & 🦋
template<class _Traits > basic_istream<char, _Traits>& std::operator>> (basic_istream< char, _Traits > & __in, unsigned char & __c) [inline]
Character extractors. same one-character serve, unsigned edition 🫶
Parameters:
in— An input stream.c— A character reference.
Returns:
in
Behaves like one of the formatted arithmetic extractors described in std::basic_istream. After constructing a sentry object with good status, this function extracts a character (if one is available) and stores it in c. Otherwise, sets failbit in the input stream.
Definition at line 699 of file istream.
✨ std::operator>> — character extractors
template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits > & std::operator>> (basic_istream< _CharT, _Traits > & __in, _CharT & __c) [inline]
okay so this one is a character extractor. It behaves like one of the formatted arithmetic extractors described in std::basic_istream. After constructing a sentry object with good status, this function extracts a character (if one is available) and stores it in c. Otherwise, it sets failbit in the input stream.
Parameters:
in— an input stream.c— a character reference.
Returns: in
Definition at line: 853 of file istream.tcc.
References: std::basic_ios< _CharT, _Traits >::_M_setstate(), std::basic_ios< _CharT, _Traits >::rdbuf(), std::basic_streambuf< _CharT, _Traits >::sbumpc(), and std::basic_ios< _CharT, _Traits >::setstate().
🎀 std::operator>> — global I/O for bitsets
template<class _CharT , class _Traits , size_t _Nb> std::basic_istream<_CharT, _Traits>& std::operator>> (std::basic_istream< _CharT, _Traits > & __is, bitset< _Nb > & __x) [inline]
bestie this is the global I/O operator for bitsets. Direct I/O between streams and bitsets is supported. Output is straightforward. Input will skip whitespace, only accept '0' and '1' characters, and will only extract as many digits as the bitset will hold.
Definition at line: 1306 of file bitset.
References: std::bitset< _Nb >::_M_copy_from_string(), std::basic_ios< _CharT, _Traits >::_M_setstate(), std::basic_string< _CharT, _Traits, _Alloc >::empty(), std::basic_string< _CharT, _Traits, _Alloc >::push_back(), std::basic_ios< _CharT, _Traits >::rdbuf(), std::basic_string< _CharT, _Traits, _Alloc >::reserve(), std::basic_streambuf< _CharT, _Traits >::sbumpc(), std::basic_ios< _CharT, _Traits >::setstate(), std::basic_streambuf< _CharT, _Traits >::sputbackc(), and std::basic_ios< _CharT, _Traits >::widen().
💅 std::operator^ — global bitwise XOR on bitsets
template<size_t _Nb> bitset<_Nb> std::operator^ (const bitset< _Nb > & __x, const bitset< _Nb > & __y) [inline]
Global bitwise operations on bitsets. These should be self-explanatory. no cap, it's just XOR behavior for bitsets.
Parameters:
x— a bitset.y— a bitset of the same size asx.
Returns: A new bitset.
Definition at line: 1287 of file bitset.
References: operator^().
Referenced by: operator^().
🦋 std::operator| — global bitwise OR on bitsets
template<size_t _Nb> bitset<_Nb> std::operator| (const bitset< _Nb > & __x, const bitset< _Nb > & __y) [inline]
Global bitwise operations on bitsets. These should be self-explanatory. OR vibes only.
Parameters:
x— a bitset.y— a bitset of the same size asx.
Returns: A new bitset.
Definition at line: 1278 of file bitset.
References: operator|().
Referenced by: operator|().
🌸 std::partial_sum — with binary operation
template<typename _InputIterator , typename _OutputIterator , typename _BinaryOperation > _OutputIterator std::partial_sum (_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOperation __binary_op) [inline]
Return list of partial sums. It accumulates the values in the range [first,last) using operator+(). As each successive input value is added into the total, that partial sum is written to result. Therefore, the first value in result is the first value of the input, the second value in result is the sum of the first and second input values, and so on.
Parameters:
first— start of input range.last— end of input range.result— output to write sums to.
Returns: Iterator pointing just beyond the values written to result.
Definition at line: 272 of file stl_numeric.h.
💖 std::partial_sum — without a binary operation
template<typename _InputIterator , typename _OutputIterator > _OutputIterator std::partial_sum (_InputIterator __first, _InputIterator __last, _OutputIterator __result) [inline]
Return list of partial sums. It accumulates the values in the range [first,last) using operator+(). As each successive input value is added into the total, that partial sum is written to result. Therefore, the first value in result is the first value of the input, the second value in result is the sum of the first and second input values, and so on.
Parameters:
first— start of input range.last— end of input range.result— output to write sums to.
Returns: Iterator pointing just beyond the values written to result.
Definition at line: 232 of file stl_numeric.h.
🎀 std::replace_copy — copy with replacements
template<typename _InputIterator , typename _OutputIterator , typename _Tp > _OutputIterator std::replace_copy (_InputIterator __first, _InputIterator __last, _OutputIterator __result, const _Tp & __old_value, const _Tp & __new_value) [inline]
Copy a sequence, replacing each element of one value with another value. It copies each element in the input range [first,last) to the output range [result,result+(last-first)), replacing elements equal to old_value with new_value.
Parameters:
first— an input iterator.last— an input iterator.result— an output iterator.old_value— the value to be replaced.new_value— the replacement value.
Returns: The end of the output sequence, result+(last-first).
Definition at line: 3804 of file stl_algo.h.
🧚 std::resetiosflags — manipulator for setf
_Resetiosflags std::resetiosflags (ios_base::fmtflags __mask) [inline]
Manipulator for setf. Sent to a stream object, this manipulator resets the specified flags, via stream.setf(0,mask).
Parameters:
mask— a format flags mask.
Definition at line: 59 of file iomanip.
🌈 std::return_temporary_buffer — the temp-buffer cleanup bestie
template<typename _Tp > void std::return_temporary_buffer (_Tp * __p) [inline]
The companion to get_temporary_buffer(). It frees the memory pointed to by p.
Parameters:
p— a buffer previously allocated byget_temporary_buffer.
Returns: None.
Definition at line: 112 of file stl_tempbuf.h.
Referenced by: std::_Temporary_buffer< _ForwardIterator, _Tp >::_Temporary_buffer().
💜 std::right — right-adjust that stream
ios_base& std::right (ios_base & __base) [inline]
Calls base.setf(ios_base::right, ios_base::adjustfield).
Definition at line: 928 of file ios_base.h.
References: std::ios_base::setf().
Referenced by: __gnu_parallel::LoserTree< false, T, Comparator >::init_winner(), and __gnu_parallel::parallel_partition().
⭐ std::scientific — scientific notation mode
ios_base& std::scientific (ios_base & __base) [inline]
Calls base.setf(ios_base::scientific, ios_base::floatfield).
Definition at line: 970 of file ios_base.h.
References: std::ios_base::setf().
Referenced by: operator<<().
👑 std::set_new_handler — swap out the new-handler
new_handler std::set_new_handler (new_handler) throw ()
Takes a replacement handler as the argument, returns the previous handler.
🍓 std::setbase — manipulator for setf
_Setbase std::setbase (int __base) [inline]
Manipulator for setf. Sent to a stream object, this manipulator changes the ios_base::basefield flags to oct, dec, or hex when base is 8, 10, or 16, accordingly, and to 0 if base is any other value.
Parameters:
base— a numeric base.
Definition at line: 128 of file iomanip.
🫶 std::setfill — manipulator for fill
template<typename _CharT > _Setfill<_CharT> std::setfill (_CharT __c) [inline]
Manipulator for fill. Sent to a stream object, this manipulator calls fill(c) for that object.
Parameters:
c— the new fill character.
Definition at line: 170 of file iomanip.
💀 std::setiosflags — manipulator for setf
_Setiosflags std::setiosflags (ios_base::fmtflags __mask) [inline]
Manipulator for setf. Sent to a stream object, this manipulator sets the format flags to mask.
Parameters:
mask— a format flags mask.
Definition at line: 93 of file iomanip.
💖 std::setprecision — manipulator for precision
_Setprecision std::setprecision (int __n) [inline]
Manipulator for precision. Sent to a stream object, this manipulator calls precision(n) for that object.
Parameters:
n— the new precision.
Definition at line: 204 of file iomanip.
✨ std::setw — manipulator for width
_Setw std::setw (int __n) [inline]
Manipulator for width. Sent to a stream object, this manipulator calls width(n) for that object.
Parameters:
n— the new width.
Definition at line: 238 of file iomanip.
🌸 std::showbase — show that base, periodt
ios_base& std::showbase (ios_base & __base) [inline]
Calls base.setf(ios_base::showbase).
Definition at line: 815 of file ios_base.h.
References: std::ios_base::setf().
Referenced by: noshowbase().
🦋 std::showpoint — show that decimal point
ios_base& std::showpoint (ios_base & __base) [inline]
Calls base.setf(ios_base::showpoint).
Definition at line: 831 of file ios_base.h.
References: std::ios_base::setf().
Referenced by: noshowpoint().
🌈 std::showpos — show that plus sign
ios_base& std::showpos (ios_base & __base) [inline]
Calls base.setf(ios_base::showpos).
Definition at line: 847 of file ios_base.h.
References: std::ios_base::setf().
Referenced by: noshowpos().
🧚 std::skipws — skip whitespace mode
ios_base& std::skipws (ios_base & __base) [inline]
Calls base.setf(ios_base::skipws).
Definition at line: 863 of file ios_base.h.
References: std::ios_base::setf().
Referenced by: noskipws(), and std::basic_istream< _CharT, _Traits >::basic_istream::sentry::sentry().
💅 std::swap — for vector
template<typename _Tp , typename _Alloc > void std::swap (vector< _Tp, _Alloc > & __x, vector< _Tp, _Alloc > & __y) [inline]
See std::vector::swap().
Definition at line: 1216 of file stl_vector.h.
References: std::vector< _Tp, _Alloc >::swap().
🎀 std::swap — for set
template<typename _Key , typename _Compare , typename _Alloc > void std::swap (set< _Key, _Compare, _Alloc > & __x, set< _Key, _Compare, _Alloc > & __y) [inline]
See std::set::swap().
Definition at line: 691 of file stl_set.h.
References: std::set< _Key, _Compare, _Alloc >::swap().
🍓 std::swap — for pair
template<class _T1 , class _T2 > void std::swap (pair< _T1, _T2 > & __x, pair< _T1, _T2 > & __y) [inline]
See std::pair::swap().
Definition at line: 186 of file stl_pair.h.
References: std::pair< _T1, _T2 >::swap().
💜 std::swap — for multiset
template<typename _Key , typename _Compare , typename _Alloc > void std::swap (multiset< _Key, _Compare, _Alloc > & __x, multiset< _Key, _Compare, _Alloc > & __y) [inline]
See std::multiset::swap().
Definition at line: 677 of file stl_multiset.h.
References: std::multiset< _Key, _Compare, _Alloc >::swap().
⭐ std::swap — for multimap
template<typename _Key , typename _Tp , typename _Compare , typename _Alloc > void std::swap (multimap< _Key, _Tp, _Compare, _Alloc > & __x, multimap< _Key, _Tp, _Compare, _Alloc > & __y) [inline]
See std::multimap::swap().
Definition at line: 780 of file stl_multimap.h.
References: std::multimap< _Key, _Tp, _Compare, _Alloc >::swap().
👑 std::swap — for map
template<typename _Key , typename _Tp , typename _Compare , typename _Alloc > void std::swap (map< _Key, _Tp, _Compare, _Alloc > & __x, map< _Key, _Tp, _Compare, _Alloc > & __y) [inline]
See std::map::swap().
Definition at line: 851 of file stl_map.h.
References: std::map< _Key, _Tp, _Compare, _Alloc >::swap().
🌸 std::swap — for list
template<typename _Tp , typename _Alloc > void std::swap (list< _Tp, _Alloc > & __x, list< _Tp, _Alloc > & __y) [inline]
See std::list::swap().
Definition at line: 1516 of file stl_list.h.
References: std::list< _Tp, _Alloc >::swap().
🦋 std::swap — for deque
template<typename _Tp , typename _Alloc > void std::swap (deque< _Tp, _Alloc > & __x, deque< _Tp, _Alloc > & __y) [inline]
See std::deque::swap().
- Where it lives:
stl_deque.h, line1802💅 - Calls:
std::deque< _Tp, _Alloc >::swap(). That's it, that's the whole personality.
🦋 std::swap (forward_list, the & + && one)
template<typename _Tp , typename _Alloc > void std::swap (forward_list< _Tp, _Alloc > & __lx, forward_list< _Tp, _Alloc > && __ly) [inline]
See std::forward_list::swap(). ✨
- Definition: line
1298of fileforward_list.h - References:
std::forward_list< _Tp, _Alloc >::swap()
🦋 std::swap (forward_list, the && + & one)
template<typename _Tp , typename _Alloc > void std::swap (forward_list< _Tp, _Alloc > && __lx, forward_list< _Tp, _Alloc > & __ly) [inline]
See std::forward_list::swap(). Same energy, arguments flipped. 🫶
- Definition: line
1291of fileforward_list.h
🦋 std::swap (forward_list, both & bestie)
template<typename _Tp , typename _Alloc > void std::swap (forward_list< _Tp, _Alloc > & __lx, forward_list< _Tp, _Alloc > & __ly) [inline]
See std::forward_list::swap(). ✨
- Definition: line
1284of fileforward_list.h - References:
std::forward_list< _Tp, _Alloc >::swap()
💖 std::swap — the string one
template<typename _CharT , typename _Traits , typename _Alloc > void std::swap (basic_string< _CharT, _Traits, _Alloc > & __lhs, basic_string< _CharT, _Traits, _Alloc > & __rhs) [inline]
Swap contents of two strings. Literally the glow-up your two strings needed. 🌸
Parameters:
- lhs — First string.
- rhs — Second string.
Exchanges the contents of lhs and rhs in constant time. No cap, that's the whole flex. 🔥
- Definition: line
2466of filebasic_string.h - References:
std::basic_string< _CharT, _Traits, _Alloc >::swap()
👑 std::swap — the generic one
template<typename _Tp > void std::swap (_Tp & __a, _Tp & __b) [inline]
Swaps two values. The blueprint. The main character. 💜
Parameters:
- a — A thing of arbitrary type.
- b — Another thing of arbitrary type.
Returns: Nothing. (she gives you vibes, not a return value 💅)
- Definition: line
76of filemove.h
🎀 std::swap — the function one
template<typename _Signature > void std::swap (function< _Signature > & __x, function< _Signature > & __y) [inline]
Swap the targets of two polymorphic function object wrappers. ✨
This function will not throw an exception. Iconic behaviour, honestly. 🧚
- Definition: line
2126of filetr1_impl/functional
🌷 std::tolower
template<typename _CharT > _CharT std::tolower (_CharT __c, const locale & __loc) [inline]
Convenience interface to ctype.tolower(__c). That's it, bestie — a little shortcut so you don't gotta go digging for the facet yourself. 🍓
- Definition: line
2593of filelocale_facets.h - Referenced by:
std::regex_traits< _Ch_type >::translate_nocase()
🌷 std::toupper
template<typename _CharT > _CharT std::toupper (_CharT __c, const locale & __loc) [inline]
Convenience interface to ctype.toupper(__c). Same deal, uppercase edition. 💅
- Definition: line
2587of filelocale_facets.h
🌈 std::uninitialized_copy
template<typename _InputIterator , typename _ForwardIterator > _ForwardIterator std::uninitialized_copy (_InputIterator __first, _InputIterator __last, _ForwardIterator __result) [inline]
Copies the range [first,last) into result. 🦋
Parameters:
- first — An input iterator.
- last — An input iterator.
- result — An output iterator.
Returns: result + (first - last)
Like copy(), but does not require an initialized output range. So it's the copy that doesn't mind showing up to an empty apartment. 🙈
- Definition: line
107of filestl_uninitialized.h - Referenced by:
__gnu_parallel::parallel_sort_mwms_pu()
🌈 std::uninitialized_copy_n
template<typename _InputIterator , typename _Size , typename _ForwardIterator > _ForwardIterator std::uninitialized_copy_n (_InputIterator __first, _Size __n, _ForwardIterator __result) [inline]
Copies the range [first,first+n) into result. ✨
Parameters:
- first — An input iterator.
- n — The number of elements to copy.
- result — An output iterator.
Returns: result + n
Like copy_n(), but does not require an initialized output range. Same unbothered energy. 🫶
- Definition: line
470of filestl_uninitialized.h - References:
__iterator_category()
💜 std::uninitialized_fill
template<typename _ForwardIterator , typename _Tp > void std::uninitialized_fill (_ForwardIterator __first, _ForwardIterator __last, const _Tp & __x) [inline]
Copies the value x into the range [first,last). 😭 it's so simple. it's so pretty.
Parameters:
- first — An input iterator.
- last — An input iterator.
- x — The source value.
Returns: Nothing.
Like fill(), but does not require an initialized output range. 🌸
- Definition: line
164of filestl_uninitialized.h
💜 std::uninitialized_fill_n
template<typename _ForwardIterator , typename _Size , typename _Tp > void std::uninitialized_fill_n (_ForwardIterator __first, _Size __n, const _Tp & __x) [inline]
Copies the value x into the range [first,first+n). 🎀
Parameters:
- first — An input iterator.
- n — The number of copies to make.
- x — The source value.
Returns: Nothing.
Like fill_n(), but does not require an initialized output range. ⭐
- Definition: line
218of filestl_uninitialized.h - Referenced by:
std::_Temporary_buffer< _ForwardIterator, _Tp >::_Temporary_buffer()
🔥 std::unitbuf
ios_base& std::unitbuf (ios_base & __base) [inline]
Calls base.setf(ios_base::unitbuf). Flush after every single output, no chill whatsoever — and honestly? We respect it. 💅
- Definition: line
895of fileios_base.h - References:
std::ios_base::setf() - Referenced by:
nounitbuf(), andstd::basic_ostream< _CharT, _Traits >::basic_ostream::sentry::~sentry()
🔥 std::uppercase
ios_base& std::uppercase (ios_base & __base) [inline]
Calls base.setf(ios_base::uppercase). LOUD MODE. 📣
- Definition: line
879of fileios_base.h - References:
std::ios_base::setf() - Referenced by:
nouppercase()
💎 std::use_facet
template<typename _Facet > const _Facet & std::use_facet (const locale & __loc) [inline]
Return a facet. 💫
use_facet looks for and returns a reference to a facet of type Facet where Facet is the template parameter. If has_facet(locale) is true, there is a suitable facet to return. It throws std::bad_cast if the locale doesn't contain a facet of type Facet.
Parameters:
- Facet — The facet type to access.
- locale — The locale to use.
Returns: Reference to facet of type Facet.
Exceptions: std::bad_cast if locale doesn't contain a facet of type Facet. 😭 rude but fair.
- Definition: line
105of filelocale_classes.tcc - References:
std::locale::_M_impl - Referenced by:
std::regex_traits< _Ch_type >::isctype(),std::regex_traits< _Ch_type >::transform(), andstd::regex_traits< _Ch_type >::translate_nocase()
🧚 std::ws
template<typename _CharT , typename _Traits > basic_istream< _CharT, _Traits > & std::ws (basic_istream< _CharT, _Traits > & __is) [inline]
Quick and easy way to eat whitespace. 🍽️ literally devouring the spaces so your parse doesn't choke.
This manipulator extracts whitespace characters, stopping when the next character is non-whitespace, or when the input sequence is empty. If the sequence is empty, eofbit is set in the stream, but not failbit. Noted. 📝
The current locale is used to distinguish whitespace characters. 🌍
Example:
MyClass mc;
std::cin >> std::ws >> mc;
will skip leading whitespace before calling operator>> on cin and your object. Note that the same effect can be achieved by creating a std::basic_istream::sentry inside your definition of operator>>. iykyk 🫶
- Definition: line
946of fileistream.tcc - References:
std::ios_base::getloc(),std::basic_ios< _CharT, _Traits >::rdbuf(),std::basic_ios< _CharT, _Traits >::setstate(), andstd::basic_streambuf< _CharT, _Traits >::sgetc()
✨ VARIABLE DOCUMENTATION ✨
These are the four stream besties you've literally been using since day one, plus their wide-char cousins. 🌈
🌟 std::cerr
ostream std::cerr
Linked to standard error (unbuffered). She does not wait. She does not buffer. She speaks immediately. 💅
🌟 std::cin
istream std::cin
Linked to standard input. The one you >> into constantly. 🍓
🌟 std::clog
ostream std::clog
Linked to standard error (buffered). Same error energy, but she takes a sec to gather her thoughts. 🎀
🌟 std::cout
ostream std::cout
Linked to standard output. The icon. The legend. The one behind every std::cout << "hello". 👑
🌟 std::wcerr
wostream std::wcerr
Linked to standard error (unbuffered). Wide-char cerr, same zero-patience vibe. 💜
🌟 std::wcin
wistream std::wcin
Linked to standard input. Wide-char edition. 🦋
🌟 std::wclog
wostream std::wclog
Linked to standard error (buffered). Wide-char, but make it patient. 🌸
🌟 std::wcout
wostream std::wcout
Linked to standard output. Wide-char main character energy. ⭐
✨ AUTHOR ✨
Generated automatically by Doxygen for libstdc++ from the source code. 🤖 no human wrote this bit, it's the compiler's little diary entry. slay.
And that's a wrap on the whole page, bestie!! 🎉💖 You made it to the very end — the source is libstdc++ and this generation is dated 21 Apr 2009, so like, this manual is older than most of us but it still ate. periodt. 💅✨🎀
📦 where this page comes from
- nixpkgs unstable: std-man-pages 4.4.0
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms