Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev. Learn more →
Top 23 C++ header-only Projects
JSON for Modern C++Project mention: JSON for Modern C++ 3.11.3 (first release since 473 days) | /r/cpp | 2023-11-30
Fast C++ logging library.Project mention: Blackbox library for embedded systems | /r/cpp_questions | 2023-06-07
Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.
A C++ header-only HTTP/HTTPS server and client libraryProject mention: Experience using crow as web server | /r/cpp | 2023-11-06
Alternatives at the low to medium level of abstraction include civetweb and mongoose, which have a common ancestor. Both of these appear to be C rather than C++, but seem to be production quality and well-documented. Another C library is cpp-httplib, which is probably too low-level for me.
Gaming meets modern C++ - a fast and reliable entity component system (ECS) and much moreProject mention: Focus: A simple and fast text editor written in Jai | news.ycombinator.com | 2023-09-02
https://pastebin.com/VPypiitk This is a very small experiment i did to learn the metaprogramming features. its an ECS library using the same model as entt (https://github.com/skypjack/entt). In 200 lines or so it does the equivalent of a few thousand lines of template heavy Cpp while compiling instantly and generating good debug code.
Line 8 declares a SparseSet type as a fairly typical template. its just a struct with arrays of type T inside. Next lines implement getters/setters for this data structure
Line 46 Base_Registry things get interesting. This is a struct that holds a bunch of SparseSet of different types, and providers getters/setters for them by type. It uses code generation to do this. The initial #insert at the start of the class injects codegen that creates structure members from the type list the struct gets on its declaration. Note also how type-lists are a native structure in the lang, no need for variadics.
Line 99 i decide to do variadic style tail templates anyway for fun. I implement a function that takes a typelist and returns the tail, and the struct is created through recursion as one would do in cpp. Getters and setters for the View struct are also implemented through recursion
Line 143 has the for expansion. This is how you overload the for loop functionality to create custom iterators.
The rest of the code is just some basic test code that runs the thing.
OpenGL Mathematics (GLM)Project mention: C++23: The Next C++ Standard | news.ycombinator.com | 2023-07-11
Crow is very fast and easy to use C++ micro web framework (inspired by Python Flask)Project mention: VueJS goes to microcontroller firmware. This website runs in ESP32 board, with frontend is made with VueJS, TailwindCSS and backend is written in C++. | /r/vuejs | 2023-04-14
I did something similar in the past and used https://github.com/ipkn/crow as web server, in case you want to not implement the web part yourself. Otherwise amazing job!
✔️The smallest header-only GUI library(4 KLOC) for all platformsProject mention: [Cpp] Une assez grande liste de bibliothèques graphiques C ++ | /r/enfrancais | 2023-02-14
Learn any GitHub repo in 59 seconds. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev.
Features: - Functional style. Inspired by  and React - Simple and elegant syntax (in my opinion). - Support for UTF8 and fullwidth chars (→ 测试). - No dependencies. - Cross platform. Linux/mac (main target), Windows (experimental thanks to contributors), - WebAssembly. - Keyboard & mouse navigation. Operating systems: - linux emscripten - linux gcc - linux clang - windows msvc - mac clangProject mention: Library for NES style terminal game. | /r/cpp_questions | 2023-09-30
Background: I want to make a NES Tetris) clone for the terminal, with full resolution, this is achievable through using this ▀ character, and defining back and foreground color. This would result in a 1x2 pixel and by making the game width 256x120 characters this would provide full resolution. I made some tests, creating my own encoding for the different sprites and optimizing everything, which resulted in very quick printing times, even with a normal terminal. Nearly fast enough for the full 60Hz that the NES has, when printing the whole screen. The fact that i don't need to reprint the background (except maybe a tetris), makes 60Hz a kinda realistic goal. My main concern is, that there could occur kind of a screen tearing effect, which i really want to avoid. AFAIK, ncurses has a way to print the whole "window" with a function call to avoid this issue, however I had a lot of issues when trying to use ncurses to print the entire background and figured, that there are better alternatives. I also tried FTXUI and whilst the experience of giving each "pixel" a fore- and background color was much better, i didn't quite find a way to refresh the screen like ncurses. (i think there is some kind of way with the ScreenInteractive class, but i didn't get that to work, and it seemed like there was not a way to color each pixel. with InteractiveScreen you can make your own components with the whole "text()" thing, but this isn't really what i need)
The fastest feature-rich C++11/14/17/20/23 single-header testing frameworkProject mention: Unit testing tool suggestions | /r/learnprogramming | 2023-05-07
I have never used "tools" for unit-tests, only web sites that show the results of the tests or code coverage. For C++ I prefer https://github.com/doctest/doctest but most companies I worked for use Catch2.
Static reflection for enums (to string, from string, iteration) for modern C++, work with any enum type without any macro or boilerplate codeProject mention: What C++ library do you wish existed but hasn’t been created yet? | /r/cpp | 2023-07-08
I'm not sure this is quite what you're asking for, but this library has been super helpful to me in the past : https://github.com/Neargye/magic_enum
Compile Time Regular Expression in C++Project mention: Compile time regular expression in C++ | news.ycombinator.com | 2023-09-12
Activity Indicators for Modern C++
A Fast and Easy to use microframework for the web. (by CrowCpp)Project mention: Experience using crow as web server | /r/cpp | 2023-11-06
I'm investigating using C++ to build a REST server, and would love to know of people's experiences with Crow-- or whether they would recommend something else as a "medium-level" abstraction C++ web server. As background, I started off experimenting with Python/FastAPI, which is great, but there is too much friction to translate from pybind11-exported C++ objects to the format that FastAPI expects, and, of course, there are inherent performance limitations using Python, which could impact scaling up if the project were to be successful.
Argument Parser for Modern C++Project mention: Command line interface library | /r/Cplusplus | 2023-03-24
The most feature-rich C++ CLI library is CLI11. Other popular choices include Boost.ProgramOptions, argparse, cxxopts and others.
Visual Python and C++ nanosecond profiler, logger, tests enabler
Portable, simple and extensible C++ logging libraryProject mention: Fully Permissive License C++ Logger For Embedded System | /r/embedded | 2023-06-28
Functional Programming Library for C++. Write concise and readable C++ code.Project mention: Leaving Haskell Behind | news.ycombinator.com | 2023-08-24
Hoogle is really amazing!
Inspired by it, I implemented something similar for FunctionalPlus (a functional-programming library for C++): https://www.editgym.com/fplus-api-search/
I'd love to see more projects taking this path too. :)
Nameof operator for modern C++, simply obtain the name of a variable, type, function, macro, and enum
Parsing Expression Grammar Template Library
Header-only C++ binding for libzmqProject mention: Question regarding method definition and .lib files | /r/AskProgramming | 2022-12-02
I found that I knew almost nothing about C++ and had to start reading and watching tutorials to understand what was happening in the code samples provided. In the end, I just followed the C++ SDK programming manual and managed to capture the image data with the provided library and source code and display it with OpenCV. But even though this manual made it possible to display the video images, I am still very confused about the implementation of the member functions of the provided classes. And since I want to share the image data with a Python script, I need to understand exactly what is happening. Since I couldn't find any simple enough resources on shared memory, I tried sending the image data over sockets using the ZeroMQ library library called cppzmq.
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 metaprogrammingProject mention: What are some C++ projects with high quality code that I can read through? | /r/cpp_questions | 2023-01-16
I like boost::hana. Wish I had more chances to use it at work.
Cross-platform C++11 header-only library for memory mapped file IO (by vimpunk)Project mention: Is there a good cross-platform (Windows / Linux) C or C++ library for file I/O? | /r/cpp | 2023-02-04
As simple and clean example you can see https://github.com/mandreyel/mio readme.md
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
C++ header-only related posts
If this isn't the perfect data structure, why?
3 projects | /r/C_Programming | 22 Oct 2023
Library for NES style terminal game.
1 project | /r/cpp_questions | 30 Sep 2023
When creating a nonlinear MPC controller with acados, is it recommended to develop in C++ or use the Matlab interface to generate C++ code?
1 project | /r/ControlTheory | 21 Jul 2023
Crash Course: entity component system
1 project | news.ycombinator.com | 20 Jul 2023
Should I give up?
1 project | /r/cpp | 11 Jul 2023
What C++ library do you wish existed but hasn’t been created yet?
18 projects | /r/cpp | 8 Jul 2023
Anyone used matplotlibcpp17?
1 project | /r/cpp | 29 Jun 2023
A note from our sponsor - Onboard AI
getonboard.dev | 1 Dec 2023
What are some of the best open-source header-only projects in C++? This list will help you:
|10||Magic Enum C++||4,064|