https://github.com/briancairl/dont
A collection of C++ template (metaprogramming) utilities that I often need, but don't want to have to re-implement for the 1000th time.
https://github.com/briancairl/dont
compile-time compile-time-meta-programming constexpr cpp cpp17 dont gtest metaprogramming parameter-pack template templates typetraits
Last synced: 2 months ago
JSON representation
A collection of C++ template (metaprogramming) utilities that I often need, but don't want to have to re-implement for the 1000th time.
- Host: GitHub
- URL: https://github.com/briancairl/dont
- Owner: briancairl
- License: mit
- Created: 2024-12-07T20:07:02.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-01-21T14:25:45.000Z (5 months ago)
- Last Synced: 2025-04-14T05:04:06.512Z (2 months ago)
- Topics: compile-time, compile-time-meta-programming, constexpr, cpp, cpp17, dont, gtest, metaprogramming, parameter-pack, template, templates, typetraits
- Language: C++
- Homepage:
- Size: 43 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dont
A collection of C++ template (metaprogramming) utilities that I often need, but don't want to have to re-implement for the 1000th time.
## Requirements
- A C++ compiler that supports:
+ C++17 or greater
+ `#pragma once` because I refuse to accept that it's not standard
- [optional] CMake
- [optional] [GTest](https://github.com/google/googletest) (for unit tests)Note that the `core` implementations included here *do not depend on the STL*.
## Includes
- appending to a template parameter pack
- merging two or more template parameter packs
- conditionally removing types from param packs
- "iterating" over tuple-like objects (loop-unrolling)## Running tests
### Clean rebuild and test
```bash
rm -rf build; (mkdir build && cd build && cmake .. -DDONT_ENABLE_TESTING:bool=on && make && ctest -V)
```