## `array::operator[]`

Access an element.

### Synopsis

    value&
    operator[](
        std::size_t pos) & noexcept; (1)

    value&&
    operator[](
        std::size_t pos) && noexcept; (2)

    value const&
    operator[](
        std::size_t pos) const& noexcept; (3)

### Description

Returns a reference to the element specified at location `pos`. No bounds checking is performed.

### Preconditions

`pos < size()`

### Complexity

Constant.

### Parameters

Name | Description
--- | ---
`pos` | A zero-based index

Edit this page