[#BloombergLP-bdlb-VariantImp-assignTo] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/VariantImp.adoc[VariantImp]::assignTo :relfileprefix: ../../../ :mrdocs: Assign to this object the specified `value` of template parameter `SOURCE_TYPE` converted to template parameter `TYPE`, and return a reference providing modifiable access to this object. The value currently held by this variant (if any) is destroyed if that value's type is not the same as `TYPE`. `TYPE` must be the same as one of the types that this variant can hold and `SOURCE_TYPE` must be convertible to `TYPE`. == Synopsis Declared in `<bdlb_variant.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class TYPE, class SOURCE_TYPE> xref:BloombergLP/bdlb/VariantImp.adoc[VariantImp<TYPES>]& assignTo(SOURCE_TYPE const& value); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#