[#VecDeque-operator_subs-09]
= xref:VecDeque.adoc[VecDeque]::operator&lsqb;&rsqb;
:relfileprefix: ../
:mrdocs:

Subscript operators

== Synopses

Declared in `&lt;util&sol;vecdeque&period;h&gt;`

Get a mutable reference to the element in the deque at the given index&period; Requires idx &lt; size()&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
T&
xref:VecDeque/operator_subs-03.adoc[operator&lsqb;&rsqb;](size&lowbar;t idx) noexcept;
----

[.small]#xref:VecDeque/operator_subs-03.adoc[_» more&period;&period;&period;_]#

Get a const reference to the element in the deque at the given index&period; Requires idx &lt; size()&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
T const&
xref:VecDeque/operator_subs-0f.adoc[operator&lsqb;&rsqb;](size&lowbar;t idx) const noexcept;
----

[.small]#xref:VecDeque/operator_subs-0f.adoc[_» more&period;&period;&period;_]#

== Return Value

* A mutable reference to the element at idx&period;
* A const reference to the element at idx&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *idx*
| The zero&hyphen;based logical index of the element&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
