Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daleksla/stl
Common algorithms & structural implementations of the C++'s standard library, rewritten to be small, portable, and fast
https://github.com/daleksla/stl
common-algorithms compilation cpp cpp11 cpp14 data-structures header-only template-metaprogramming
Last synced: about 4 hours ago
JSON representation
Common algorithms & structural implementations of the C++'s standard library, rewritten to be small, portable, and fast
- Host: GitHub
- URL: https://github.com/daleksla/stl
- Owner: daleksla
- License: other
- Created: 2021-03-01T03:18:33.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-05-09T13:56:29.000Z (over 1 year ago)
- Last Synced: 2023-05-09T14:54:32.269Z (over 1 year ago)
- Topics: common-algorithms, compilation, cpp, cpp11, cpp14, data-structures, header-only, template-metaprogramming
- Language: C++
- Homepage:
- Size: 41.1 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# STL
Common algorithms & structural implementations of the C++'s standard library, rewritten to be small, portable, and fast## Summarising
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:
1. Rewriting code to take up little space in memory
2. Writing *all* code to be compiled & ran for a C++11 compiler (even if the features were inspired from a later standard)
3. SpeedNotes:
- 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](https://github.com/daleksla/posicxx) 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).## Building
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
[![Clang](https://github.com/daleksla/STL/actions/workflows/clang.yml/badge.svg)](https://github.com/daleksla/STL/actions/workflows/clang.yml) [![GCC](https://github.com/daleksla/STL/actions/workflows/gcc.yml/badge.svg)](https://github.com/daleksla/STL/actions/workflows/gcc.yml) [![Testing](https://github.com/daleksla/STL/actions/workflows/testing.yml/badge.svg)](https://github.com/daleksla/STL/actions/workflows/testing.yml)
## Using
You will need to include the relevant headers as you would for C++'s STL alternatives
For example:
`#include `
...is now...
`#include `
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