Skip to content

San7o/tenno-tl

Repository files navigation

tenno template library

Tenno is a replacement for the C++23 standard library, providing light constexpr and thread-safe containers, algorithms and data structures for your projects. You can expect most of the apis to be similar to the ones in the standard library.

Tenno is implemented as a header only library, meaning that you can just include the files under the include directory in your project, or you can just copy-paste the ones that you need.

Design goals

  • values are returned as optional or expected instead of raising exceptions
  • heavy support for constexpr functions and data structures
  • thread-safe data structures
  • modern-looking c++ code
  • performance

The library officially supports all GCC compilers starting from gcc-8.5.0. Constexpr functions are guaranteed to work from c++20 onward.

Currently implemented

Testing

The library uses valFuzz for testing

./build/tenno_tests              # run tests
./build/tenno_tests --fuzz       # run fuzzer
./build/tenno_tests --benchmark  # run benchmarks

Documentation

The library uses doxygen for documentation, to build the html documentation run:

make docs

Differences with STL

random

tenno implements compile-time random number generation through the uniform_real_distribution() and the random_array() functions, enabling you to use random numbers in constexpr algorithms.

array

tenno::array<T,N>.at(n) returns expected<T,E> with either the value or a tenno::error with the error out_of_range if the range specified is bigger than the size of the array.

vector

  • tenno::vector<T>.at(n) returns expected<T,E>
  • tenno::vector<T>.front() return expected<const T&,E>
  • tenno::vector<T>.back() returns expected<const T&,E>

About

Tenno is a replacement for the C++23 standard library, providing light constexpr and thread-safe containers, algorithms and data structures for your projects.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages