VecMustInsertL
Description
Aborting (Must*) variants of every fallible insertion macro above.
Each VecMustXxx(...) is the statement-style do-while wrapper around the matching VecXxx(...) expression: it calls the underlying fallible form and triggers LOG_FATAL(...) if the call returns false. Use these at API boundaries where allocation failure is not a recoverable condition for the caller. Otherwise prefer the propagating forms.
Success
Returns to the caller.
Failure
Does not return - aborts via LOG_FATAL / Abort.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Insert.h:554:
do { \
if (!VecInsertL((v), (lval), (idx))) { \
LOG_FATAL("VecMustInsertL failed"); \
} \
} while (0)- In
Insert.h:55:
/// TAGS: Str, Insert, Char, Must, Abort
///
#define StrMustInsertL(str, lval, idx) VecMustInsertL((str), (lval), (idx))
#define StrMustInsertR(str, rval, idx) VecMustInsertR((str), (rval), (idx))
#define StrMustInsert(str, val, idx) StrMustInsertL((str), (val), (idx))
Last updated on