[#BloombergLP-bslalg-ArrayPrimitives-insert-0ad] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/ArrayPrimitives.adoc[ArrayPrimitives]::insert :relfileprefix: ../../../ :mrdocs: `insert` overloads == Synopses Declared in `<bslalg_arrayprimitives.h>` Insert a movable value, shifting subsequent elements. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ALLOCATOR> static void xref:BloombergLP/bslalg/ArrayPrimitives/insert-04.adoc[insert]( bsl::allocator_traits<ALLOCATOR>::pointer toBegin, bsl::allocator_traits<ALLOCATOR>::pointer toEnd, xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<bsl::allocator_traits<ALLOCATOR>::value_type>] value, ALLOCATOR allocator); ---- [.small]#xref:BloombergLP/bslalg/ArrayPrimitives/insert-04.adoc[_» more..._]# Insert a movable value, shifting subsequent elements. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TARGET_TYPE> static void xref:BloombergLP/bslalg/ArrayPrimitives/insert-0d.adoc[insert]( TARGET_TYPE* toBegin, TARGET_TYPE* toEnd, xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<TARGET_TYPE>] value, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* allocator); ---- [.small]#xref:BloombergLP/bslalg/ArrayPrimitives/insert-0d.adoc[_» more..._]# Insert copies of a value, shifting subsequent elements. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ALLOCATOR> static void xref:BloombergLP/bslalg/ArrayPrimitives/insert-09.adoc[insert]( bsl::allocator_traits<ALLOCATOR>::pointer toBegin, bsl::allocator_traits<ALLOCATOR>::pointer toEnd, bsl::allocator_traits<ALLOCATOR>::value_type const& value, xref:BloombergLP/bslalg/ArrayPrimitives/size_type.adoc[size_type] numElements, ALLOCATOR allocator); ---- [.small]#xref:BloombergLP/bslalg/ArrayPrimitives/insert-09.adoc[_» more..._]# Insert copies of a value, shifting subsequent elements. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TARGET_TYPE> static void xref:BloombergLP/bslalg/ArrayPrimitives/insert-0ab.adoc[insert]( TARGET_TYPE* toBegin, TARGET_TYPE* toEnd, TARGET_TYPE const& value, xref:BloombergLP/bslalg/ArrayPrimitives/size_type.adoc[size_type] numElements, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* allocator); ---- [.small]#xref:BloombergLP/bslalg/ArrayPrimitives/insert-0ab.adoc[_» more..._]# Same as the preceding `insert` overload, taking pointer iterators. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class ALLOCATOR, class SOURCE_TYPE> static void xref:BloombergLP/bslalg/ArrayPrimitives/insert-0e.adoc[insert]( bsl::allocator_traits<ALLOCATOR>::pointer toBegin, bsl::allocator_traits<ALLOCATOR>::pointer toEnd, SOURCE_TYPE* fromBegin, SOURCE_TYPE* fromEnd, xref:BloombergLP/bslalg/ArrayPrimitives/size_type.adoc[size_type] numElements, ALLOCATOR allocator); ---- [.small]#xref:BloombergLP/bslalg/ArrayPrimitives/insert-0e.adoc[_» more..._]# Same as the preceding overload, taking pointer iterators. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class TARGET_TYPE, class SOURCE_TYPE> static void xref:BloombergLP/bslalg/ArrayPrimitives/insert-0c.adoc[insert]( TARGET_TYPE* toBegin, TARGET_TYPE* toEnd, SOURCE_TYPE* fromBegin, SOURCE_TYPE* fromEnd, xref:BloombergLP/bslalg/ArrayPrimitives/size_type.adoc[size_type] numElements, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* allocator); ---- [.small]#xref:BloombergLP/bslalg/ArrayPrimitives/insert-0c.adoc[_» more..._]# Insert a source range, shifting subsequent elements. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class ALLOCATOR, class FWD_ITER, class SENTINEL> static void xref:BloombergLP/bslalg/ArrayPrimitives/insert-0f.adoc[insert]( bsl::allocator_traits<ALLOCATOR>::pointer toBegin, bsl::allocator_traits<ALLOCATOR>::pointer toEnd, FWD_ITER fromBegin, SENTINEL fromEnd, xref:BloombergLP/bslalg/ArrayPrimitives/size_type.adoc[size_type] numElements, ALLOCATOR allocator); ---- [.small]#xref:BloombergLP/bslalg/ArrayPrimitives/insert-0f.adoc[_» more..._]# Insert a source range, shifting subsequent elements. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class TARGET_TYPE, class FWD_ITER, class SENTINEL> static void xref:BloombergLP/bslalg/ArrayPrimitives/insert-06.adoc[insert]( TARGET_TYPE* toBegin, TARGET_TYPE* toEnd, FWD_ITER fromBegin, SENTINEL fromEnd, xref:BloombergLP/bslalg/ArrayPrimitives/size_type.adoc[size_type] numElements, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* allocator); ---- [.small]#xref:BloombergLP/bslalg/ArrayPrimitives/insert-06.adoc[_» more..._]# == Parameters [cols="1,4"] |=== | Name| Description | *toBegin* | insertion position within the destination array | *toEnd* | end of the populated destination range | *value* | movable value to insert | *allocator* | allocator used to supply memory if required | *numElements* | number of copies of `value` to insert | *fromBegin* | beginning of the source range to insert | *fromEnd* | end of the source range to insert |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#