[#bsl-vector-008-2constructor-080]
= xref:bsl.adoc[bsl]::xref:bsl/vector-008.adoc[vector&lt;Json&gt;]::vector
:relfileprefix: ../../
:mrdocs:

Create a vector of the specified `initialSize` whose every element is a copy of the specified `value`&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is not specified, a default&hyphen;constructed object of the (template parameter) type `ALLOCATOR` is used&period; If the type `ALLOCATOR` is `bsl&colon;&colon;allocator` and `basicAllocator` is not supplied, the currently installed default allocator is used&period; Throw `std&colon;&colon;length&lowbar;error` if `initialSize &gt; max&lowbar;size()`&period; This method requires that the (template parameter) type `VALUE&lowbar;TYPE` be `copy&hyphen;insertable` into this vector (see &lcub;Requirements on `VALUE&lowbar;TYPE`&rcub;)&period; Note that a `bslma&colon;&colon;Allocator &ast;` can be supplied for `basicAllocator` if the type `ALLOCATOR` is `bsl&colon;&colon;allocator` (the default)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
vector(
    xref:bsl/vector-008/size_type.adoc[size&lowbar;type] initialSize,
    xref:BloombergLP/bdljsn/Json.adoc[Json] const& value,
    xref:bsl/allocator-0df.adoc[allocator&lt;Json&gt;] const& basicAllocator = ALLOCATOR());
----


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