[#BloombergLP-balcl-TypeInfoUtil-satisfiesConstraint-04] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balcl.adoc[balcl]::xref:BloombergLP/balcl/TypeInfoUtil.adoc[TypeInfoUtil]::satisfiesConstraint :relfileprefix: ../../../ :mrdocs: `satisfiesConstraint` overloads == Synopses Declared in `<balcl_typeinfo.h>` 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()`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static bool xref:BloombergLP/balcl/TypeInfoUtil/satisfiesConstraint-00.adoc[satisfiesConstraint]( xref:BloombergLP/balcl/OptionValue.adoc[OptionValue] const& element, xref:BloombergLP/balcl/TypeInfo.adoc[TypeInfo] const& typeInfo); ---- [.small]#xref:BloombergLP/balcl/TypeInfoUtil/satisfiesConstraint-00.adoc[_» more..._]# Return `true` if the value at the specified `variable` 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 `variable` can be (validly) cast to `OptionType<ENUM>::EnumToType::type *` where `ENUM` matches `typeInfo.type()`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static bool xref:BloombergLP/balcl/TypeInfoUtil/satisfiesConstraint-03.adoc[satisfiesConstraint]( void const* variable, xref:BloombergLP/balcl/TypeInfo.adoc[TypeInfo] const& typeInfo); ---- [.small]#xref:BloombergLP/balcl/TypeInfoUtil/satisfiesConstraint-03.adoc[_» more..._]# Same as the preceding overload, but write a descriptive error message to the specified `stream` when validation fails. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static bool xref:BloombergLP/balcl/TypeInfoUtil/satisfiesConstraint-0c.adoc[satisfiesConstraint]( xref:BloombergLP/balcl/OptionValue.adoc[OptionValue] const& element, xref:BloombergLP/balcl/TypeInfo.adoc[TypeInfo] const& typeInfo, std::ostream& stream); ---- [.small]#xref:BloombergLP/balcl/TypeInfoUtil/satisfiesConstraint-0c.adoc[_» more..._]# Return `true` if the value at the specified `variable` satisfies the constraint of the specified `typeInfo` object, writing errors to the specified `stream` if validation fails. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static bool xref:BloombergLP/balcl/TypeInfoUtil/satisfiesConstraint-0a.adoc[satisfiesConstraint]( void const* variable, xref:BloombergLP/balcl/TypeInfo.adoc[TypeInfo] const& typeInfo, std::ostream& stream); ---- [.small]#xref:BloombergLP/balcl/TypeInfoUtil/satisfiesConstraint-0a.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#