r/cpp • u/Bitter-Today285 • Jun 01 '26
Anyone else still uses DirectShow?
Even though ds is deprecated and media foundation replaced it i still use it in programming quite often, maybe i’m just obsessed with old stuff
r/cpp • u/Bitter-Today285 • Jun 01 '26
Even though ds is deprecated and media foundation replaced it i still use it in programming quite often, maybe i’m just obsessed with old stuff
r/cpp • u/not_a_novel_account • Jun 01 '26
r/cpp • u/ProgrammingArchive • Jun 01 '26
CppCon
2026-05-25 - 2026-05-31
2026-05-18 - 2026-05-24
2026-05-11 - 2026-05-17
2026-05-04 - 2026-05-10
2026-04-27 - 2026-05-03
C++Online
2026-05-25 - 2026-05-31
2026-05-18 - 2026-05-24
2026-05-11 - 2026-05-17
2026-05-04 - 2026-05-10
2026-04-27 - 2026-05-03
Audio Developer Conference
2026-05-25 - 2026-05-31
2026-05-18 - 2026-05-24
2026-05-11 - 2026-05-17
2026-05-04 - 2026-05-10
2026-04-27 - 2026-05-03
r/cpp • u/Interesting_Cake5060 • May 31 '26
Hello everyone I am a novice C++ developer. I would like to learn how to create good desktop applications in C++. Don't you think it's a lost art? All the applications that I use every day were created a long time ago (for example, 7zip, wireshark) And it doesn't really look like we're creating something like this today.
I would really like to learn how to create something like this and would like to hear your advice (I am especially interested in creating applications that somehow process incoming data and then output it in real time)
A few of my thoughts:
r/cpp • u/StockyDev • Jun 01 '26
Hi all! I wrote a new blog series to figure out how much easier static reflection makes it to implement a type trait which is fairly difficult to implement pre-static reflection.
If all you care about is the static reflection bit, here is the link to just that section.
Enjoy!
r/cpp • u/brenocq • Jun 01 '26
Open-source C++20 project I've been working on: a quantum computing library + a step-through circuit debugger. Sharing it here for the engineering more than the quantum part.
Demo (runs in-browser): https://brenocq.github.io/ket/demo/
Some bits that were fun:
- Two simulation backends, chosen automatically: a dense state-vector engine (multithreaded over a persistent std::thread pool, with gate fusion) and an O(n²) stabilizer tableau for Clifford circuits.
- The GUI is Dear ImGui (docking) + ImPlot[3D]; the same binary runs natively or as WebAssembly via Emscripten — the in-browser demo is the desktop app recompiled.
- Circuits are stored as a DAG of gates; Python bindings via pybind11 mirror the C++ API.
MIT-licensed, builds with CMake. Code: https://github.com/brenocq/ket — happy to talk about any of the implementation choices.
r/cpp • u/Shawn-Yang25 • Jun 01 '26
Hi everyone,
Apache Fory 1.0 has been released recently.
Fory is a fast multi-language serialization framework for native objects, Schema IDL, and cross-language data exchange. It supports Java, Python, C++, Go, Rust, JavaScript/TypeScript, C#, Swift, Dart, Scala, and Kotlin.
The main idea is simple: in many systems, data is not just a flat schema message. Applications often need to serialize idiomatic domain objects, nested containers, polymorphic types, object references, shared references, or even circular object graphs. Fory is designed to handle these cases efficiently while still supporting cross-language data exchange when needed.
With 1.0, Fory has reached a more stable point:
Fory is not meant to replace Protobuf everywhere. Protobuf is still a great choice for many schema-first API contracts. Fory is more focused on cases where you want high-performance serialization while preserving more of the native object model, or where the same data model needs to move across multiple runtimes without too much glue code.
Links:
I would be interested in feedback from people who have worked with Protobuf, FlatBuffers, Kryo, JDK serialization, pickle/cloudpickle, Avro, MessagePack, or Arrow-based systems.
What serialization problems are still painful in your multi-language systems?
r/cpp • u/karurochari • May 31 '26
Have you ever wanted to cut down on the sqlite boilerplate in your code? Yeah, me too. Not sure this will help much.
Bu-but! It is a functioning demo of reflections in C++ being used for the greater good.
https://codeberg.org/karurochori/reflite
(or https://github.com/KaruroChori/reflite, although I decided to slowly migrate over the other platform)
I am working on a lua playground for a different project of mine, and this ended up being self contained and useful enough to share. Don't expect high quality magic in there, I am still trying to figure out reflections as there is not much material online, and it mostly revolves around pre-standard versions which are now incompatible. So, any feedback is very much welcome.
Basically, it ties together plain data types with some of the most common types of statements, to cut a considerable amount of boilerplate when handling types in the returning records and within the queries themselves. Plus the typical "lifetime of objects" goodies C++ brings.
It is not and does not want to be an ORM.
Demo online, https://godbolt.org/z/afev8356e, the library seems to be working fine on g++ 16.1 and on this special branch of clang++ too.
By the way, does anyone know where to find its source? I would reeeally prefer to compile a local version with reflections enabled, as I need offloading support as well.
r/cpp • u/Huge-Presentation810 • May 31 '26
UPDATE:
I added a Required annotation that disable the build method if not all required method are used.
https://compiler-explorer.com/z/j9noeM4o9
GitHub:
https://github.com/steumarok/cpp_reflection_builder
-----
I wrote a builder generator. It work also with derived classes.
Can use directly data members or methods, just by annotate them.
A short example:
class A
{
private:
[[=BuilderParam]]
int c_ = 10;
[[=BuilderMethod]]
void withBar(int bar) {
c_ = bar * 2;
}
public:
static auto& builder() {
return makeSharedBuilder<A>();
}
};
std::shared_ptr<A> a = A::builder()
.withBar(19)
.withC(20)
.build();Full code:
https://compiler-explorer.com/z/ahchxc4rn
The return ref of builder function is not a typo. The builder object is self contained and is destroyed when build
method is called.
r/cpp • u/liuzicheng1987 • May 31 '26
As someone whom I have met on this subreddit pointed out to me, it's been a while since I've posted here , so I thought maybe it is time for another post.
reflect-cpp (https://github.com/getml/reflect-cpp) is a C++-20 library for serialization and deserialization, similar to Rust's serde or Python's Pydantic.
Through discussions in this subreddit, we figured out that reflection capabilities, which are now officially supported in C++-26, can actually be achieved in C++-20. So we built an entire library around it. If you are interested in how that can be done in C++-20, I'd be happy to explain it to you.
v0.25.0 introduces a series of new features. My favourite one is CLI parsing, which is similar to Rust's structopt. This community contribution came completely out of the blue, but I love it. But we also introduce support for three new serialization format's, namely boost-serialization, Cereal and yas.
I am particularly impressed by yas' (https://github.com/niXman/yas) performance - even though it is not a very well-known format/library, it significantly outperforms most of the more well-established formats in our benchmarks.
As always, any kind of feedback, particularly constructive criticism is very welcome.
The intro of the most recent StockholmCpp Meetup, with the host presentation, some info, and a C++ quiz nobody could solve. Would you have had the answer?
r/cpp • u/meetingcpp • May 30 '26
r/cpp • u/jk-jeon • May 30 '26
Hi,
I observe more and more types with "reference-like" semantics are being added to the standard. Starting from string_view (and our old friends bitset::reference and vector<bool>::reference), we've got optional<T&> and function_ref. span and mdspan are also to an extent a reference-like type, though it can be argued that they are more of pointer-like types.
I've long hated these reference-like, or so-called "proxy" types because they are all broken, in the sense that they behave very differently from the native references. The language simply disallows a "proper" reference-like type to be written. There are two reasons I know of why this is impossible (there are maybe more):
There are certain situations where these result in inconvenience and/or lifetime bugs.
auto to initialize a variable from these functions/operators returning expression templates.function_ref) or just accept unnecessary allocations from happening all the time when a function expecting type-erased arguments got called with non-erased types (which is one of the main motivation behind string_view). Now, when you have a value-type/reference-type pair (or a triple or quadruple or maybe more to include const references and rvalue references), a similar problem arises with auto. The user of an API must know if the function they are calling is returning a complete object (aka value type) or a reference to a cached result stored inside a class, if they want to avoid unnecessary allocation. Ideally, the user would just use auto if they want a copy, or to use auto const& or auto&& if they just want to refer to it transiently and then discard. That simple rule very easily breaks down when type-erasure is involved.T and a reference if we use T&/T const&/T&&, but that (otherwise perfectly reasonable) assumption easily breaks down when proxies are involved.As reference-like types are being increasingly common, I am wondering what is the status of any attempts for making them true 1st class citizen. Does anyone have any idea?
The collected upcoming C++ Meetups around the world pages shows now better info if an event can be accessed online (online - hybrid) by showing visual markers
Plenty of events these days to join online!
Hope you find that useful
r/cpp • u/Slow_Negotiation_935 • May 30 '26
Hi r/cpp,
I’ve just released v1.0 of ARB, a modern, lightweight, header-only C++23 library for articulated rigid-body dynamics aimed primarily at computer graphics and robotics applications.
The library is intended to provide a clean and simple tool for prototyping and rapid development of rigid-body dynamics applications without the complexity and overhead of the larger physics engines out there.
ARB is based on a differentiable spatial algebra which is used to implement the articulated body algorithms ABA and RNEA. ARB supports end-to-end differentiation which enables advanced techniques such as system identification, gradient based optimisation, and machine learning. The lib also provides collision detection/resolution using GJK/EPA, and has URDF support for model import/export.
My main interest here is in getting some feedback from C++ developers about ARB syntax and API design.
Is it easy to use? Are there any features you think are missing? I've used C++23 - should I use C++20?
Available here: ARB
r/cpp • u/anythingtechpro • May 30 '26
Finally open sourced our reimplementation of Toyota's MVCI32 driver for communication with vehicles that support J2534 protocol, this is a drop in replacement implementing it's original API. Check it out please, if you are interested please consider contributing!
r/cpp • u/wiseneddustmite • May 30 '26
i found this library called miniaudio, however instead of having precompiled dll files, its just the header and then the c file that really only includes the header, the header file has all of the definitions and declarations of everything in the library, it makes the compile times take a lot of time, can i compile the header file to a dll the c file is literally just:
#define MINIAUDIO_IMPLEMENTATION
#include "miniaudio/miniaudio.h"and the header file is like 4 megabytes
edit: nvm i just had to precompile the miniaudio.c file with -c first and it has a shorter compile time
r/cpp • u/RefrigeratorFirm7646 • May 29 '26
Like what do you mean inline can also be used to declare "global" variables!? I would happily accept a different keyword, inline just makes no sense here... even static would have been understandable but instead it creates private instances in each translation unit T_T
r/cpp • u/funkinaround • May 28 '26
r/cpp • u/0x6675636B796F75 • May 28 '26
r/cpp • u/Ok_Path_4731 • May 28 '26
I posted this days ago but the 'automated admins took it down saying was generated by AI' as the formulation was maybe too academic. Trying now with other words.
Short storry: I wanted to generated python glue code for webgpu based on webgpu header. After exploring libclang and generating correct results, I wanted something more generic, more 'built in into C++'. At the beginning I thought will be easy with constexpr compile time tricks, but turned out the compile time 'runtime' is very restrictive. And I solved the challenges with ycetl. https://github.com/zokrezyl/ycetl
This is not a toy project, it is work of couple of months, fight with windmills of compile time runtime. If you see issues that can make it production ready, please share.
r/cpp • u/User_Deprecated • May 28 '26