[#BloombergLP-bdlc-Queue-replace-05] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/Queue.adoc[Queue]::replace :relfileprefix: ../../../ :mrdocs: Replace the element at the specified `dstIndex` in this queue with the specified `item`. The behavior is undefined unless `0 <= dstIndex < length()`. Note that this function is logically equivalent to (but more efficient than): ` insert(dstIndex, item); remove(dstIndex + 1); ` == Synopsis Declared in `<bdlc_queue.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void replace( int dstIndex, T const& item); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#