[#bsl-vectorBase-06-operator_subs-02] = xref:bsl.adoc[bsl]::xref:bsl/vectorBase-06.adoc[vectorBase]::operator[] :relfileprefix: ../../ :mrdocs: Subscript operators == Synopses Declared in `<bslstl_vector.h>` Return a reference providing modifiable access to the element at the specified `position` in this vector. The behavior is undefined unless `position < size()`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/vectorBase-06/reference.adoc[vectorBase<VALUE_TYPE>::reference] xref:bsl/vectorBase-06/operator_subs-0b.adoc[operator[]](xref:bsl/vectorBase-06/size_type.adoc[size_type] position); ---- [.small]#xref:bsl/vectorBase-06/operator_subs-0b.adoc[_» more..._]# Return a reference to the element at the specified position. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/vectorBase-06/const_reference.adoc[vectorBase<VALUE_TYPE>::const_reference] xref:bsl/vectorBase-06/operator_subs-0d.adoc[operator[]](xref:bsl/vectorBase-06/size_type.adoc[size_type] position) const; ---- [.small]#xref:bsl/vectorBase-06/operator_subs-0d.adoc[_» more..._]# == Return Value * modifiable reference to the element at `position` * non‐modifiable reference to the element at `position` == Parameters [cols="1,4"] |=== | Name| Description | *position* | element position or insertion point |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#