Registry / utility / resultlib

resultlib

JSON →
library1.0.0vcpkgunverified

Elegant error handling in C

vcpkg install resultlib
INSTALL
IMPORT
SIG · RESULTLIB
R
resultlib
utilitycppv1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

result.h
#include <result.h>

Use Result type for error handling

#include "result.h" Result(int) divide(int a, int b) { if (b == 0) return Err("division by zero"); return Ok(a / b); } int main() { Result(int) r = divide(10, 2); if (r.is_ok) { /* use r.value */ } return 0; }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.0latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources

No resource links recorded.

resultlib — pip install resultlib · libregistry