Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/beihao-zhou/compiletimelib
A compile-time C++ library
https://github.com/beihao-zhou/compiletimelib
Last synced: 12 days ago
JSON representation
A compile-time C++ library
- Host: GitHub
- URL: https://github.com/beihao-zhou/compiletimelib
- Owner: Beihao-Zhou
- License: mit
- Created: 2024-06-23T05:54:40.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-06-23T21:43:29.000Z (5 months ago)
- Last Synced: 2024-06-24T07:27:22.326Z (5 months ago)
- Language: C++
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CompileTimeLib
A compile-time C++ library## Features
- **Static Set**: A compile-time set container that ensures unique elements.
- **Static Vector**: A compile-time vector container.## Next
- **Compile-Time Algorithms**: Functions that perform operations such as sorting and searching during compilation.
- **Compile-Time Serialization**: Techniques for serializing data at compile time.## Getting Started
### Prerequisites
- C++17 compiler (e.g., GCC, Clang, MSVC)
- CMake 3.10 or higher (for building the project)### Installation
Commands to format, build and test can be found in `manage.py`.## Usage
Here is an example of how to use the `static_set` in your C++ code:
```cpp
int main() {
using MySet = ct_container::static_set::insert<1>::insert<2>::insert<3>;
static_assert(MySet::contains<2>(), "Set should contain 2");
return 0;
}
```## License
Distributed under the MIT License. See `LICENSE` for more information.