[#bsl-list-054-splice-03]
= xref:bsl.adoc[bsl]::xref:bsl/list-054.adoc[list]::splice
:relfileprefix: ../../
:mrdocs:

Splice the range `&lsqb;first &period;&period; last)&rsqb;` from `src` into this list&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;list&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
splice(
    xref:bsl/list-054/const_iterator.adoc[const&lowbar;iterator] dstPosition,
    xref:bsl/list-054.adoc[list]& src,
    xref:bsl/list-054/const_iterator.adoc[const&lowbar;iterator] first,
    xref:bsl/list-054/const_iterator.adoc[const&lowbar;iterator] last);
----

== Description

The elements are inserted, in the same order, at `dstPosition`&period; The behavior is undefined unless `&lsqb;first &period;&period; last)&rsqb;` represents a range of valid elements in `src`, `dstPosition` is not in the range `&lsqb;first &period;&period; last)&rsqb;`, this list and `src` use the same allocator, and `dstPosition` is in the range `&lsqb;begin() &period;&period; end()&rsqb;` (note both endpoints included)&period; Note that `src` and `&ast;this` may be the same list, in which case an entire sequence of nodes is moved to a (possibly) new position in this list&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *dstPosition*
| location before which elements are inserted
| *src*
| list containing the range to move
| *first*
| start of the range to move
| *last*
| one past the end of the range to move
|===


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