std::experimental(3cxx)

๐ŸŒธ std::experimental โ€” ok bestie, welcome to the 3cxx zone ๐Ÿฆ‹

So this is the manual page for std::experimental (that's the page header, std::experimental(3cxx), in case you were wondering ๐Ÿ’…). Lowkey it's a namespace, and here's the whole vibe:

โœจ NAME โœจ

std::experimental โ€” the namespace where all the features living in the ISO Technical Specifications hang out. It's giving "the beta-testing era of the standard library," no cap ๐Ÿ‘‘


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

๐Ÿ’– Classes

  • class any โ€” a container of any type, but type-safe about it. Iconic behaviour honestly ๐Ÿซถ
  • class bad_any_cast โ€” the exception class that gets thrown when an any_cast goes wrong. It's giving "oops, wrong type" energy ๐Ÿ˜ญ
  • class bad_optional_access โ€” the exception class thrown when you dereference an optional object that's disengaged (aka empty). Bestie, do the vibe check first ๐Ÿ™ˆ
  • class basic_string_view โ€” a non-owning reference to a string. It's literally just looking respectfully ๐Ÿ‘€
  • struct in_place_t โ€” tag type for in-place construction โœจ
  • struct nullopt_t โ€” tag type used to disengage optional objects ๐Ÿ”‡
  • class optional โ€” class template for optional values. Main character energy fr ๐ŸŽ€
  • class ostream_joiner โ€” an output iterator that inserts a delimiter between elements. Obsessed with the separator aesthetic ๐Ÿ’…
  • struct owner_less< shared_ptr< _Tp > > โ€” the partial specialization of owner_less for shared_ptr ๐Ÿ‘‘
  • struct owner_less< weak_ptr< _Tp > > โ€” the partial specialization of owner_less for weak_ptr ๐ŸŒธ
  • class propagate_const โ€” a const-propagating wrapper. It carries that const energy everywhere it goes โญ

๐ŸŒˆ Typedefs

These ones are long, so I'm giving them their own little spotlight, per usual ๐Ÿ’œ

template<typename _RAIter , typename _Hash , typename _Pred , typename
    _Val  = typename iterator_traits<_RAIter>::value_type, typename
    _Diff  = typename iterator_traits<_RAIter>::difference_type> using
    __boyer_moore_base_t = std::__conditional_t< std::__is_byte_like<
    _Val, _Pred >::value, __boyer_moore_array_base< _Diff, 256, _Pred >,
    __boyer_moore_map_base< _Val, _Diff, _Hash, _Pred > >

That's __boyer_moore_base_t โ€” tbh it's a whole mouthful but she's doing her best ๐Ÿซถ

template<typename _Tp > using __propagate_const_elem_type =
    remove_reference_t< decltype(*std::declval< _Tp & >())>

That one's __propagate_const_elem_type โ€” yes, the template gymnastics are real, and yes, it slays โœจ

Then we've got the shorter ones, all copy-paste exact and cute:

  • using erased_type = std::__erased_type โ€” the erased type, slay ๐Ÿ’€ (well, erased, not dead โ€” don't come for me)
  • using string_view = basic_string_view< char > โ€” the char flavour of basic_string_view ๐Ÿ“
  • using u16string_view = basic_string_view< char16_t > โ€” the char16_t flavour ๐ŸŒธ
  • using u32string_view = basic_string_view< char32_t > โ€” the char32_t flavour ๐Ÿฆ‹
  • using wstring_view = basic_string_view< wchar_t > โ€” the wchar_t flavour ๐ŸŒŸ

ok that's the classes-and-typedefs part sorted, and there's more coming so don't go anywhere ๐Ÿ’–

โœจ Functions โœจ

okay bestie, this is the big one โ€” the whole function roster. it's long, it's alphabetical-ish, and yes we're doing all of it. no skipping. grab a snack ๐Ÿ“

  • template<typename _Fn , typename _Tuple , std::size_t... _Idx> constexpr decltype(auto) __apply_impl (_Fn &&__f, _Tuple &&__t, std::index_sequence< _Idx... >) โ€” internal helper, double underscore club, you're not supposed to touch it but she's here and she's doing her job ๐Ÿ’…
  • template<typename _Tp , size_t _Nm, size_t... _Idx> constexpr array< remove_cv_t< _Tp >, _Nm > __to_array (_Tp(&__a)[_Nm], index_sequence< _Idx... >) โ€” another internal, the behind-the-scenes friend doing the heavy lifting ๐Ÿซถ
  • std::default_random_engine & _S_randint_engine () โ€” internal engine accessor, living that reserved-name life โœจ
  • template<typename _ValueType > _ValueType any_cast (const any &__any) โ€” Access the contained object. literally just pulls the thing back out of your any, iconic behavior ๐Ÿ‘‘

okay next up, the apply + shared_ptr atomic squad, because std::experimental said "what if shared_ptr was atomic, but like, a whole list of functions about it" ๐Ÿ˜ญ

  • template<typename _Fn , typename _Tuple > constexpr decltype(auto) apply (_Fn &&__f, _Tuple &&__t) โ€” call __f with the tuple __t unpacked, the classic โœจ
  • template<typename _Tp > bool atomic_compare_exchange_strong (shared_ptr< _Tp > *__p, shared_ptr< _Tp > *__v, shared_ptr< _Tp > __w) โ€” strong CAS on a shared_ptr
  • template<typename _Tp > bool atomic_compare_exchange_strong_explicit (shared_ptr< _Tp > *__p, shared_ptr< _Tp > *__v, shared_ptr< _Tp > __w, memory_order __success, memory_order __failure) โ€” same, but explicit about your memory_order __success / __failure, she communicates ๐ŸŒธ
  • template<typename _Tp > bool atomic_compare_exchange_weak (shared_ptr< _Tp > *__p, shared_ptr< _Tp > *__v, shared_ptr< _Tp > __w) โ€” the weak version, may fail spuriously, that's just her vibe ๐Ÿ™ˆ
  • template<typename _Tp > bool atomic_compare_exchange_weak_explicit (shared_ptr< _Tp > *__p, shared_ptr< _Tp > *__v, shared_ptr< _Tp > __w, memory_order __success, memory_order __failure) โ€” weak + explicit, the full combo meal ๐Ÿ“
  • template<typename _Tp > void atomic_exchange (shared_ptr< _Tp > *__p, shared_ptr< _Tp > __r) โ€” swap the pointer out atomically
  • template<typename _Tp > shared_ptr< _Tp > atomic_exchange_explicit (const shared_ptr< _Tp > *__p, shared_ptr< _Tp > __r, memory_order __mo) โ€” same energy, now with a memory_order __mo of your choosing โญ
  • template<typename _Tp > bool atomic_is_lock_free (const shared_ptr< _Tp > *__p) โ€” asks the real question: is it lock free? ๐Ÿ’€
  • template<typename _Tp > shared_ptr< _Tp > atomic_load (const shared_ptr< _Tp > *__p) โ€” load it atomically
  • template<typename _Tp > shared_ptr< _Tp > atomic_load_explicit (const shared_ptr< _Tp > *__p, memory_order __mo) โ€” load, but explicit, with __mo
  • template<typename _Tp > void atomic_store (shared_ptr< _Tp > *__p, shared_ptr< _Tp > __r) โ€” store it atomically
  • template<typename _Tp > shared_ptr< _Tp > atomic_store_explicit (const shared_ptr< _Tp > *__p, shared_ptr< _Tp > __r, memory_order __mo) โ€” store, explicit, __mo, you know the drill ๐Ÿ’…

pointer cast besties ๐Ÿฆ‹

  • template<typename _Tp , typename _Tp1 > shared_ptr< _Tp > const_pointer_cast (const shared_ptr< _Tp1 > &__r) noexcept โ€” casts away const-ness on a shared_ptr, and yes she's noexcept
  • template<typename _Tp , typename _Tp1 > shared_ptr< _Tp > dynamic_pointer_cast (const shared_ptr< _Tp1 > &__r) noexcept โ€” the dynamic_cast equivalent for shared_ptr, also noexcept

now the erase / erase_if era. this is the part where the page just goes off with template parameters, and honestly? she ate ๐Ÿ”ฅ

  • template<typename _CharT , typename _Traits , typename _Alloc , typename _Up > void erase (basic_string< _CharT, _Traits, _Alloc > &__cont, const _Up &__value) โ€” erase matching values from a basic_string
  • template<typename _Tp , typename _Alloc , typename _Up > void erase (deque< _Tp, _Alloc > &__cont, const _Up &__value) โ€” erase matching values from a deque
  • template<typename _Tp , typename _Alloc , typename _Up > void erase (forward_list< _Tp, _Alloc > &__cont, const _Up &__value) โ€” erase matching values from a forward_list
  • template<typename _Tp , typename _Alloc , typename _Up > void erase (list< _Tp, _Alloc > &__cont, const _Up &__value) โ€” erase matching values from a list
  • template<typename _Tp , typename _Alloc , typename _Up > void erase (vector< _Tp, _Alloc > &__cont, const _Up &__value) โ€” erase matching values from a vector

and the predicate versions, aka erase_if, the whole squad ๐ŸŒˆ

  • template<typename _CharT , typename _Traits , typename _Alloc , typename _Predicate > void erase_if (basic_string< _CharT, _Traits, _Alloc > &__cont, _Predicate __pred) โ€” erase everything matching __pred from a basic_string
  • template<typename _Tp , typename _Alloc , typename _Predicate > void erase_if (deque< _Tp, _Alloc > &__cont, _Predicate __pred) โ€” same, for deque
  • template<typename _Tp , typename _Alloc , typename _Predicate > void erase_if (forward_list< _Tp, _Alloc > &__cont, _Predicate __pred) โ€” same, for forward_list
  • template<typename _Tp , typename _Alloc , typename _Predicate > void erase_if (list< _Tp, _Alloc > &__cont, _Predicate __pred) โ€” same, for list
  • template<typename _Key , typename _Tp , typename _Compare , typename _Alloc , typename _Predicate > void erase_if (map< _Key, _Tp, _Compare, _Alloc > &__cont, _Predicate __pred) โ€” same, for map
  • template<typename _Key , typename _Tp , typename _Compare , typename _Alloc , typename _Predicate > void erase_if (multimap< _Key, _Tp, _Compare, _Alloc > &__cont, _Predicate __pred) โ€” same, for multimap
  • template<typename _Key , typename _Compare , typename _Alloc , typename _Predicate > void erase_if (multiset< _Key, _Compare, _Alloc > &__cont, _Predicate __pred) โ€” same, for multiset
  • template<typename _Key , typename _Compare , typename _Alloc , typename _Predicate > void erase_if (set< _Key, _Compare, _Alloc > &__cont, _Predicate __pred) โ€” same, for set
  • template<typename _Key , typename _Tp , typename _Hash , typename _CPred , typename _Alloc , typename _Predicate > void erase_if (unordered_map< _Key, _Tp, _Hash, _CPred, _Alloc > &__cont, _Predicate __pred) โ€” same, for unordered_map
  • template<typename _Key , typename _Tp , typename _Hash , typename _CPred , typename _Alloc , typename _Predicate > void erase_if (unordered_multimap< _Key, _Tp, _Hash, _CPred, _Alloc > &__cont, _Predicate __pred) โ€” same, for unordered_multimap
  • template<typename _Key , typename _Hash , typename _CPred , typename _Alloc , typename _Predicate > void erase_if (unordered_multiset< _Key, _Hash, _CPred, _Alloc > &__cont, _Predicate __pred) โ€” same, for unordered_multiset
  • template<typename _Key , typename _Hash , typename _CPred , typename _Alloc , typename _Predicate > void erase_if (unordered_set< _Key, _Hash, _CPred, _Alloc > &__cont, _Predicate __pred) โ€” same, for unordered_set
  • template<typename _Tp , typename _Alloc , typename _Predicate > void erase_if (vector< _Tp, _Alloc > &__cont, _Predicate __pred) โ€” same, for vector

okay that was a lot but we got through it together ๐Ÿซถ


  • template<typename _Mn , typename _Nn > constexpr common_type_t< _Mn, _Nn > gcd (_Mn __m, _Nn __n) noexcept โ€” Greatest common divisor. yes, the math one, she's constexpr AND noexcept, overachiever โœจ
  • template<typename _Del , typename _Tp > _Del * get_deleter (const shared_ptr< _Tp > &__p) noexcept โ€” C++14 20.8.2.2.10. (the original literally cites that, so here it is verbatim, iykyk ๐Ÿ’…)
  • template<typename _Tp > constexpr const _Tp & get_underlying (const propagate_const< _Tp > &__pt) noexcept โ€” grab the underlying thing out of a propagate_const, const flavored
  • template<typename _Tp > constexpr _Tp & get_underlying (propagate_const< _Tp > &__pt) noexcept โ€” same, non-const flavored
  • template<typename _Mn , typename _Nn > constexpr common_type_t< _Mn, _Nn > lcm (_Mn __m, _Nn __n) โ€” Least common multiple. sister of gcd, no noexcept on this one, notice that ๐Ÿ‘€

make_ function factories, my beloved ๐ŸŽ€

  • template<typename _Dest = void, typename... _Types> constexpr array< typename __make_array_elem< _Dest, _Types... >::type, sizeof...(_Types)> make_array (_Types &&... __t) โ€” Create a std::array from a variable-length list of arguments. like, the most convenient thing ever, obsessed ๐Ÿ’–
  • template<typename _RAIter , typename _Hash = std::hash<typename std::iterator_traits<_RAIter>::value_type>, typename _BinaryPredicate = equal_to<>> boyer_moore_horspool_searcher< _RAIter, _Hash, _BinaryPredicate > make_boyer_moore_horspool_searcher (_RAIter __pat_first, _RAIter __pat_last, _Hash __hf=_Hash(), _BinaryPredicate __pred=_BinaryPredicate()) โ€” Generator function for boyer_moore_horspool_searcher. note the defaults: __hf=_Hash() and __pred=_BinaryPredicate() ๐ŸŒธ
  • template<typename _RAIter , typename _Hash = std::hash<typename std::iterator_traits<_RAIter>::value_type>, typename _BinaryPredicate = equal_to<>> boyer_moore_searcher< _RAIter, _Hash, _BinaryPredicate > make_boyer_moore_searcher (_RAIter __pat_first, _RAIter __pat_last, _Hash __hf=_Hash(), _BinaryPredicate __pred=_BinaryPredicate()) โ€” Generator function for boyer_moore_searcher. the non-horspool one, equally iconic ๐Ÿ‘‘
  • template<typename _ForwardIterator , typename _BinaryPredicate = std::equal_to<>> default_searcher< _ForwardIterator, _BinaryPredicate > make_default_searcher (_ForwardIterator __pat_first, _ForwardIterator __pat_last, _BinaryPredicate __pred=_BinaryPredicate()) โ€” Generator function for default_searcher. the og, no fancy algorithm, just vibes โญ
  • template<typename _Tp > observer_ptr< _Tp > make_observer (_Tp *__p) noexcept โ€” wraps your raw pointer into an observer_ptr, noexcept, no cap
  • template<typename _CharT , typename _Traits , typename _DelimT > ostream_joiner< decay_t< _DelimT >, _CharT, _Traits > make_ostream_joiner (basic_ostream< _CharT, _Traits > &__os, _DelimT &&__delimiter) โ€” Object generator for ostream_joiner. so you can print a range with delimiters and serve looks while doing it ๐Ÿ’…

okay now the operator wall. comparison operators for DAYS. stay with me bestie ๐Ÿ˜ญ

  • template<typename _CharT , typename _Traits > constexpr bool operator!= (__type_identity_t< basic_string_view< _CharT, _Traits > > __x, basic_string_view< _CharT, _Traits > __y) noexcept โ€” string_view not-equal, identity-typed left side
  • template<typename _CharT , typename _Traits > constexpr bool operator!= (basic_string_view< _CharT, _Traits > __x, __type_identity_t< basic_string_view< _CharT, _Traits > > __y) noexcept โ€” and the mirrored version, because overload resolution said "both" ๐Ÿฆ‹
  • template<typename _CharT , typename _Traits > constexpr bool operator!= (basic_string_view< _CharT, _Traits > __x, basic_string_view< _CharT, _Traits > __y) noexcept โ€” plain old string_view != string_view
  • template<typename _Tp , typename _Up > constexpr bool operator!= (const _Tp &__t, const propagate_const< _Up > &__pu) โ€” propagate_const mixed comparison, left side raw
  • template<typename _Tp , typename _Up > constexpr bool operator!= (const propagate_const< _Tp > &__pt, const _Up &__u) โ€” mixed comparison, propagate_const on the left
  • template<typename _Tp , typename _Up > constexpr bool operator!= (const propagate_const< _Tp > &__pt, const propagate_const< _Up > &__pu) โ€” both sides propagate_const
  • template<typename _Tp > constexpr bool operator!= (const propagate_const< _Tp > &__pt, nullptr_t) โ€” propagate_const vs nullptr_t
  • template<typename _Tp > bool operator!= (const shared_ptr< _Tp > &__a, nullptr_t) noexcept โ€” shared_ptr vs nullptr_t, noexcept
  • template<typename _Tp1 , typename _Tp2 > bool operator!= (const shared_ptr< _Tp1 > &__a, const shared_ptr< _Tp2 > &__b) noexcept โ€” two shared_ptrs that aren't even the same type, still comparing, queen behavior ๐Ÿ‘‘
  • template<typename _Tp > constexpr bool operator!= (nullptr_t, const propagate_const< _Tp > &__pu) โ€” nullptr_t on the left this time
  • template<typename _Tp > bool operator!= (nullptr_t, const shared_ptr< _Tp > &__a) noexcept โ€” ditto, shared_ptr, noexcept
  • template<typename _Tp > bool operator!= (nullptr_t, observer_ptr< _Tp > __p) noexcept โ€” nullptr_t vs observer_ptr, by value, noexcept
  • template<typename _Tp > bool operator!= (observer_ptr< _Tp > __p, nullptr_t) noexcept โ€” and the other direction
  • template<typename _Tp , typename _Up > bool operator!= (observer_ptr< _Tp > __p1, observer_ptr< _Up > __p2) โ€” two observer_ptrs, two types, no noexcept here, read into that what you will ๐Ÿ’€

then the literal operator, four flavors of it:

  • constexpr basic_string_view< char > operator""sv (const char *__str, size_t __len) noexcept โ€” the sv literal for char
  • constexpr basic_string_view< char16_t > operator""sv (const char16_t *__str, size_t __len) noexcept โ€” the sv literal for char16_t
  • constexpr basic_string_view< char32_t > operator""sv (const char32_t *__str, size_t __len) noexcept โ€” the sv literal for char32_t
  • constexpr basic_string_view< wchar_t > operator""sv (const wchar_t *__str, size_t __len) noexcept โ€” the sv literal for wchar_t

all four constexpr, all four noexcept, all four taking __str and __len, periodt โœจ

aaaaand the < crew starts (we're cutting off mid-squad, don't worry, more coming):

  • template<typename _CharT , typename _Traits > constexpr bool operator< (__type_identity_t< basic_string_view< _CharT, _Traits > > __x, basic_string_view< _CharT, _Traits > __y) noexcept โ€” string_view less-than, identity-typed left
  • template<typename _CharT , typename _Traits > constexpr bool operator< (basic_string_view< _CharT, _Traits > __x, __type_identity_t< basic_string_view< _CharT, _Traits > > __y) noexcept โ€” and the mirror
  • template<typename _CharT , typename _Traits > constexpr bool operator< (basic_string_view< _CharT, _Traits > __x, basic_string_view< _CharT, _Traits > __y) noexcept โ€” the plain one
  • template<typename _Tp , typename _Up > constexpr bool operator< (const _Tp &__t, const propagate_const< _Up > &__pu) โ€” raw vs propagate_const
  • template<typename _Tp , typename _Up > constexpr bool operator< (const propagate_const< _Tp > &__pt, const _Up &__u) โ€” propagate_const vs raw
  • template<typename _Tp , typename _Up > constexpr bool operator< (const propagate_const< _Tp > &__pt, const propagate_const< _Up > &__pu) โ€” propagate_const vs propagate_const

okay so we're still deep in the synopsis trenches bestie, and this stretch is the comparison-operator wall ๐Ÿ’… it runs alphabetically from operator< all the way down to the any_cast squad, and ngl it's a lot of signatures โ€” so let's just vibe through them together, one family at a time ๐Ÿซถ


๐Ÿ”ฅ the operator< era ๐Ÿ”ฅ

four of them, no cap:

template<typename _Tp > bool operator< (const shared_ptr< _Tp > &__a, nullptr_t) noexcept
template<typename _Tp1 , typename _Tp2 > bool operator< (const shared_ptr< _Tp1 > &__a, const shared_ptr< _Tp2 > &__b) noexcept
template<typename _Tp > bool operator< (nullptr_t, const shared_ptr< _Tp > &__a) noexcept
template<typename _Tp , typename _Up > bool operator< (observer_ptr< _Tp > __p1, observer_ptr< _Up > __p2)

so you got shared_ptr vs nullptr_t (both directions), shared_ptr vs shared_ptr, and observer_ptr vs observer_ptr. The shared_ptr ones are all noexcept, the observer one is just chillin' without it. That's it, that's the whole blurb โ€” the manpage gives zero extra commentary here so I'm not gonna invent any ๐Ÿ˜Œ


๐Ÿ“ค operator<< ๐Ÿ“ค

template<typename _CharT , typename _Traits > basic_ostream< _CharT, _Traits > & operator<< (basic_ostream< _CharT, _Traits > &__os, basic_string_view< _CharT, _Traits > __str)
template<typename _Ch , typename _Tr , typename _Tp > std::basic_ostream< _Ch, _Tr > & operator<< (std::basic_ostream< _Ch, _Tr > &__os, const shared_ptr< _Tp > &__p)

two overloads, both returning a ref to the stream so you can keep chaining like the icon you are โœจ note that the first one uses _CharT / _Traits and the second one uses _Ch / _Tr โ€” yes, they're spelled differently in the source, and yes, I'm keeping them exactly as-is ๐ŸŽ€


๐Ÿฆ‹ operator<= (ten of them, buckle up) ๐Ÿฆ‹

first the basic_string_view trio:

template<typename _CharT , typename _Traits > constexpr bool operator<= (__type_identity_t< basic_string_view< _CharT, _Traits > > __x, basic_string_view< _CharT, _Traits > __y) noexcept
template<typename _CharT , typename _Traits > constexpr bool operator<= (basic_string_view< _CharT, _Traits > __x, __type_identity_t< basic_string_view< _CharT, _Traits > > __y) noexcept
template<typename _CharT , typename _Traits > constexpr bool operator<= (basic_string_view< _CharT, _Traits > __x, basic_string_view< _CharT, _Traits > __y) noexcept

then the propagate_const trio:

template<typename _Tp , typename _Up > constexpr bool operator<= (const _Tp &__t, const propagate_const< _Up > &__pu)
template<typename _Tp , typename _Up > constexpr bool operator<= (const propagate_const< _Tp > &__pt, const _Up &__u)
template<typename _Tp , typename _Up > constexpr bool operator<= (const propagate_const< _Tp > &__pt, const propagate_const< _Up > &__pu)

then the shared_ptr trio:

template<typename _Tp > bool operator<= (const shared_ptr< _Tp > &__a, nullptr_t) noexcept
template<typename _Tp1 , typename _Tp2 > bool operator<= (const shared_ptr< _Tp1 > &__a, const shared_ptr< _Tp2 > &__b) noexcept
template<typename _Tp > bool operator<= (nullptr_t, const shared_ptr< _Tp > &__a) noexcept

and the lone observer_ptr one to close it out:

template<typename _Tp , typename _Up > bool operator<= (observer_ptr< _Tp > __p1, observer_ptr< _Up > __p2)

see the pattern? _Tp / _Up, __t / __u, __pt / __pu, __a / __b, __x / __y โ€” the naming is immaculate and consistent and I respect it deeply ๐Ÿงš


๐Ÿ‘‘ operator== (the big one, fourteen whole overloads) ๐Ÿ‘‘

okay bestie, this is the main character of the comparison section. fourteen entries. deep breath ๐Ÿ’–

the basic_string_view trio, with that __type_identity_t wrapper doing its thing:

template<typename _CharT , typename _Traits > constexpr bool operator== (__type_identity_t< basic_string_view< _CharT, _Traits > > __x, basic_string_view< _CharT, _Traits > __y) noexcept
template<typename _CharT , typename _Traits > constexpr bool operator== (basic_string_view< _CharT, _Traits > __x, __type_identity_t< basic_string_view< _CharT, _Traits > > __y) noexcept
template<typename _CharT , typename _Traits > constexpr bool operator== (basic_string_view< _CharT, _Traits > __x, basic_string_view< _CharT, _Traits > __y) noexcept

the propagate_const squad โ€” a whole four here, including the nullptr_t one in each direction:

template<typename _Tp , typename _Up > constexpr bool operator== (const _Tp &__t, const propagate_const< _Up > &__pu)
template<typename _Tp , typename _Up > constexpr bool operator== (const propagate_const< _Tp > &__pt, const _Up &__u)
template<typename _Tp , typename _Up > constexpr bool operator== (const propagate_const< _Tp > &__pt, const propagate_const< _Up > &__pu)
template<typename _Tp > constexpr bool operator== (const propagate_const< _Tp > &__pt, nullptr_t)
template<typename _Tp > constexpr bool operator== (nullptr_t, const propagate_const< _Tp > &__pu)

(okay that's five, math is hard, but you see the shape of it ๐Ÿ˜ญ)

the shared_ptr pair:

template<typename _Tp > bool operator== (const shared_ptr< _Tp > &__a, nullptr_t) noexcept
template<typename _Tp1 , typename _Tp2 > bool operator== (const shared_ptr< _Tp1 > &__a, const shared_ptr< _Tp2 > &__b) noexcept
template<typename _Tp > bool operator== (nullptr_t, const shared_ptr< _Tp > &__a) noexcept

(three! three. fine.)

the observer_ptr trio, which is the only one here that gets both nullptr_t directions plus the pointer-vs-pointer compare:

template<typename _Tp > bool operator== (nullptr_t, observer_ptr< _Tp > __p) noexcept
template<typename _Tp > bool operator== (observer_ptr< _Tp > __p, nullptr_t) noexcept
template<typename _Tp , typename _Up > bool operator== (observer_ptr< _Tp > __p1, observer_ptr< _Up > __p2)

lowkey obsessed with how nullptr_t comparisons are noexcept everywhere while the observer_ptr-vs-observer_ptr one just isn't ๐ŸŒธ


๐ŸŒˆ operator> and operator>= โ€” the mirror twins ๐ŸŒˆ

operator> is the exact same shape as operator<=, ten entries, same __x / __y / __t / __u / __pt / __pu / __a / __b naming, just the other direction:

template<typename _CharT , typename _Traits > constexpr bool operator> (__type_identity_t< basic_string_view< _CharT, _Traits > > __x, basic_string_view< _CharT, _Traits > __y) noexcept
template<typename _CharT , typename _Traits > constexpr bool operator> (basic_string_view< _CharT, _Traits > __x, __type_identity_t< basic_string_view< _CharT, _Traits > > __y) noexcept
template<typename _CharT , typename _Traits > constexpr bool operator> (basic_string_view< _CharT, _Traits > __x, basic_string_view< _CharT, _Traits > __y) noexcept
template<typename _Tp , typename _Up > constexpr bool operator> (const _Tp &__t, const propagate_const< _Up > &__pu)
template<typename _Tp , typename _Up > constexpr bool operator> (const propagate_const< _Tp > &__pt, const _Up &__u)
template<typename _Tp , typename _Up > constexpr bool operator> (const propagate_const< _Tp > &__pt, const propagate_const< _Up > &__pu)
template<typename _Tp > bool operator> (const shared_ptr< _Tp > &__a, nullptr_t) noexcept
template<typename _Tp1 , typename _Tp2 > bool operator> (const shared_ptr< _Tp1 > &__a, const shared_ptr< _Tp2 > &__b) noexcept
template<typename _Tp > bool operator> (nullptr_t, const shared_ptr< _Tp > &__a) noexcept
template<typename _Tp , typename _Up > bool operator> (observer_ptr< _Tp > __p1, observer_ptr< _Up > __p2)

and operator>=, also ten, also identical in shape:

template<typename _CharT , typename _Traits > constexpr bool operator>= (__type_identity_t< basic_string_view< _CharT, _Traits > > __x, basic_string_view< _CharT, _Traits > __y) noexcept
template<typename _CharT , typename _Traits > constexpr bool operator>= (basic_string_view< _CharT, _Traits > __x, __type_identity_t< basic_string_view< _CharT, _Traits > > __y) noexcept
template<typename _CharT , typename _Traits > constexpr bool operator>= (basic_string_view< _CharT, _Traits > __x, basic_string_view< _CharT, _Traits > __y) noexcept
template<typename _Tp , typename _Up > constexpr bool operator>= (const _Tp &__t, const propagate_const< _Up > &__pu)
template<typename _Tp , typename _Up > constexpr bool operator>= (const propagate_const< _Tp > &__pt, const _Up &__u)
template<typename _Tp , typename _Up > constexpr bool operator>= (const propagate_const< _Tp > &__pt, const propagate_const< _Up > &__pu)
template<typename _Tp > bool operator>= (const shared_ptr< _Tp > &__a, nullptr_t) noexcept
template<typename _Tp1 , typename _Tp2 > bool operator>= (const shared_ptr< _Tp1 > &__a, const shared_ptr< _Tp2 > &__b) noexcept
template<typename _Tp > bool operator>= (nullptr_t, const shared_ptr< _Tp > &__a) noexcept
template<typename _Tp , typename _Up > bool operator>= (observer_ptr< _Tp > __p1, observer_ptr< _Up > __p2)

periodt. comparison operators: done. we survived ๐Ÿ”ฅ


๐ŸŽ€ randint, casts, reseed ๐ŸŽ€

template<typename _IntType > _IntType randint (_IntType __a, _IntType __b)

a template randint taking _IntType twice. no blurb given, so no blurb invented ๐Ÿ’…

template<typename _Tp , typename _Tp1 > shared_ptr< _Tp > reinterpret_pointer_cast (const shared_ptr< _Tp1 > &__r) noexcept

reinterpret_pointer_cast, marked noexcept, and it takes the source as _Tp1 and gives you back a shared_ptr< _Tp >.

void reseed ()
void reseed (default_random_engine::result_type __value)

two overloads of reseed โ€” one takes nothing, one takes a default_random_engine::result_type named __value. ๐Ÿ“


๐ŸŒธ sample, search, shuffle ๐ŸŒธ

template<typename _PopulationIterator , typename _SampleIterator , typename _Distance > _SampleIterator sample (_PopulationIterator __first, _PopulationIterator __last, _SampleIterator __out, _Distance __n)

no generator version. and then the generator version, which actually gets a description in the source:

template<typename _PopulationIterator , typename _SampleIterator , typename _Distance , typename _UniformRandomNumberGenerator > _SampleIterator sample (_PopulationIterator __first, _PopulationIterator __last, _SampleIterator __out, _Distance __n, _UniformRandomNumberGenerator &&__g)
Take a random sample from a population.

yeah that's the line, straight from the page ๐Ÿซถ

template<typename _ForwardIterator , typename _Searcher > _ForwardIterator search (_ForwardIterator __first, _ForwardIterator __last, const _Searcher &__searcher)

search with a searcher object โ€” the searcher is the const _Searcher &__searcher param, and you get a _ForwardIterator back.

template<typename _RandomAccessIterator > void shuffle (_RandomAccessIterator __first, _RandomAccessIterator __last)

shuffle takes a random-access range and returns void. no description attached, moving on ๐Ÿฆ‹


๐Ÿ’œ the pointer casts ๐Ÿ’œ

template<typename _Tp , typename _Tp1 > shared_ptr< _Tp > static_pointer_cast (const shared_ptr< _Tp1 > &__r) noexcept

static_pointer_cast, noexcept, source _Tp1 โ†’ target _Tp. iconic, no notes.


โญ the swap family โญ

first up, the any one โ€” and this one does come with a blurb:

void swap (any &__x, any &__y) noexcept
Exchange the states of two any objects.

then the observer_ptr one, which only swaps matching _Tps:

template<typename _Tp > void swap (observer_ptr< _Tp > &__p1, observer_ptr< _Tp > &__p2) noexcept

then the propagate_const one, which is the fancy diva of the group โ€” look at that enable_if_t gate and the noexcept(...) depending on __is_nothrow_swappable< _Tp >::value:

template<typename _Tp > constexpr enable_if_t< __is_swappable< _Tp >::value, void > swap (propagate_const< _Tp > &__pt, propagate_const< _Tp > &__pt2) noexcept(__is_nothrow_swappable< _Tp >::value)

then the shared_ptr and weak_ptr classics, both noexcept:

template<typename _Tp > void swap (shared_ptr< _Tp > &__a, shared_ptr< _Tp > &__b) noexcept
template<typename _Tp > void swap (weak_ptr< _Tp > &__a, weak_ptr< _Tp > &__b) noexcept

๐Ÿงš to_array ๐Ÿงš

template<typename _Tp , size_t _Nm> constexpr array< remove_cv_t< _Tp >, _Nm > to_array (_Tp(&__a)[_Nm]) noexcept(is_nothrow_constructible< remove_cv_t< _Tp >, _Tp & >::value)
Create a std::array from an array.

it's constexpr, it takes a C array by reference (_Tp(&__a)[_Nm] โ€” note the array reference syntax, we love to see it), and its noexcept hinges on is_nothrow_constructible< remove_cv_t< _Tp >, _Tp & >::value. ๐ŸŒˆ


๐Ÿ’– the any_cast collective ๐Ÿ’–

five overloads, and every single one of them is documented with the exact same one-liner โ€” I'm giving it to you once here because it's the literal same sentence five times over:

template<typename _ValueType > _ValueType any_cast (any &__any)
template<typename _ValueType , typename enable_if<!is_move_constructible< _ValueType >::value||is_lvalue_reference< _ValueType >::value, bool >::type = true> _ValueType any_cast (any &&__any)
template<typename _ValueType , typename enable_if< is_move_constructible< _ValueType >::value &&!is_lvalue_reference< _ValueType >::value, bool >::type = false> _ValueType any_cast (any &&__any)
template<typename _ValueType > const _ValueType * any_cast (const any *__any) noexcept
template<typename _ValueType > _ValueType * any_cast (any *__any) noexcept
Access the contained object.

yep โ€” all five, same blurb, no extra lore ๐Ÿ‘‘

okay so the tea here: the two any &&__any overloads are SFINAE twins. one has enable_if<!is_move_constructible< _ValueType >::value||is_lvalue_reference< _ValueType >::value, bool >::type = true and the other has enable_if< is_move_constructible< _ValueType >::value &&!is_lvalue_reference< _ValueType >::value, bool >::type = false โ€” literally opposite conditions, defaulted to true and false respectively. and then the two pointer-taking ones are both noexcept, one returning const _ValueType * and the other _ValueType *. frosted tips energy, fr fr ๐Ÿ’…

and that's where this chapter of the synopsis list lands โ€” more coming, don't go anywhere ๐Ÿ’œ

โœจ Variables โœจ

okay bestie, we're in the variable-template wing of the exhibit now ๐ŸŽ€ this whole section is one giant flex of _v suffixes and using aliases, so buckle up. i'm listing them in exactly the order the page gives them, no skipping, no "lol you get the idea" โ€” every single one is here ๐Ÿ’…

  • template<typename _Yp , typename _Tp > constexpr bool __sp_compatible_v
  • template<typename _Tp , typename _Yp > constexpr bool __sp_is_constructible_v
  • constexpr in_place_t in_place โ€” the tag for in-place construction ๐Ÿท๏ธ (yes, the vibe is "build it right here, don't move it")
  • template<typename _Tp > constexpr bool is_bind_expression_v โ€” literally the variable template for std::is_bind_expression ๐Ÿซถ
  • template<typename _Tp > constexpr bool is_error_code_enum_v
  • template<typename _Tp > constexpr bool is_error_condition_enum_v
  • template<typename _Tp > constexpr int is_placeholder_v โ€” the variable template for std::is_placeholder, and note it's an int, not a bool, which is kind of iconic of it ngl
  • constexpr nullopt_t nullopt โ€” the tag to disengage optional objects ๐Ÿซฅ that's it, that's the whole job
  • template<typename _R1 , typename _R2 > constexpr bool ratio_equal_v
  • template<typename _R1 , typename _R2 > constexpr bool ratio_greater_equal_v
  • template<typename _R1 , typename _R2 > constexpr bool ratio_greater_v
  • template<typename _R1 , typename _R2 > constexpr bool ratio_less_equal_v
  • template<typename _R1 , typename _R2 > constexpr bool ratio_less_v
  • template<typename _R1 , typename _R2 > constexpr bool ratio_not_equal_v

that whole ratio family is giving "we compare numbers at compile time and we're not sorry" โš–๏ธ

  • template<typename _Tp > constexpr size_t tuple_size_v

and then ๐Ÿ’€ the motherlode. the page just drops the entire classic <type_traits> constexpr bool run on us, uninterrupted, no commentary, no water. i'm giving it its own little shrine so you can see every line exactly as it appears:

template<typename _Tp > constexpr bool is_void_v
template<typename _Tp > constexpr bool is_null_pointer_v
template<typename _Tp > constexpr bool is_integral_v
template<typename _Tp > constexpr bool is_floating_point_v
template<typename _Tp > constexpr bool is_array_v
template<typename _Tp > constexpr bool is_pointer_v
template<typename _Tp > constexpr bool is_lvalue_reference_v
template<typename _Tp > constexpr bool is_rvalue_reference_v
template<typename _Tp > constexpr bool is_member_object_pointer_v
template<typename _Tp > constexpr bool is_member_function_pointer_v
template<typename _Tp > constexpr bool is_enum_v
template<typename _Tp > constexpr bool is_union_v
template<typename _Tp > constexpr bool is_class_v
template<typename _Tp > constexpr bool is_function_v
template<typename _Tp > constexpr bool is_reference_v
template<typename _Tp > constexpr bool is_arithmetic_v
template<typename _Tp > constexpr bool is_fundamental_v
template<typename _Tp > constexpr bool is_object_v
template<typename _Tp > constexpr bool is_scalar_v
template<typename _Tp > constexpr bool is_compound_v
template<typename _Tp > constexpr bool is_member_pointer_v
template<typename _Tp > constexpr bool is_const_v
template<typename _Tp > constexpr bool is_volatile_v
template<typename _Tp > constexpr bool is_trivial_v
template<typename _Tp > constexpr bool is_trivially_copyable_v
template<typename _Tp > constexpr bool is_standard_layout_v
template<typename _Tp > constexpr bool is_pod_v
template<typename _Tp > constexpr bool is_literal_type_v
template<typename _Tp > constexpr bool is_empty_v
template<typename _Tp > constexpr bool is_polymorphic_v
template<typename _Tp > constexpr bool is_abstract_v
template<typename _Tp > constexpr bool is_final_v
template<typename _Tp > constexpr bool is_signed_v
template<typename _Tp > constexpr bool is_unsigned_v
template<typename _Tp , typename... _Args> constexpr bool is_constructible_v
template<typename _Tp > constexpr bool is_default_constructible_v
template<typename _Tp > constexpr bool is_copy_constructible_v
template<typename _Tp > constexpr bool is_move_constructible_v
template<typename _Tp , typename _Up > constexpr bool is_assignable_v
template<typename _Tp > constexpr bool is_copy_assignable_v
template<typename _Tp > constexpr bool is_move_assignable_v
template<typename _Tp > constexpr bool is_destructible_v
template<typename _Tp , typename... _Args> constexpr bool is_trivially_constructible_v
template<typename _Tp > constexpr bool is_trivially_default_constructible_v
template<typename _Tp > constexpr bool is_trivially_copy_constructible_v
template<typename _Tp > constexpr bool is_trivially_move_constructible_v
template<typename _Tp , typename _Up > constexpr bool is_trivially_assignable_v
template<typename _Tp > constexpr bool is_trivially_copy_assignable_v
template<typename _Tp > constexpr bool is_trivially_move_assignable_v
template<typename _Tp > constexpr bool is_trivially_destructible_v
template<typename _Tp , typename... _Args> constexpr bool is_nothrow_constructible_v
template<typename _Tp > constexpr bool is_nothrow_default_constructible_v
template<typename _Tp > constexpr bool is_nothrow_copy_constructible_v
template<typename _Tp > constexpr bool is_nothrow_move_constructible_v
template<typename _Tp , typename _Up > constexpr bool is_nothrow_assignable_v
template<typename _Tp > constexpr bool is_nothrow_copy_assignable_v
template<typename _Tp > constexpr bool is_nothrow_move_assignable_v
template<typename _Tp > constexpr bool is_nothrow_destructible_v
template<typename _Tp > constexpr bool has_virtual_destructor_v
template<typename _Tp > constexpr size_t alignment_of_v
template<typename _Tp > constexpr size_t rank_v
template<typename _Tp , unsigned _Idx = 0> constexpr size_t extent_v
template<typename _Tp , typename _Up > constexpr bool is_same_v
template<typename _Tp > constexpr bool is_same_v< _Tp, _Tp >
template<typename _Base , typename _Derived > constexpr bool is_base_of_v
template<typename _From , typename _To > constexpr bool is_convertible_v

notice alignment_of_v, rank_v and extent_v are the size_t girlies in a sea of bool โ€” and extent_v even brought a default argument unsigned _Idx = 0 to the party ๐ŸŒˆ. also is_same_v< _Tp, _Tp > is a separate specialisation line, don't let it sneak past you ๐Ÿ‘€

then the logic trio, back on their constexpr bool grind:

  • template<typename... _Bn> constexpr bool conjunction_v
  • template<typename... _Bn> constexpr bool disjunction_v
  • template<typename _Pp > constexpr bool negation_v โ€” and yeah, this one takes a single _Pp, not a pack. it's a solo act ๐Ÿ’…

๐Ÿฆ‹ the detection-idiom section (a.k.a. the metafunction girlies) ๐Ÿฆ‹

every single one of these carries the exact same blurb on the page โ€” "A metafunction that always yields void, used for detecting valid types." โ€” so yes, i'm saying it every time, because the page said it every time. consistency is a lifestyle โœจ

  • template<typename... > using void_t = void โ€” a metafunction that always yields void, used for detecting valid types ๐Ÿซง
  • template<typename _Default , template< typename... > class _Op, typename... _Args> using detected_or = std::__detected_or< _Default, _Op, _Args... > โ€” a metafunction that always yields void, used for detecting valid types โœจ
  • template<typename _Default , template< typename... > class _Op, typename... _Args> using detected_or_t = typename detected_or< _Default, _Op, _Args... >::type โ€” a metafunction that always yields void, used for detecting valid types ๐Ÿ’ซ (this one's the ::type remix of the previous one)
  • template<template< typename... > class _Op, typename... _Args> using detected_t = detected_or_t< nonesuch, _Op, _Args... > โ€” a metafunction that always yields void, used for detecting valid types ๐ŸŽ€ (and it's serving nonesuch realness)
  • template<template< typename... > class _Op, typename... _Args> using is_detected = typename detected_or< void, _Op, _Args... >::__is_detected โ€” a metafunction that always yields void, used for detecting valid types ๐Ÿ”
  • template<typename _Expected , template< typename... > class _Op, typename... _Args> using is_detected_exact = is_same< _Expected, detected_t< _Op, _Args... > > โ€” a metafunction that always yields void, used for detecting valid types โญ
  • template<typename _To , template< typename... > class _Op, typename... _Args> using is_detected_convertible = is_convertible< detected_t< _Op, _Args... >, _To > โ€” a metafunction that always yields void, used for detecting valid types ๐Ÿฆ‹
  • template<template< typename... > class _Op, typename... _Args> constexpr bool is_detected_v โ€” a metafunction that always yields void, used for detecting valid types ๐Ÿ’œ
  • template<typename _Expected , template< typename... > class _Op, typename... _Args> constexpr bool is_detected_exact_v โ€” a metafunction that always yields void, used for detecting valid types ๐ŸŒธ
  • template<typename _To , template< typename... > class _Op, typename... _Args> constexpr bool is_detected_convertible_v โ€” a metafunction that always yields void, used for detecting valid types ๐Ÿ‘‘

๐Ÿ’ซ Detailed Description ๐Ÿ’ซ

so what actually is this namespace, bestie? the page keeps it short and sweet:

Namespace for features defined in ISO Technical Specifications.

that's the whole thing. no cap, no filler, just "this is where the ISO TS features hang out" ๐Ÿ‘‘โœจ

๐Ÿ’… FUNCTION DOCUMENTATION ๐Ÿ’…

okay so this is where the actual callable stuff lives, bestie โ€” the function docs, no cap. Every signature is kept exactly as-is, because we do not mess with template parameters in this house. ๐Ÿซถ


๐Ÿงฎ std::experimental::fundamentals_v2::gcd

literally the greatest common divisor, bestie. itโ€™s tagged [constexpr] and [noexcept], so yes, itโ€™s giving efficient icon behavior. ๐Ÿ’ซ

template<typename _Mn , typename _Nn > constexpr common_type_t< _Mn, _Nn >
std::experimental::fundamentals_v2::gcd (_Mn __m, _Nn __n) [constexpr],
[noexcept]

The docs say References gcd(). and Referenced by gcd(). โ€” self-referential documentation moment, and honestly? we respect it. ๐Ÿ’–


๐Ÿ—‘๏ธ std::experimental::fundamentals_v2::get_deleter

this one is [inline] and [noexcept], and its entire description is just this number. no extra lore. ๐Ÿ™ˆ

template<typename _Del , typename _Tp > _Del *
std::experimental::fundamentals_v2::get_deleter (const shared_ptr< _Tp >
& __p) [inline],  [noexcept]
The description is literally C++14 20.8.2.2.10. โ€” periodt.

๐Ÿ”ข std::experimental::fundamentals_v2::lcm

the least common multiple, obviously. this one is [constexpr] and not [noexcept], so donโ€™t go mixing up the tags, bestie. ๐ŸŒธ

template<typename _Mn , typename _Nn > constexpr common_type_t< _Mn, _Nn >
std::experimental::fundamentals_v2::lcm (_Mn __m, _Nn __n) [constexpr]

The docs hit us with References lcm(). and Referenced by lcm(). โ€” again with the self-reference, and we love the consistency. โœจ


๐Ÿ” std::experimental::fundamentals_v1::make_boyer_moore_horspool_searcher

this is the generator function for boyer_moore_horspool_searcher, and itโ€™s [inline]. the template situation is very much giving โ€œtrust me, the defaults are cozy.โ€ ๐ŸŽ€

template<typename _RAIter , typename _Hash  = std::hash<typename std::iterator_traits<_RAIter>::value_type>, typename _BinaryPredicate  = equal_to<>> boyer_moore_horspool_searcher< _RAIter, _Hash, _BinaryPredicate >
std::experimental::fundamentals_v1::make_boyer_moore_horspool_searcher (_RAIter __pat_first, _RAIter __pat_last, _Hash __hf = _Hash(), _BinaryPredicate __pred = _BinaryPredicate()) [inline]

The reference tea is: References make_boyer_moore_horspool_searcher(), and std::move(). and Referenced by make_boyer_moore_horspool_searcher(). โ€” itโ€™s giving main character energy in its own docs. ๐Ÿ‘‘


๐Ÿ”Ž std::experimental::fundamentals_v1::make_boyer_moore_searcher

the generator function for boyer_moore_searcher, also [inline]. same template energy, slightly different searcher name โ€” do not mix them up, iykyk. ๐Ÿซถ

template<typename _RAIter , typename _Hash  = std::hash<typename std::iterator_traits<_RAIter>::value_type>, typename _BinaryPredicate  = equal_to<>> boyer_moore_searcher< _RAIter, _Hash, _BinaryPredicate >
std::experimental::fundamentals_v1::make_boyer_moore_searcher (_RAIter __pat_first, _RAIter __pat_last, _Hash __hf = _Hash(), _BinaryPredicate __pred = _BinaryPredicate()) [inline]

Reference check, no cap: References make_boyer_moore_searcher(), and std::move(). and Referenced by make_boyer_moore_searcher(). โ€” self-love, slay. ๐Ÿ’…


๐Ÿงต std::experimental::fundamentals_v1::make_default_searcher

this is the generator function for default_searcher, and itโ€™s [inline]. itโ€™s lowkey the calm, classic one of the searcher generator squad. ๐ŸŒผ

template<typename _ForwardIterator , typename _BinaryPredicate  = std::equal_to<>> default_searcher< _ForwardIterator, _BinaryPredicate >
std::experimental::fundamentals_v1::make_default_searcher (_ForwardIterator __pat_first, _ForwardIterator __pat_last, _BinaryPredicate __pred = _BinaryPredicate()) [inline]

The docs say References make_default_searcher(). and Referenced by make_default_searcher(). โ€” again, self-referential, and honestly? iconic. ๐Ÿ’–


๐ŸŽ€ std::experimental::fundamentals_v2::make_ostream_joiner

this one is the object generator for ostream_joiner, and itโ€™s [inline]. itโ€™s giving โ€œi make the stream join things, youโ€™re welcome.โ€ โœจ

template<typename _CharT , typename _Traits , typename _DelimT > ostream_joiner< decay_t< _DelimT >, _CharT, _Traits >
std::experimental::fundamentals_v2::make_ostream_joiner (basic_ostream< _CharT, _Traits > & __os, _DelimT && __delimiter) [inline]

Reference moment: References make_ostream_joiner(). and Referenced by make_ostream_joiner(). โ€” no notes, just vibes. ๐Ÿฆ‹


๐ŸŽฒ std::experimental::fundamentals_v2::sample

this is the one that will take a random sample from a population โ€” yes, thatโ€™s the whole description, and it ate. ๐Ÿ”ฅ

template<typename _PopulationIterator , typename _SampleIterator , typename _Distance , typename _UniformRandomNumberGenerator > _SampleIterator
std::experimental::fundamentals_v2::sample (_PopulationIterator __first, _PopulationIterator __last, _SampleIterator __out, _Distance __n, _UniformRandomNumberGenerator && __g)

no reference lines here, just pure sampling business. we love a clean exit. ๐Ÿ’œ


๐Ÿงธ VARIABLE DOCUMENTATION ๐Ÿงธ

these are the variable-template girlies, bestie โ€” short, sweet, and very much [constexpr]. ๐ŸŒˆ

๐Ÿช„ std::experimental::fundamentals_v1::is_bind_expression_v

a variable template for std::is_bind_expression, and itโ€™s [constexpr]. simple, useful, slay.

template<typename _Tp > constexpr bool
std::experimental::fundamentals_v1::is_bind_expression_v [constexpr]

๐Ÿช„ std::experimental::fundamentals_v1::is_placeholder_v

a variable template for std::is_placeholder, also [constexpr], also doing exactly what it says on the tin. ๐ŸŽ€

template<typename _Tp > constexpr int
std::experimental::fundamentals_v1::is_placeholder_v [constexpr]

๐ŸŒธ AUTHOR ๐ŸŒธ

Generated automatically by Doxygen for libstdc++ from the source code. periodt. ๐Ÿ’–


mwah ๐Ÿ’‹ โ€” source/version libstdc++, page std::experimental(3cxx), and thatโ€™s the cute little footer sign-off, bestie. ๐Ÿซถโœจ

๐Ÿ“ฆ where this page comes from