Registry / utility / expected-lite

expected-lite

JSON →
library0.10.0vcpkgunverified

Expected objects in C++11 and later in a single-file header-only library.

vcpkg install expected-lite
INSTALL
IMPORT
SIG · EXPECTED-LITE
E
expected-lite
utilitycppv0.10.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/expected.hpp
✓ #include <nonstd/expected.hpp>

Use expected to handle division by zero without exceptions.

#include <nonstd/expected.hpp> #include <iostream> nonstd::expected<int, std::string> divide(int a, int b) { if (b == 0) return nonstd::make_unexpected("division by zero"); return a / b; } int main() { auto result = divide(10, 2); if (result) std::cout << *result << std::endl; else std::cout << result.error() << std::endl; return 0; }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.10.0latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources

No resource links recorded.

expected-lite — pip install expected-lite · libregistry