davidstone / bounded-integer

C++ library aiming to replace all built-in integers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Libraries

This repository contains three libraries. They are implemented primarily in C++ modules, so there are no header files except for those providing macro definitions.

bounded::integer

You can read the documentation and view the headers and sources. This library handles integer types with compile-time bounds on the range -- bounded::integer<1, 10> is an integer between 1 and 10. Arithmetic operations automatically expand these bounds, so programs without explicit casts or assignment are guaranteed to have no integer overflows.

tv

This provides tv::tuple, tv::variant, and tv::optional. You can view the sources. Documentation should be added eventually.

containers

You can read the documentation and view the sources. This library implements many container types and algorithms. It follows the principles of the C++ standard library, but does not try to be perfectly backward compatible in most cases. There are some containers that have backward compatibility as a goal in include/containers/std. The focus is on maximum efficiency and fully decoupling data structures from algorithms.

Getting the code

  • git submodule update --init will check out any necessary dependencies
  • Configure with cmake
  • Build with clang 16+

About

C++ library aiming to replace all built-in integers

License:Boost Software License 1.0


Languages

Language:C++ 98.7%Language:CMake 1.3%