[#BloombergLP-bdlc-Queue-replace-0d]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/Queue.adoc[Queue]::replace
:relfileprefix: ../../../
:mrdocs:

`replace` overloads

== Synopses

Declared in `&lt;bdlc&lowbar;queue&period;h&gt;`

Replace the element at the specified `dstIndex` in this queue with the specified `item`&period; The behavior is undefined unless `0 &lt;&equals; dstIndex &lt; length()`&period; Note that this function is logically equivalent to (but more efficient than)&colon; &grave; insert(dstIndex, item)&semi; remove(dstIndex &plus; 1)&semi; &grave;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bdlc/Queue/replace-05.adoc[replace](
    int dstIndex,
    T const& item);
----

[.small]#xref:BloombergLP/bdlc/Queue/replace-05.adoc[_» more&period;&period;&period;_]#

Replace the specified `numElements` values beginning at the specified `dstIndex` in this queue with values from the specified `srcQueue` beginning at the specified `srcIndex`&period; The behavior is undefined unless `0 &lt;&equals; dstIndex, 0 &lt;&equals; numElements`, `dstIndex &plus; numElements &lt;&equals; length()`, `0 &lt;&equals; srcIndex`, and `srcIndex &plus; numElements &lt;&equals; srcQueue&period;length()`&period; Note that this function is logically equivalent to (but more efficient than)&colon; &grave; insert(dstIndex, srcQueue, srcIndex, numElements)&semi; remove(dstIndex &plus; numElements, numElements)&semi; &grave;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bdlc/Queue/replace-0a.adoc[replace](
    int dstIndex,
    xref:BloombergLP/bdlc/Queue.adoc[Queue] const& srcQueue,
    int srcIndex,
    int numElements);
----

[.small]#xref:BloombergLP/bdlc/Queue/replace-0a.adoc[_» more&period;&period;&period;_]#


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