Getting Started¶
Installation¶
PrototypeSTL is header-only. Clone the repository and add the include path to your build:
CMake¶
Makefile¶
Direct Include¶
Compiler Requirements¶
| Compiler | Minimum Version |
|---|---|
| GCC | 7.0+ |
| Clang | 6.0+ |
| MSVC | 2017 (19.14+) |
| ICC | 19.0+ |
Build Flags¶
PrototypeSTL is designed to work with strict compiler settings:
Configuration¶
The library auto-detects your C++ standard version. Override with:
Debug Mode¶
First Program¶
#include <prototype/containers/vector.hpp>
#include <prototype/containers/string.hpp>
#include <prototype/algorithms/sort.hpp>
#include <cstdio>
int main() {
prototype::vector<int> numbers;
numbers.push_back(5);
numbers.push_back(2);
numbers.push_back(8);
numbers.push_back(1);
prototype::sort(numbers.begin(), numbers.end());
for (size_t i = 0; i < numbers.size(); ++i) {
printf("%d ", numbers[i]);
}
printf("\n");
return 0;
}
Build and run:
Using STL-Compatible Wrappers¶
For drop-in STL replacement, use the wrapper headers:
#include "containers/vector" // Instead of <vector>
#include "algorithms/algorithm" // Instead of <algorithm>
These bring prototype types into the global namespace, making migration from std:: trivial.
Next Steps¶
- Architecture Understand the library structure
- Design Philosophy Why we made these choices
- Allocator Guide Master custom memory management