STD::INITIALIZER_LIST(3cxx)
π NAME π
std::initializer_list< _E > β bestie, it's initializer_list π
(this is the std::initializer_list< _E >(3cxx) page, from the libstdc++ manual β section 3cxx, ok? now let's go β¨)
β¨ SYNOPSIS β¨
okay so first things first, you gotta pull it in:
#include <initializer_list>
π Public Types π
these are the type aliases, no cap, exactly as written:
typedef const _E * const_iteratorβ a const iterator, it's giving read-only π«Άtypedef const _E & const_referenceβ const reference, same energytypedef const _E * iteratorβ the iterator type πtypedef const _E & referenceβ the reference typetypedef size_t size_typeβ the size type,size_t, periodttypedef _E value_typeβ the value type, literally just_EπΈ
π¦ Public Member Functions π¦
the whole squad of member functions, all constexpr and all noexcept (iconic of them honestly):
constexpr const_iterator begin () const noexceptβ gives you the iterator to the front π₯constexpr const_iterator end () const noexceptβ gives you the iterator past-the-end βconstexpr size_type size () const noexceptβ how many elements, fr fr
πΈ Related Symbols πΈ
heads up bestie β these are not member symbols, ok? they just hang out nearby π
template<class _Tp > constexpr const _Tp * begin (initializer_list< _Tp > __ils) noexceptβ Return an iterator pointing to the first element of theinitializer_list.template<class _Tp > constexpr const _Tp * end (initializer_list< _Tp > __ils) noexceptβ Return an iterator pointing to one past the last element of theinitializer_list.
π Detailed Description π
the class itself, looking exactly like this:
template<class _E>
class std::initializer_list< _E >"initializer_list
(yes that's literally how it's printed on the page β I'm not touching it, iykyk π)
π«Ά Friends And Related Symbol Documentation π«Ά
begin β [related] π«
template<class _Tp > constexpr const _Tp * begin (initializer_list< _Tp > __ils)
Return an iterator pointing to the first element of the initializer_list.
Parameters
__ilsβ Initializer list.
end β [related] π
template<class _Tp > constexpr const _Tp * end (initializer_list< _Tp > __ils)
Return an iterator pointing to one past the last element of the initializer_list.
Parameters
__ilsβ Initializer list.
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. not a human wrote this one, bestie β the robots did it π€β¨
okay that's the whole vibe check, we ate and left no crumbs π this was the libstdc++ std::initializer_list< _E >(3cxx) page β source and version: libstdc++, manual section 3cxx, mwah ππ
π¦ where this page comes from
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms