Namespaces
Variants
Views
Actions

Standard library header <initializer_list>

From cppreference.com
< cpp‎ | header
Revision as of 21:54, 31 May 2013 by P12bot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This header is part of the utility library.

[edit] Classes

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

[edit] Functions

specializes std::begin
(function template) [edit]
specializes std::end
(function template) [edit]


[edit] 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;
}