[#BloombergLP-bdlar-ArrayRef]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlar.adoc[bdlar]::ArrayRef
:relfileprefix: ../../
:mrdocs:

Type&hyphen;erased non&hyphen;const reference to an object in the `bdlat` array category&period;

== Synopsis

Declared in `&lt;bdlar&lowbar;arrayref&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class ArrayRef;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlar/ArrayRef/2constructor-0b.adoc[`ArrayRef`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlar/ArrayRef/accessElement.adoc[`accessElement`] 
| Invoke the specified `accessor` on the array element at the specified `index`&period; The supplied `accessor` must be a callable type that can be called as if it had the following signature&colon; &grave; int accessor(const ELEMENT&amp; refOrValue)&semi; &grave; Return the value from the invocation of `accessor`&period; The behavior is undefined unless `0 &lt;&equals; index &lt; size()`&period;
| xref:BloombergLP/bdlar/ArrayRef/elementCategory.adoc[`elementCategory`] 
| Return the element type category of the wrapped array&period;
| xref:BloombergLP/bdlar/ArrayRef/manipulateElement.adoc[`manipulateElement`] 
| Invoke the specified `manipulator` on the array element at the specified `index`&period; The supplied `manipulator` must be a callable type that can be called as if it had the following signature&colon; &grave; int manipulator(ELEMENT &ast;refOrValue)&semi; &grave; Return the value from the invocation of `manipulator`&period; The behavior is undefined unless `0 &lt;&equals; index &lt; size()`&period;
| xref:BloombergLP/bdlar/ArrayRef/objectAddress.adoc[`objectAddress`] 
| Return a pointer to the wrapped array&period;
| xref:BloombergLP/bdlar/ArrayRef/reset.adoc[`reset`] 
| Reset the referred object to the default value&period;
| xref:BloombergLP/bdlar/ArrayRef/resize.adoc[`resize`] 
| Set the size to the specified `newSize`&period; If `newSize &gt; size()`, then `newSize &hyphen; size()` elements with default values are appended to the array&period; If `newSize &lt; size()`, then the `size() &hyphen; newSize` elements at the end of the array are destroyed&period; The behavior is undefined unless `0 &lt;&equals; newSize`&period;
| xref:BloombergLP/bdlar/ArrayRef/size.adoc[`size`] 
| Return the number of elements in the wrapped array&period;
| xref:BloombergLP/bdlar/ArrayRef/vtable.adoc[`vtable`] 
| Return a pointer to the vtable&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlar/bdlat_arrayAccessElement-08.adoc[`bdlat&lowbar;arrayAccessElement`]
| Invoke the specified `accessor` on the array element at the specified `index` of the specified `array`&period; Return the value from the invocation of `accessor`&period;
| xref:BloombergLP/bdlar/bdlat_arrayManipulateElement.adoc[`bdlat&lowbar;arrayManipulateElement`]
| Invoke the specified `manipulator` on the address of the element at the specified `index` of the specified `array`&period; Return the value from the invocation of `manipulator`&period;
| xref:BloombergLP/bdlar/bdlat_arrayResize.adoc[`bdlat&lowbar;arrayResize`]
| Set the size of the specified `array` to the specified `newSize`&period;
| xref:BloombergLP/bdlar/bdlat_arraySize-0f.adoc[`bdlat&lowbar;arraySize`]
| Return the number of elements in the specified `array`&period;
| xref:BloombergLP/bdlar/bdlat_valueTypeReset-044.adoc[`bdlat&lowbar;valueTypeReset`]
| Reset the specified `ref` to its default&hyphen;constructed state&period;
|===


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