[#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). The behavior is undefined unless the described option is not a flag and the `balcl::OptionValue` type of the described option corresponds to the type of `constraint`. 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: ` aTypeInfo.setConstraint(anotherTypeInfo.constraint()); ` == Synopsis Declared in `<balcl_typeinfo.h>` [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]#