CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches

Enumerations

enum  STYPE_OPS_FLAGS { ST_CaseInsensitive = 0x00000001 , ST_Equality = 0x00000002 , ST_Overflow = 0x00000004 , ST_Lossless = 0x00000008 }
 

Detailed Description

Enumeration Type Documentation

◆ STYPE_OPS_FLAGS

Flags controlling behavior of type operations (comparison, hashing, conversion). Multiple flags can be combined with bitwise OR.

Enumerator
ST_CaseInsensitive 

Perform case-insensitive operation (valid for: cmp, hash)

When used with comparison or hashing, treats strings and string-like types
in a case-insensitive manner. Has no effect on types that don't support
case-insensitive operations. 
ST_Equality 

Only check equality, not ordering (valid for: cmp)

Indicates that the caller only needs to know if values are equal or not equal.
The comparison function may return 0 for equal and any nonzero value for not equal,
without establishing a proper ordering relationship. This is important for objects
that don't implement the Sortable interface but still need equality testing,
especially when stored in stvar or heterogeneous containers. 
ST_Overflow 

Allow numeric overflow/underflow (valid for: convert)

Disables range checking during type conversion. Allows values outside the
destination type's range to wrap around. For example, converting int32(-1)
to uint32 with this flag produces 0xffffffff. Without this flag, the
conversion would fail. May result in sign flips for signed integers. 
ST_Lossless 

Require lossless conversion (valid for: convert)

Enables extra precision checks during conversion. The conversion will fail
if the exact value cannot be represented in the destination type. For example,
converting int32(16777217) to float32 fails with this flag because float32
cannot represent all integers in that range with full precision, even though
the value is within the numeric range. 

Definition at line 1110 of file stype.h.