Overview of STC - Smart Template Containers
mainSTC is a comprehensive, general-purpose container and algorithm library for C99/C11. It provides high-performance, type-safe, and generic (templated) data structures and algorithms similar to those found in modern languages like Rust, Zig, and C++.
Key features include:
- Type Safety: Uses templating to avoid error-prone casting and opaque pointers.
- Memory Management: Fully managed containers that use user-supplied or default
dropfunctions for destruction. Supports smart pointers likearc(shared) andbox(unique). - Performance: Optimized implementations, including Robin Hood hashing for
hmap. - Ergonomics: Minimal boilerplate, uniform APIs across containers, and support for ranged for-loops.
- Signed Arithmetic: Uses signed integers for indices and sizes to prevent common unsigned/signed mixing bugs.