Top 23 C++ header-only Projects
JSON for Modern C++Latest mention: GitHub Stale Bots – A False Economy | reddit.com/r/programming | 2021-01-18
I use a stale bot on nlohmann/json and find it pretty useful (though I do not lock issues, but merely tag them "stale" and close them a bit later. Those issues can still be commented, and in the time they are marked stale, any comment will reopen them).
A modern, C++-native, header-only, test framework for unit-tests, TDD and BDD - using C++11, C++14, C++17 and later (or C++03 on the Catch1.x branch)Latest mention: Resources that help you to delve into C++ | dev.to | 2021-01-16
Now it is time to put C++ into practical usage. C++ is used for diverse purposes, and using C++ in specific areas is probably more critical than the C++ language itself. It is perhaps also a good time to spend some time on the broader C++ ecosystems, like unit test libraries such as Catch2, build system generators such as CMake, and package managers such as Conan.
Fast C++ logging library.Latest mention: What tools similar to std::optional should you be using? | reddit.com/r/cpp | 2021-01-02
Yeah. I just added spdlog to a project and it's infuriating how the API expects things to be held in a shared pointer. Let me design my own ownership semantics!
Crow is very fast and easy to use C++ micro web framework (inspired by Python Flask)
✔️The smallest header-only GUI library(4 KLOC) for all platformsLatest mention: Deeply understand your GitHub/GitLab project | reddit.com/r/github | 2021-01-17
You can get source code here
OpenGL Mathematics (GLM)Latest mention: Nyx: 3rd party libraries | dev.to | 2021-01-13
Gaming meets modern C++ - a fast and reliable entity component system (ECS) and much moreLatest mention: My Simple c++ ECS implementation | reddit.com/r/roguelikedev | 2021-01-15
The API reminds me a bit of EnTT (Disclaimer: I am considered a contributor, even through its just a few lines). It makes heavy use internally of type-erasure (which would among other things remove the need for a common base class component) and other tricks and ideas you might get some inspiration from for your implementation.
A C++ header-only HTTP/HTTPS server and client libraryLatest mention: How would you implement a basic REST API framework in C++ *from scratch*? | reddit.com/r/cpp_questions | 2021-01-07
The fastest feature-rich C++11/14/17/20 single-header testing framework
A Compile time PCRE (almost) compatible regular expression matcher.Latest mention: Discussion on possibility of a compile-time printf | reddit.com/r/cpp | 2021-01-02
Until it’s in the standard have a look at, use and contribute to the work on GitHub (regex link, fmt link).
Static reflection for enums (to string, from string, iteration) for modern C++, work with any enum type without any macro or boilerplate codeLatest mention: Conversion of two vectors with Variant class | reddit.com/r/cpp_questions | 2021-01-11
If you want to find out the number of enums at compile time, there is ways to do that without the last element trick. Take a look at https://github.com/Neargye/magic_enum for how to (or just use the library, its great)
Activity Indicators for Modern C++Latest mention: A Simple library for progress bars in C++ | reddit.com/r/cpp | 2021-01-13
p-ranav/indicators offers a very rich api but this is definitely simpler to use.
Parsing Expression Grammar Template Library
Functional Programming Library for C++. Write concise and readable C++ code.Latest mention: Best practice unit tests + examples with cmake | reddit.com/r/cpp | 2021-01-17
You can copy this project structure: https://github.com/Dobiasd/FunctionalPlus
Header-only, event based, tiny and easy to use libuv wrapper in modern C++ - now available as also shared/static library!
Your standard library for metaprogrammingLatest mention: C Implementation Challenge Replacing Stdmove And | reddit.com/r/programming | 2020-09-23
Boost.Hana developers measured a very noticeable 15% decrease in compile time switching from a function call (admittedly -- with an additional layer of wrapper) to a raw static_cast. foonathan himself saw a little over a 5% decrease in his actual code. miki151 saw about a 3% improvement from replacing move with MOV only, ignoring forward. In a completely synthetic benchmark where I just generate a ton of move calls in a row, I get a little over 40% decrease in compile time.
C++ compile-time enum to string, iteration, in a single header file
Portable, simple and extensible C++ logging library
Nameof operator for modern C++, simply obtain the name of a variable, type, function, macro, and enum
Argh! A minimalist argument handler.
Header-only library for using Keras models in C++.
A Template Engine for Modern C++
easy to use, powerful & expressive command line argument parsing for modern C++ / single header / usage & doc generation
What are some of the best open-source header-only projects in C++? This list will help you: