std::initializer_list<T>::end

Obtains a pointer to one past the last element in the initializer list, i.e. begin()+ size().

# Declarations

const T* end() const noexcept;

(since C++11) (constexpr since C++14)

# Return value

A pointer to one past the last element in the initializer list

# Example

#include <initializer_list>
#include <numeric>
 
int main()
{
    static constexpr auto l = {3, 13, 13};
    static_assert(std::accumulate(l.begin(), l.end(), 13) == 42);
}

# See also