arena allocator + incremental garbage collector
- C++ 98.4%
- CMake 1.6%
| cmake | ||
| example | ||
| include/xo/ratio | ||
| .gitignore | ||
| CMakeLists.txt | ||
| LICENSE | ||
| README.md | ||
ratio library
Header-only, constexpr library providing exact representation for rational numbers.
Relative to std::ratio:
- Uses
constexprinstead of creating new types. This means it can be used seamlessly at runtime. - Supports a few more arithmetic operations, for example exponentiation to integer powers.
- Provides concept support (with c++20)
- Requires modern (c++17) support to achieve this
Getting Started
install dependencies
- github/Rconybea/xo-cmake cmake macros
build + install
$ cd xo-ratio
$ PREFIX=/usr/local # for example
$ BUILDDIR=.build # for example
$ make ${BUILDDIR}
$ cmake -DCMAKE_PREFIX_PATH=${PREFIX} -B ${BUILDDIR}