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

Parsing CA patterns without exceptions via the try_read_* overloads. More...

#include <cstddef>
#include <iostream>
#include <sstream>
#include <string>
#include <ca-io.H>
Include dependency graph for ca_io_expected_example.cc:

Go to the source code of this file.

Functions

int main ()
 

Detailed Description

Parsing CA patterns without exceptions via the try_read_* overloads.

The try_read_* readers in ca-io.H return Aleph::expected<Result, std::string> instead of throwing. This is convenient when the input is untrusted (a user-supplied file): an invalid pattern is an ordinary result, not an exceptional condition, and the call site reads as a simple branch.

Build & run: cmake –build build –target ca_io_expected_example ./build/Examples/ca_io_expected_example

Definition in file ca_io_expected_example.cc.

Function Documentation

◆ main()