https://github.com/samuelmarks/linked-list
Linked-list implementation with from/to array support
https://github.com/samuelmarks/linked-list
Last synced: 6 months ago
JSON representation
Linked-list implementation with from/to array support
- Host: GitHub
- URL: https://github.com/samuelmarks/linked-list
- Owner: SamuelMarks
- License: apache-2.0
- Created: 2023-07-03T20:29:25.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-07-07T02:19:41.000Z (about 3 years ago)
- Last Synced: 2025-01-28T04:32:02.172Z (over 1 year ago)
- Language: CMake
- Size: 33.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
linked-list
===========
[](https://opensource.org/licenses/Apache-2.0)
[](https://github.com/SamuelMarks/linked-list/actions/workflows/linux-Windows-macOS.yml)
Linked-list implementation with from/to array support
## Design choices
Unlike `sys/queue.h` from BSD (1995), this avoids:
- macro usage
- special handling of first|empty list and last list element (as per [Linus Torvalds good-taste argument](https://www.ted.com/talks/linus_torvalds_the_mind_behind_linux))
Additionally, incorporated ASans and support for all compiler toolchains that integrate with CMake.
## Development guide
Install: CMake ; C compiler toolchain ; git. Then:
```sh
$ git clone "https://github.com/offscale/vcpkg" -b "project0"
# Windows:
$ vcpkg\bootstrap-vcpkg.bat
# Non-Windows:
$ ./vcpkg/bootstrap-vcpkg.sh
# Both Windows and non-Windows:
$ git clone "https://github.com/SamuelMarks/linked-list" && cd "linked-list" # Or your fork of this repo
# Windows
$ cmake -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_TOOLCHAIN_FILE="..\vcpkg\scripts\buildsystems\vcpkg.cmake" -S . -B "build"
# Non-Windows
$ cmake -DCMAKE_BUILD_TYPE='Debug' -DCMAKE_TOOLCHAIN_FILE='../vcpkg/scripts/buildsystems/vcpkg.cmake' -S . -B 'build'
# Both Windows and non-Windows:
$ cmake --build "build"
# Test on both Windows and non-Windows:
$ cd "build" && ctest -C "Debug" --verbose
```
---
## License
Licensed under either of
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or )
- MIT license ([LICENSE-MIT](LICENSE-MIT) or )
at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.