[#BloombergLP-balcl-TypeInfo-setConstraint-0ad]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balcl.adoc[balcl]::xref:BloombergLP/balcl/TypeInfo.adoc[TypeInfo]::setConstraint
:relfileprefix: ../../../
:mrdocs:

Put the specified `constraint` on the value of the described option, replacing any constraint that had been in effect (if any)&period; The behavior is undefined unless the described option is not a flag and the `balcl&colon;&colon;OptionValue` type of the described option corresponds to the type of `constraint`&period; Note that two distinct objects that have the same `constraint` put on them will compare _unequal_ unless the constraint is shared among them, which can be done by&colon; &grave; aTypeInfo&period;setConstraint(anotherTypeInfo&period;constraint())&semi; &grave;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
setConstraint(xref:BloombergLP/balcl/Constraint/CharConstraint.adoc[Constraint::CharConstraint] const& constraint);
----


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