Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ah_cpp_compat_example.cc File Reference

Demonstrates Aleph::expected from the C++20/23 compatibility layer. More...

#include <iostream>
#include <limits>
#include <string>
#include <ah-cpp-compat.H>
Include dependency graph for ah_cpp_compat_example.cc:

Go to the source code of this file.

Functions

int main ()
 

Detailed Description

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.

Function Documentation

◆ main()