C++ - Reddit
227 subscribers
48 photos
8 videos
1 file
25.6K links
Stay up-to-date with everything C++!
Content directly fetched from the subreddit just for you.

Join our group for discussions : @programminginc

Powered by : @r_channels
Download Telegram
https://youtu.be/ttoQfPP\_Gkg
Design Patterns - The Most Common Misconceptions (3 of N) - Klaus Iglberger - [https://youtu.be/bAsJvmtYZOg](https://youtu.be/bAsJvmtYZOg)
One Lib to Rule Them All and in the Darkness bindgen… - Antonello Palazzi & Kay Hicketts - https://youtu.be/9BpVjPKv02s

ADC

2026-10-19 - 2026-10-25

Introducing LYDIA Phase2 - Kazuyoshi Sasamori, Alfie Bradic & Paul McCabe - [https://youtu.be/MyCMBiWAEqM](https://youtu.be/MyCMBiWAEqM)
FPGA-Based Alias-Free Oscillator - 岡安啓幸 / Akiyuki Okayasu - https://youtu.be/OXB5crrpFgc
Type-Erased Audio Parameters - A New Approach to an Old Problem - Jan Wilczek - [https://youtu.be/K-38Zpf13lQ](https://youtu.be/K-38Zpf13lQ)

2026-10-12 - 2026-10-18

Introduction of the Technologies That Make Up Project LYDIA - Taichi Kumon & Tom Baker - https://youtu.be/-Cyht3g4H1s
AI for Circuit Modeling - 村井 勝吾 / Shogo Murai - [https://youtu.be/IL08vd0EiFY](https://youtu.be/IL08vd0EiFY)
MIDI 2.0 - Ready to Ship - Brett g Porter - https://youtu.be/RGLtRZC--34

2026-10-05 - 2026-10-11

BEEPS and PORTS - Annoy Everyone in Your House While Building An Audio Synthesizer - Joseph Stewart - [https://youtu.be/bnIV2nyh-rg](https://youtu.be/bnIV2nyh-rg)
Hardware DSP Asset Inheritance and Evolution - Takeshi Kuwahara - https://youtu.be/yYukJpiFOOU
Field Recording - In Search for Perfect Sounds - Malin Arvidsson - [https://youtu.be/L5iZDi71VWU](https://youtu.be/L5iZDi71VWU)

2026-09-28 - 2026-10-04

Designing Interactive Music Experiences in XR - Kasson Crooker - https://youtu.be/J3sVHT8luKs
When (Not) to Patent Audio Software - Simon Hestermann - [https://youtu.be/stBB1JoKQiY](https://youtu.be/stBB1JoKQiY)
Distribution Strategies for Indie Audio Developers - From Plugin to Product - Dani Karanyi - https://youtu.be/Piar49uTjtg

https://redd.it/1xg0zqe
@r_cpp
What would it take to leave ISO?

With the conclusion of the DIS ballot, I think that no matter what side you're on, this should be (hopefully the final) wake up call that stayint in ISO under its process is untenable. If you're pro-contracts you probably see this as minority rule. If you're against, congrats-- the same game can be played against the feature you want in the future.

I see 3 possible results out of Brazil:

1. Contracts are pulled, fight to see another day and/or leave ISO, and/or fork the language.
2. Contracts stay, roughly as is. To my understanding FDIS is a final chance scenario, so I don't see this working out. Even "as a statement," it's not a good look and WG21 will eat the blame.
3. Contracts are fixed enough to flip 4 NB votes (there's a number of combinations, but you need a minimum of 4 total flips from no/abstain -> yes).

It's my understanding that FDIS is a "last chance" for 26. Personally, considering what else is in 26 (for me, reflection), I'd rather go with the first option. That begs the question: where do we go from here?

Continue with the current process, which has unearthed pain points and nasal demons every few years, or break up with the ISO process (this doesn't even have to be a clean break, just something closer to ECMAScript's process)?

If so, what would it take? Alternatively, if we could, what would we actually lose? What would we gain (besides more control of process)?

Obligatory "no sarcastic comments about getting a TARDIS and changing it back then."

https://redd.it/1xhcv4b
@r_cpp
C++ BLAS Library for bringing two worlds togetherI would like

I would like to discuss the need (or no-need) for a C++ interface/libary that is intended to be a- building block for high level linear algebra packages and- low-level, hardware oriented implementations of special numerical operations.

The “high-level world” …

In the C++ world, you have libraries like Eigen, Blaze, … where you can matrix operations like

C = A * B;

and regarding performance often stops here. Because some experts figured out how to implement such that it’s fast.

Or maybe there is a short discussion why you should write

C.noalias() = A * B;

in Eigen.

And that’s great. In this world you wanna build something great based on Linear Algebra operations.

The “Low-level world” …

Then there is the world of BLAS (Basic Linear Algebra Subprograms), with implementations such as Intel MKL, OpenBLAS, BLIS, or Apple Accelerate. So for some reason there is money and time involved.

They provide implementations for the matrix product that are very efficient. But maybe not that user friendly to use. For example they provide a function for the operation

C ← βC + αAB

where A, B and C are matrices. Where elements can all be float, or can be double, or can be complex-float or can be complex-double. But all of the same type.

And A and B can be either not-transposed or transposed (in the complex case actually conjugated-or-transposed).

A call to this function looks like this when you use the Fortran Interface (GEMM is short for General Matrix Matrix Product, D indicates that elements and scalars all have double precision):

dgemm("N", "N", &m, &n, &k, &alpha, A, &lda, B, &ldb, &beta, C, &ldc);

Or through the C-Interface:

cblasdgemm(CblasColMajor, CblasNoTrans, CblasNoTrans, m, n, k, alpha, A, lda, B, ldb, beta, C, ldc);

So for computing C = A\*B you choose alpha=1 and beta = 0.

And you should only call it if A, B, C are not only different names but also refer so separate memory blocks.

So this is a very simple, almost primitive, interface.

And that’s what makes it great.

Because providing an efficient implementation (close to peak performance) is not that trivial. But with a narrow interface (e.g. all elements of the same type) at least feasible.

What you do in the implementation is not some Strassen algorithm. In short:

\- You compute the matrix product block-wise (so that you can exploit the cache hierarchy)
\- On the smallest block (that fit in the L1 cache) you apply architecture specific micro kernels

**Two world in one …**

Eigen actually does both. It provides matrix/vector classes and implements blocked matrix operations with platform specific micro kernels.

That’s great.

But still, I think it is of value to also have something which is a layer that brings them together.

ulmBLAS, for example, is kind of a prototype for this idea:
\- on top high-level libraries can be build
\- at the bottom the architecture specific stuff integrated

Back in 2016 (yes most of the code of ulmBLAS is from around 2014) I made experiments on how higher level libraries can make use of ulmBLAS:
\- [Boost.uBLAS](
https://www.mathematik.uni-ulm.de/~lehn/testublas/) and
\- Blaze.

On the high-level part you can do crazy things, like matrix classes where elements are not stored in memory, but instead, computed when you access elements. And still, you can achieve a pretty good performance.

And other stuff like mixed element types. Where A, B, C, alpha, beta can have different types. So unless you make copies, you can’t do the operation with BLAS. But in the ulmBLAS layer you can deal with that when matrix blocks get packed and do the type promotions there with little overhead.

https://redd.it/1xhstgi
@r_cpp
Euclid On-premise Cloud Services in C++

Euclid (Europeanne Cloud Initialive), has development an AWS like cloud service totally written in C++. It contains EQS (Queueing), ENS (publish/subscribe notifications), ESM (storage system) and many more.


Native compilable on Linux/Windows/macOS. Applications are running on a distributed system of worker hosts using an auto-scaler which distributes the work evenly.

Feature reuqests, bugs on https://github.com/jensvogt/euclid

https://redd.it/1xji7cy
@r_cpp
A useful way to handle keyboard and mouse input in C++ on Windows

If you're looking to create macros, remap keys, or simulate keyboard and mouse inputs in C++, you might find this useful.



I made Interceptor, a Windows kernel driver with a simple C++ SDK to send, intercept, and modify inputs.



https://github.com/TitanCSA/Interceptor

https://redd.it/1xjo8h0
@r_cpp
How do I avoid UB in contracts?

This question might be better served in /r/cpp_questions but since contracts were the reason C++26 failed the latest vote I thought posting it here might generate some useful debate.

I've been using contracts in personal projects since GCC16 was released. I've come to appreciate them both as documentation and in bug-finding. After the recent controversial vote I did have another look at them and their use in my code. Most of my contracts looks like the example in "3.5.5 Consecutive and Repeated Evaluations" of p2900:
```
void f(int *p)
pre( p != nullptr ) // precondition #1
pre( *p > 0 ); // precondition #2
```
This works as expected in `enforce`, `quick-enforce` and `ignore` evaluations. However if I use `observe` evaluation it'll crash with UB on the second precondition.

One fix is to merge the preconditions together `pre( p != nullptr && *p > 0)` which works in this case, but doesn't scale to for example classes where you'll have `pre( p != nullptr)` on the constructor and then assume it's valid for the rest of the body.

Another solution is to never use `observe` evaluation. This works in my applications where I control the build, but doesn't work in libraries used by others where I don't.

I wonder what my options here are?

*Edit* [Godbolt link](https://godbolt.org/z/c34bGabnf)

https://redd.it/1xk6lwk
@r_cpp
HPX V2.0.0 released: C++20 baseline, C++20 modules, stdexec-based senders/receivers, early C++26 reflection! - The HPX Project

HPX, the C++ Standard Library for Parallelism and Concurrency, has released V2.0.0. It is the largest release in a long time: more than 830 merged pull requests from more than 90 contributors since V1.11.0.

HPX implements the C++23 Standard parallelism and concurrency facilities in full and offers the only widely available open-source implementation of C++17, C++20, and C++23 parallel algorithms - including a complete set of parallel range-based algorithms and the full integration of the algorithms with the upcoming sender and receivers interfaces.

Beyond the standard, HPX includes proposed features for upcoming C++ releases: much of the parallelism and concurrency capabilities expected in C++26, the C++ Concurrency TS, Parallelism TS V2, data-parallel algorithms, executors, senders and receivers, and more. It also extends C++ Standard APIs to distributed environments (such as compute clusters) and heterogeneous systems (such as GPUs).

Some of the changes that may interest r/cpp:

* C++20 is now the minimum, and the whole library can optionally be built and consumed as C++20 modules.
* Our own std::execution implementation is gone; senders and receivers are now based on stdexec, and a P2079 parallel scheduler runs sender work on HPX thread pools.
* Early use of C++26 reflection: types can be serialized without writing serialize() functions, and remote actions and components no longer need registration macros.
* New C++23 parallel algorithms (the fold family, find\_last, iota) and many conformance fixes in the existing ones.
* Functions can carry a task size (nano\_task, small\_task, ...), which the parallel algorithms use to decide how to split a loop.

HPX enables an asynchronous C++ programming model that improves parallel efficiency and reduces the complexity typically associated with concurrent applications. As a newly welcomed project of the [High Performance Software Foundation](http://hpsf.io/), HPX now benefits from vendor-neutral governance and collaboration with a broader ecosystem of high-performance computing tools, strengthening the foundation for portable, production-ready HPC software across the industry.

Release: [https://github.com/TheHPXProject/hpx/releases/tag/v2.0.0](https://github.com/TheHPXProject/hpx/releases/tag/v2.0.0) 
What's new: [https://docs.hpx.dev/latest/html/releases/whats\_new\_2\_0\_0.html](https://docs.hpx.dev/latest/html/releases/whats_new_2_0_0.html)

https://redd.it/1xkrq2q
@r_cpp
Would anyone be interested in learning Windows System Programming (Win32 to Kernel)?

I’m considering putting together a practical, hands-on course on Windows System Programming.
The course would start with Win32 programming and gradually move into Windows internals and kernel-mode development.

Topics would include:
Win32 API and Windows programming fundamentals
Processes, threads, synchronization and IPC
Memory management and I/O
Windows internals and system architecture
Kernel-mode programming and device drivers ( mini filter driver)
Hands-on projects using Visual Studio, WDK and WinDbg

I’ve been working in C/C++ and Windows systems and kernel programming for over 25 years.
I’d like to understand whether there is genuine interest in a course like this, particularly among developers who want to move beyond application programming and understand how Windows works internally.
Would you be interested? What topics would you most like to learn?

https://redd.it/1xkz9vr
@r_cpp