W3cubDocs

/C++

Standard library header <initializer_list>

This header is part of the utility library.

Classes

std::initializer_list(C++11) (class template)

Functions

specializes std::begin
(function template)
specializes std::end
(function template)

Synopsis

namespace std {
    template<class E> class initializer_list {
    public:
        typedef E value_type;
        typedef const E& reference;
        typedef const E& const_reference;
        typedef size_t size_type;
        typedef const E* iterator;
        typedef const E* const_iterator;
        initializer_list() noexcept;
        size_t size() const noexcept; // number of elements
        const E* begin() const noexcept; // first element
        const E* end() const noexcept; // one past the last element
    };
    // initializer list range access
    template<class E> const E* begin(initializer_list<E> il) noexcept;
    template<class E> const E* end(initializer_list<E> il) noexcept;
}

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/header/initializer_list