[#BloombergLP-balcl-TypeInfoUtil-satisfiesConstraint-00] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balcl.adoc[balcl]::xref:BloombergLP/balcl/TypeInfoUtil.adoc[TypeInfoUtil]::satisfiesConstraint :relfileprefix: ../../../ :mrdocs: Return `true` if the specified `element` satisfies the constraint of `typeInfo`. == Synopsis Declared in `<balcl_typeinfo.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static bool satisfiesConstraint( xref:BloombergLP/balcl/OptionValue.adoc[OptionValue] const& element, xref:BloombergLP/balcl/TypeInfo.adoc[TypeInfo] const& typeInfo); ---- == Description Return `true` if the specified `element` satisfies the constraint of the specified `typeInfo` object (if any), and `false` otherwise. Optionally specify a `stream`; if `stream` is specified and validation fails, a descriptive error message indicating the reason for the failure is written to `stream`. If `typeInfo` holds no constraint, this method returns `true`. The behavior is undefined unless `element.type() == typeInfo.type()`. == Return Value `true` if `element` satisfies the constraint (or there is none), and `false` otherwise == Parameters [cols="1,4"] |=== | Name| Description | *element* | option value to validate | *typeInfo* | type and constraint information |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#