[#BloombergLP-bslalg-BidirectionalLinkListUtil-insertLinkAfterTarget]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/BidirectionalLinkListUtil.adoc[BidirectionalLinkListUtil]::insertLinkAfterTarget
:relfileprefix: ../../../
:mrdocs:

Insert the specified `newNode` after the specified `target` node&period;

== Synopsis

Declared in `&lt;bslalg&lowbar;bidirectionallinklistutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
void
insertLinkAfterTarget(
    xref:BloombergLP/bslalg/BidirectionalLink.adoc[BidirectionalLink]* newNode,
    xref:BloombergLP/bslalg/BidirectionalLink.adoc[BidirectionalLink]* target);
----

== Description

Insert the specified `newNode` after the specified `target` node in the linked list that contains `target`&period; If the node following `target` is 0, then set the `nextLink` attribute of `newNode` to 0&period; After successful execution of this function the values of the `previousLink` and `nextLink` attributes of all the links in the list appropriately reflect the operation&period; The behavior is undefined unless `0 !&equals; newNode` and `0 !&equals; target`&period; The behavior is also undefined unless `0 &equals;&equals; target&hyphen;&gt;nextLink()` is true or `isWellFormed(target, target&hyphen;&gt;nextLink())` are true&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *newNode*
| node to insert into the list
| *target*
| node after which `newNode` is inserted
|===


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