Registry / utility / status-value-lite

status-value-lite

JSON →
library1.1.0vcpkgunverified

status_value is a single-file header-only library for objects that represent a status and an optional value. It is intended for use with C++11 and later.

vcpkg install status-value-lite
INSTALL
IMPORT
SIG · STATUS-VALUE-LITE
S
status-value-lite
utilitycppv1.1.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.

nonstd/status_value.hpp
#include <nonstd/status_value.hpp>

Return status and value from a function

#include <nonstd/status_value.hpp> #include <iostream> nonstd::status_value<int> divide(int a, int b) { if (b == 0) return {1, 0}; // error code 1 return {0, a / b}; } int main() { auto result = divide(10, 2); if (result.status() == 0) std::cout << result.value(); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.1.0latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
6
Amazon
1
Resources

No resource links recorded.

status-value-lite — pip install status-value-lite · libregistry