[#bsl-basic_string-01d-2constructor-0e] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-01d.adoc[basic_string<char8_t>]::basic_string :relfileprefix: ../../ :mrdocs: Create a string that has the same value as the specified `object`. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is not specified, then a default‐constructed allocator is used. == Synopsis Declared in `<bslstl_string.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class STRING_VIEW_LIKE_TYPE> explicit basic_string(STRING_VIEW_LIKE_TYPE const& object); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#