[#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 `&lt;balcl&lowbar;typeinfo&period;h&gt;`

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;


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

Put the specified `constraint` on the value of the described option&period;


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

Put the specified `constraint` on the value of the described option&period;


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

Put the specified `constraint` on the value of the described option&period;


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

Put the specified `constraint` on the value of the described option&period;


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

Put the specified `constraint` on the value of the described option&period;


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

Put the specified `constraint` on the value of the described option&period;


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

Put the specified `constraint` on the value of the described option&period;


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

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;


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

[.small]#xref:BloombergLP/balcl/TypeInfo/setConstraint-07.adoc[_» more&period;&period;&period;_]#


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