[#BloombergLP-balcl-TypeInfo-setConstraint-02] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balcl.adoc[balcl]::xref:BloombergLP/balcl/TypeInfo.adoc[TypeInfo]::setConstraint :relfileprefix: ../../../ :mrdocs: `setConstraint` overloads == Synopses Declared in `<balcl_typeinfo.h>` 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()); ` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:BloombergLP/balcl/TypeInfo/setConstraint-0ad.adoc[setConstraint](xref:BloombergLP/balcl/Constraint/CharConstraint.adoc[Constraint::CharConstraint] const& constraint); ---- [.small]#xref:BloombergLP/balcl/TypeInfo/setConstraint-0ad.adoc[_» more..._]# Put the specified `constraint` on the value of the described option. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:BloombergLP/balcl/TypeInfo/setConstraint-0ac.adoc[setConstraint](xref:BloombergLP/balcl/Constraint/DateConstraint.adoc[Constraint::DateConstraint] const& constraint); ---- [.small]#xref:BloombergLP/balcl/TypeInfo/setConstraint-0ac.adoc[_» more..._]# Put the specified `constraint` on the value of the described option. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:BloombergLP/balcl/TypeInfo/setConstraint-09.adoc[setConstraint](xref:BloombergLP/balcl/Constraint/DatetimeConstraint.adoc[Constraint::DatetimeConstraint] const& constraint); ---- [.small]#xref:BloombergLP/balcl/TypeInfo/setConstraint-09.adoc[_» more..._]# Put the specified `constraint` on the value of the described option. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:BloombergLP/balcl/TypeInfo/setConstraint-0d.adoc[setConstraint](xref:BloombergLP/balcl/Constraint/DoubleConstraint.adoc[Constraint::DoubleConstraint] const& constraint); ---- [.small]#xref:BloombergLP/balcl/TypeInfo/setConstraint-0d.adoc[_» more..._]# Put the specified `constraint` on the value of the described option. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:BloombergLP/balcl/TypeInfo/setConstraint-08.adoc[setConstraint](xref:BloombergLP/balcl/Constraint/Int64Constraint.adoc[Constraint::Int64Constraint] const& constraint); ---- [.small]#xref:BloombergLP/balcl/TypeInfo/setConstraint-08.adoc[_» more..._]# Put the specified `constraint` on the value of the described option. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:BloombergLP/balcl/TypeInfo/setConstraint-0a8.adoc[setConstraint](xref:BloombergLP/balcl/Constraint/IntConstraint.adoc[Constraint::IntConstraint] const& constraint); ---- [.small]#xref:BloombergLP/balcl/TypeInfo/setConstraint-0a8.adoc[_» more..._]# Put the specified `constraint` on the value of the described option. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:BloombergLP/balcl/TypeInfo/setConstraint-05.adoc[setConstraint](xref:BloombergLP/balcl/Constraint/StringConstraint.adoc[Constraint::StringConstraint] const& constraint); ---- [.small]#xref:BloombergLP/balcl/TypeInfo/setConstraint-05.adoc[_» more..._]# Put the specified `constraint` on the value of the described option. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:BloombergLP/balcl/TypeInfo/setConstraint-0a5.adoc[setConstraint](xref:BloombergLP/balcl/Constraint/TimeConstraint.adoc[Constraint::TimeConstraint] const& constraint); ---- [.small]#xref:BloombergLP/balcl/TypeInfo/setConstraint-0a5.adoc[_» more..._]# 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:BloombergLP/balcl/TypeInfo/setConstraint-07.adoc[setConstraint](xref:bsl/shared_ptr-0a.adoc[bsl::shared_ptr<TypeInfoConstraint>] const& constraint); ---- [.small]#xref:BloombergLP/balcl/TypeInfo/setConstraint-07.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#