[#bsl-slist-insert-0e]
= xref:bsl.adoc[bsl]::xref:bsl/slist.adoc[slist]::insert
:relfileprefix: ../../
:mrdocs:

Insert `&lowbar;&lowbar;x` before `&lowbar;&lowbar;pos` and return an iterator to the new element&period;

== Synopsis

Declared in `&lt;bslstp&lowbar;slist&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/slist/iterator.adoc[iterator]
insert(
    xref:bsl/slist/iterator.adoc[iterator] &lowbar;&lowbar;pos,
    xref:bsl/slist/value_type.adoc[value&lowbar;type] const& &lowbar;&lowbar;x = &lowbar;Tp());
----

== Return Value

iterator referring to the inserted element

== Parameters

[cols="1,4"]
|===
| Name| Description
| *&lowbar;&lowbar;pos*
| position before which to insert
| *&lowbar;&lowbar;x*
| value to insert
|===


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