arena allocator + incremental garbage collector
  • C++ 98.4%
  • CMake 1.6%
Find a file
2024-04-01 20:16:46 -04:00
.github/workflows github: + doxygen dep 2024-04-01 20:13:51 -04:00
cmake build: move unit+quantity feature from xo-observable -> xo-unit 2024-04-01 19:34:04 -04:00
docs build: move unit+quantity feature from xo-observable -> xo-unit 2024-04-01 19:34:04 -04:00
include/xo/unit build: drop stray #include (did you do that, lsp?) 2024-04-01 20:16:46 -04:00
utest build: move unit+quantity feature from xo-observable -> xo-unit 2024-04-01 19:34:04 -04:00
.gitignore + .gitignore 2024-04-01 20:11:11 -04:00
CMakeLists.txt build: move unit+quantity feature from xo-observable -> xo-unit 2024-04-01 19:34:04 -04:00
README.md doc: + README.md 2024-04-01 19:43:30 -04:00

unit library

Provides compile-time dimension checking and scaling.

Similar to boost::units, but:

  1. streamlined: assumes modern (c++20) support
  2. supports fractional dimensions (rational powers)

Getting Started

build + install dependencies

build + install

$ cd xo-unit
$ mkdir .build
$ cd .build
$ PREFIX=/usr/local  # or wherever you prefer
$ cmake -DCMAKE_MODULE_PATH=${PREFIX}/share/cmake -DCMAKE_PREFIX_PATH=${PREFIX} -DCMAKE_INSTALL_PREFIX=${PREFIX} ..
$ make
$ make install

build for unit test coverage

$ cd xo-unit
$ mkdir .build-ccov
$ cd .build-ccov
$ cmake -DCMAKE_MODULE_PATH=${INSTALL_PREFIX}/share/cmake  -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} -DCODE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug ..

LSP support

$ cd xo-unit
$ ln -s .build/compile_commands.json  # lsp will look for compile_commands.json in the root of the source tree