Top 23 C++ header-only Projects
JSON for Modern C++Project mention: How to save whatever the user put into a variable so the variable can keep that info the next time the user starts the app | reddit.com/r/cpp | 2021-11-03
A modern, C++-native, test framework for unit-tests, TDD and BDD - using C++14, C++17 and later (C++11 support is in v2.x branch, and C++03 on the Catch1.x branch)Project mention: Oof: Manipulate (RGB) color, position and more of console output in a single C++ header library | reddit.com/r/cpp | 2021-11-21
I'll just give you two links: CMake tutorial: https://cmake.org/cmake/help/latest/guide/tutorial/index.html . Shouldn't take years to complete Catch2 doc: https://github.com/catchorg/Catch2/blob/devel/docs/migrate-v2-to-v3.md . They briefly explain why they finally moved away from header only
Scout APM: A developer's best friend. Try free for 14-days. Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.
Fast C++ logging library.Project mention: Build2 seems to have the right idea. | reddit.com/r/cpp | 2021-11-19
I've also seen things in build2 recipes involving gcc or MSVC compiler switches. Admittedly, the CMake script for spdlog is also quite complex. But I think that's because it's covering a lot of possibilities of how its dependencies are built that build2, by the sounds of it, ought not have to worry about. CMake gives you platform independent ways to set features on targets so that, in theory at least, you write your build script once and it automatically works across multiple platforms.
Crow is very fast and easy to use C++ micro web framework (inspired by Python Flask)Project mention: RESTful API framework | reddit.com/r/cpp_questions | 2021-10-05
It seems nice, but the framework seems to be dead. There are still open pull requests and the contribution page speaks for itself: https://github.com/ipkn/crow/graphs/contributors
A C++ header-only HTTP/HTTPS server and client libraryProject mention: Crow finally gets rid of `CROW_MAIN` macro | reddit.com/r/cpp | 2021-11-24
I went with cpp-httplib instead, also partially because it lets me seperate the cpp from the h header only library (I despise this trend of header only libraries blowing up compile times). But now that crowcpp is getting new manpower behind it, I will seriously consider it, partially because handles url arguments better.
Gaming meets modern C++ - a fast and reliable entity component system (ECS) and much moreProject mention: I wrote a simple Go->C++ compiler to use for gameplay programming. Here's a demo of its use for my game project (along with an editor tool). I show the generated C++ in the end of the video. Compiler source code is ~1500 lines, link in video description. Will do a deeper public release soon! | reddit.com/r/golang | 2021-11-25
Interop: With this compiler I have direct interop to existing C++ libraries and codebases. For example I use EnTT for the entity-component data storage in the game demo here, and I'm able to call to the C++ including Go's generic syntax translating to template calls. That's not as easy with Cgo (and also Cgo adds huge overhead)
✔️The smallest header-only GUI library(4 KLOC) for all platformsProject mention: GUI? | reddit.com/r/cpp | 2021-07-29
How about Nana? or GuiLite?
Run Linux Software Faster and Safer than Linux with Unikernels.
OpenGL Mathematics (GLM)Project mention: Any OpenGL implementations for vector-drawing hardware? | reddit.com/r/opengl | 2021-11-19
For rendering 3D wireframes in general, involving OpenGL would overcomplicate things. Instead, you might want to look at GLM, the 3rd-party math library that many modern OpenGL apps use (because OpenGL no longer takes responsibility for any CPU-side matrix math). With GLM, in a few lines of code, you can throw 3D lines at some camera matrices and get output you can put on screen. More work would still be needed to do things like clipping/culling or opaque triangles, but that's basic 3D coding, and nothing compared to digging into the guts of an OpenGL software renderer.
The fastest feature-rich C++11/14/17/20 single-header testing frameworkProject mention: Unit testing and mocking for c++ | reddit.com/r/cpp | 2021-10-19
I usually use doctest with trompeloeil.
Static reflection for enums (to string, from string, iteration) for modern C++, work with any enum type without any macro or boilerplate codeProject mention: Circle, the C++ Automation Language | news.ycombinator.com | 2021-10-16
A Compile time PCRE (almost) compatible regular expression matcher.Project mention: Stringy Templates | reddit.com/r/cpp | 2021-10-23
On the topic of wild things done with compile time strings, check out /u/hanickadot's compile-time regular expressions if you haven't already, it's mind-blowing
Activity Indicators for Modern C++Project mention: It there a library for creating a progress bar? | reddit.com/r/cpp_questions | 2021-03-31
Maybe this one: https://github.com/p-ranav/indicators
Functional Programming Library for C++. Write concise and readable C++ code.Project mention: Why C++ for everything? | reddit.com/r/ROS | 2021-04-28
As idiomatic, I will try to adopt as much as possible purely functional programming in C++ by using https://github.com/Dobiasd/FunctionalPlus . Do you have by any chance any alternative suggestion?
Parsing Expression Grammar Template LibraryProject mention: We Built a C++ Rendering Engine for the Web | news.ycombinator.com | 2021-07-10
As a professional C++ programmer I feel a lot of the reasons C++ gets this response is because it's simply not "batteries included" like Go or Rust.
C++ is a very powerful, unopinionated language, that gives you a lot of freedom to attack your problem domain the way you best see fit.
If you're writing a networked application, don't use POSIX sockets, go and find a higher level library. If you're parsing complex text formats, don't iterate over buffers with char*'s, go pick up PEGTL. If you're working on graphs, or need to properly index in-memory data, go pick up Boost. If you need a GUI, go pick up Qt.
It's extremely common in C++, due to the lack of a universal package management solution, for people to try and "muddle through" and do shit themselves when it's far outside their core competency.
At one of my last employers, the core product was parsing JSON with std::regex, simply because they couldn't be bothered to integrate a JSON library.
Header-only, event based, tiny and easy to use libuv wrapper in modern C++ - now available as also shared/static library!Project mention: I hate ASIO and I can't be alone. | reddit.com/r/cpp | 2021-08-14
Have you tried this wrapper? https://github.com/skypjack/uvw
Your standard library for metaprogrammingProject mention: Simple `struct` static reflection system I use that tracks names, attributes (in my own code I also keep `constexpr` hashes of names) -- example gets fully inlined into `main()` | reddit.com/r/cpp | 2021-04-24
And then there's also the longstanding issue with default member initializers -- https://github.com/boostorg/hana/issues/409 -- which was a deal-breaker.The PROP system avoids this issue precisely by having the macro be as local as possible: the default member initializer is outside the macro. It does this while still letting you attach additional PropAttribs metadata (I'm not sure what additional metadata attachment looks like in Hana? haven't really tried). Default values and additional attributes are by and large quite more important to me in my use cases for reflection (component types in game ECS) than range syntax (everything I've needed and can think of needing is covered by for-each loop).
Portable, simple and extensible C++ logging library
Cross-platform C++11 header-only library for memory mapped file IO (by mandreyel)Project mention: Fastest way to read very large file(Gb to Tb) in C++ | reddit.com/r/cpp | 2021-05-19
I would memory map it. Use this lib: https://github.com/mandreyel/mio
Nameof operator for modern C++, simply obtain the name of a variable, type, function, macro, and enumProject mention: Getting an Unmangled Type Name at Compile Time | reddit.com/r/cpp | 2021-03-10
C++ compile-time enum to string, iteration, in a single header file
Fast & memory efficient hashtable based on robin hood hashing for C++11/14/17/20Project mention: Nanobench: Fast, Accurate, Single-Header Microbenchmarking Functionality For C++ | reddit.com/r/cpp | 2021-11-09
Big fan. Nanobench and robin-hood-hashing are frequent uses for me.
Argh! A minimalist argument handler. (by adishavit)
A Template Engine for Modern C++Project mention: Looking for a codegen library that uses C++ for scripting | reddit.com/r/cpp | 2021-03-10
I've looked into a newer template engine like Inja, but my client isn't quite happy with that either. Inja allows you to write templates that you feed JSON data into:
C++ header-only related posts
Compile time parser generator
1 project | reddit.com/r/cpp | 30 Nov 2021
Crow finally gets rid of `CROW_MAIN` macro
3 projects | reddit.com/r/cpp | 24 Nov 2021
On which hobby or side projects are you working on?
10 projects | reddit.com/r/cpp | 23 Nov 2021
What are some useful projects you made using C++ !
8 projects | reddit.com/r/cpp | 10 Nov 2021
Nanobench: Fast, Accurate, Single-Header Microbenchmarking Functionality For C++
2 projects | reddit.com/r/cpp | 9 Nov 2021
3 projects | reddit.com/r/cpp | 23 Oct 2021
uninttp: An extended class type to potentially replace 'auto'-template parameters. (Well, hopefully)
1 project | reddit.com/r/cpp | 18 Oct 2021
What are some of the best open-source header-only projects in C++? This list will help you:
|10||Magic Enum C++||2,297|
Are you hiring? Post a new remote job listing for free.