helper predicate for identifying type tags associated with aggregates

This commit is contained in:
Vern Paxson 2021-01-23 10:27:49 -08:00
parent 732633ebb4
commit 28bb39b548

View file

@ -920,6 +920,12 @@ inline bool IsVector(TypeTag t) { return (t == TYPE_VECTOR); }
// True if the given type type is a string.
inline bool IsString(TypeTag t) { return (t == TYPE_STRING); }
// True if the given type is a container aggregate.
inline bool IsAggr(TypeTag tag)
{
return tag == TYPE_VECTOR || tag == TYPE_TABLE || tag == TYPE_RECORD;
}
// True if the given type tag corresponds to the error type.
inline bool IsErrorType(TypeTag t) { return (t == TYPE_ERROR); }