[#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`&period;

== Synopsis

Declared in `&lt;balcl&lowbar;typeinfo&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
setConstraint(xref:bsl/shared_ptr-0a.adoc[bsl::shared&lowbar;ptr&lt;TypeInfoConstraint&gt;] const& constraint);
----

== Description

Set the constraint of the described option to the specified `constraint`&period; The behavior is undefined unless the option associated with `constraint` has the same type as the option associated with this object&period; Note that the linked variable, if any, is unchanged by this method&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *constraint*
| shared constraint to install
|===


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