[#BloombergLP-balcl-TypeInfo-setConstraint-07] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balcl.adoc[balcl]::xref:BloombergLP/balcl/TypeInfo.adoc[TypeInfo]::setConstraint :relfileprefix: ../../../ :mrdocs: Set the constraint of the described option to the specified `constraint`. The behavior is undefined unless the option associated with `constraint` has the same type as the option associated with this object. Note that the linked variable, if any, is unchanged by this method. == Synopsis Declared in `<balcl_typeinfo.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void setConstraint(xref:bsl/shared_ptr-0a.adoc[bsl::shared_ptr<TypeInfoConstraint>] const& constraint); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#