|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Parsing CA patterns without exceptions via the try_read_* overloads.
More...
Go to the source code of this file.
Functions | |
| int | main () |
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.
| int main | ( | void | ) |
Definition at line 71 of file ca_io_expected_example.cc.
References Aleph::CA::Binary_Cell_Pattern::alive, Aleph::blossom_maximum_cardinality_matching(), Aleph::Array< T >::size(), Aleph::CA::try_read_life_106(), and Aleph::CA::try_read_rle().