|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
| Capacity | ||||
| Iterators | ||||
initializer_list::begin | ||||
| Non-member functions | ||||
const T* begin()constnoexcept; | (since C++11) (constexpr since C++14) | |
Obtains a pointer to the first element in the initializer list.
If the initializer list is empty, the values ofbegin() andend() are unspecified, but will be identical.
Contents |
(none)
A pointer to the first element in the initializer list
Constant
#include <initializer_list> int main(){staticconstexprauto il={42,24}; static_assert(*il.begin()==0x2A); static_assert(il.begin()[1]==030);}
| returns a pointer to one past the last element (public member function)[edit] |