STD::INITIALIZER_LIST(3)
π NAME π
okay so bestie, meet std::initializer_list< _E > β literally just initializer_list. that's the whole name. she's iconic, she's short, she's the reason {1, 2, 3} just works. β¨
this page lives in the Library Functions Manual, section 3, and the title up top is std::initi..._list< _E >(3) (yes the truncation is real, that's just how the header renders it, we don't make the rules π
).
πΈ SYNOPSIS πΈ
#include <initializer_list>
π Public Types
typedef const _E * const_iteratorβ the const iterator type, a pointer-to-const-_E, no captypedef const _E & const_referenceβ a const reference to_E, for when you just wanna look πtypedef const _E * iteratorβ the iterator type, alsoconst _E *(yes, even the "mutable" one is const, she said no editing today)typedef const _E & referenceβ reference to_E, again const, again on purposetypedef size_t size_typeβ the size type, it'ssize_t, classictypedef _E value_typeβ the value type, which is just_E, the element you're holding
π¦ Public Member Functions
constexpr const_iterator begin () const noexceptβ hands you the iterator to the first element,constexpr,noexcept, flawlessconstexpr const_iterator end () const noexceptβ hands you the iterator to one past the last element, alsoconstexpr, alsonoexceptconstexpr size_type size () const noexceptβ tells you how many elements are in there,constexpr,noexcept, no drama
β Related Symbols
quick heads up bestie: these are not member symbols. they're free functions hanging out nearby. (Note that these are not member symbols.)
template<class _Tp> constexpr const _Tp * begin (initializer_list< _Tp > __ils) noexceptβ Return an iterator pointing to the first element of the initializer_list.template<class _Tp> constexpr const _Tp * end (initializer_list< _Tp > __ils) noexceptβ Return an iterator pointing to one past the last element of the initializer_list.
π Detailed Description
template<class _E>
class std::initializer_list< _E >"initializer_list
(yes, the stray " is in there. i don't know her. she came with the source. we keep her. π)
π§ Friends And Related Symbol Documentation
template<class _Tp> const _Tp * begin (initializer_list< _Tp > __ils)[related] β Return an iterator pointing to the first element of the initializer_list.
Parameters
__ilsβ Initializer list.
template<class _Tp> const _Tp * end (initializer_list< _Tp > __ils)[related] β 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. (so if you wanna @ someone about a typo, it's the robot, not a person π)
okay that's the whole page bestie!! πΈ this beauty ships from libstdc++, and the footer at the bottom is just the title std::initi..._list< _E >(3) sitting under that same libstdc++ name β no extra date given, so i'm not gonna invent one, that would be lying and we don't do that here. π«Ά go forth and brace-init literally everything. periodt. π
β¨
π¦ where this page comes from
- arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
- fedora 44: libstdc++-docs 16.0.1-0.10.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- fedora 44: libstdc++-docs 16.2.1-2.fc44
- fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms