An implementation of Conway's Game of Life in C++2.
Make sure the cppfront git submodule is initialized. You can do this by cloning the repository
with the --recurse flag, otherwise run git submodule update --init.
To build it, run:
cd cppfront/source
g++ cppfront.cpp -std=c++20 -o cppfront
cd ../..
You must first transpile from C++2 to C++, with:
cppfront/source/cppfront life.cpp2 -p
Now you can compile and execute:
export CPPFRONT_INCLUDE=$(pwd)/cppfront/include # path to cppfront header files
g++ life.cpp -std=c++20 -ICPPFRONT_INCLUDE -o life
./life
- C++2 & cppfront documentation
- CMake wrapper for cppfront (requires CMake 3.30+, make, and GCC 14+)
- This was inspired by my buddy's awful C implementation