Common algorithms & structural implementations of the C++'s standard library, rewritten to be small, portable, and fast
This library is a reimplementation of C++'s more common algorithms & structural implementations (e.g. std::vector -> stl::vector, etc.), with a key focus on:
- Rewriting code to take up little space in memory
- Writing all code to be compiled & ran for a C++11 compiler (even if the features were inspired from a later standard)
- Fast
Notes:
- This project is not concerned with replacing the general-use, feature-rich tried-and-tested C++ STL. If you want something fast & small, have very specific compiler requirements, and don't require lucrative features of C++ (e.g. filesystem libraries) then this is for you
- The threading / concurrency library is not included due to the scoping issues it would present to this project (e,g. aspects such as atomics are hardware dependant)
- This is not focussed on reimplementing the C standard libraries which C++ happens to wrap (e.g. malloc ->
stl::malloc) - This library also will not deal with exception handling
- Note: I use exception handling in my other works and I prefer much more to error-codes (in fact this wrapper around POSIX standard functions creates wrappers around all the system calls which utilise C++ exceptions. But that library was written for convinient error-checking with minimal overhead, a different purpose to this library's.
Since virtually the entire library uses (static) polymorphism and template meta-programming, attempting to provide a library file is pointless. It is therefore header-only and the library does not require explicit compilation
You will need to include the relevant headers as you would for C++'s STL alternatives
For example:
#include
...is now...
#include <vector.hpp>
Refer to documentation for usage of each function / class.
(c) Salih Mahmoud Sayed Ahmed, 2021. All rights reserved. See LICENSE for terms on code usage