Return true if the value at variable satisfies the constraint of typeInfo.

Synopsis

Declared in <balcl_typeinfo.h>

static
bool
satisfiesConstraint(
    void const* variable,
    TypeInfo const& typeInfo);

Description

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().

Return Value

true if the value satisfies the constraint (or there is none), and false otherwise

Parameters

Name

Description

variable

address of the value to validate

typeInfo

type and constraint information

Created with MrDocs