[#BloombergLP-balcl-TypeInfoUtil-satisfiesConstraint-03]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balcl.adoc[balcl]::xref:BloombergLP/balcl/TypeInfoUtil.adoc[TypeInfoUtil]::satisfiesConstraint
:relfileprefix: ../../../
:mrdocs:

Return `true` if the value at the specified `variable` satisfies the constraint of the specified `typeInfo` object (if any), and `false` otherwise&period; Optionally specify a `stream`&semi; if `stream` is specified and validation fails, a descriptive error message indicating the reason for the failure is written to `stream`&period; If `typeInfo` holds no constraint, this method returns `true`&period; The behavior is undefined unless `variable` can be (validly) cast to `OptionType&lt;ENUM&gt;&colon;&colon;EnumToType&colon;&colon;type &ast;` where `ENUM` matches `typeInfo&period;type()`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
bool
satisfiesConstraint(
    void const* variable,
    xref:BloombergLP/balcl/TypeInfo.adoc[TypeInfo] const& typeInfo);
----


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