|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Demonstrates Aleph::expected from the C++20/23 compatibility layer.
More...
Go to the source code of this file.
Functions | |
| int | main () |
Demonstrates Aleph::expected from the C++20/23 compatibility layer.
Aleph::expected<T,E> is a non-throwing result type: a function returns either a value or an error, and the caller decides how to react. It maps to std::expected when the toolchain provides C++23, and to an in-house polyfill under C++20. This example shows the canonical "parse without exceptions" pattern plus the monadic combinators.
Build & run: cmake –build build –target ah_cpp_compat_example ./build/Examples/ah_cpp_compat_example
Definition in file ah_cpp_compat_example.cc.
| int main | ( | void | ) |
Definition at line 96 of file ah_cpp_compat_example.cc.
References ALEPH_HAS_STD_EXPECTED, ALEPH_HAS_STD_FLAT_MAP, ALEPH_HAS_STD_GENERATOR, and ALEPH_HAS_STD_MDSPAN.