Defaulting strtoul arguments
A wrapper can let callers omit endptr and base: strtoul(argv[1]) expands to strtoul(argv[1], nullptr, 0), while strtoul(argv[1], ptr, 10) remains unchanged. section 17.5
C functions do not receive omitted arguments directly. Function-like macros simulate defaults by counting supplied arguments, selecting a specialized macro, and inserting missing values before the function call. section 17.5
The implementation pattern separates argument handling from the wrapped function:
- Use __VA_OPT__ to distinguish an empty optional argument list from a nonempty one. section 17.5
- Dispatch to fixed-arity helpers such as DEFAULT1, DEFAULT2, or DEFAULT3, which substitute defaults and reject excess arguments. section 17.5
- Prefer a simple macro interface over exposing the complex replacement logic. section 17.0



















