C++ - Reddit
227 subscribers
48 photos
8 videos
25.3K 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
Looking for collaborators to build an OpenGL engine in C++

I'm currently developing a small OpenGL engine in C++ as a personal learning project and foundation for future graphics and simulation applications.

​

The project is open source:

https://github.com/HG9032/OpenGLengine

​

I'm looking for people who are interested in computer graphics, OpenGL, game engines, rendering, or C++ development and would like to contribute, learn together, or discuss ideas.

​

The engine currently includes:

​

\- Window management (GLFW)

\- Shader management

\- Mesh rendering

\- Transform system

\- Basic rendering pipeline

​

Planned features:

​

\- Camera system

\- Scene management

\- Materials and textures

\- STL model loading

\- Lighting

\- Thermal simulation visualization

​

Whether you're experienced or just learning OpenGL, feel free to reach out if you'd like to collaborate.

​

https://github.com/HG9032/OpenGLengine

https://redd.it/1u6979x
@r_cpp
New C++ Conference Videos Released This Month - June 2026 (Updated to Include Videos Released 2026-06-08 - 2026-06-14)

**C++Online**

2026-06-08 - 2026-06-14

* Monads Meet Mutexes - Arne Berger - [https://youtu.be/AisGDOoF82U](https://youtu.be/AisGDOoF82U)
* Lock-free Queues in the Multiverse of Madness - Dave Rowland - [https://youtu.be/eHmjkFdQl00](https://youtu.be/eHmjkFdQl00)

2026-06-01 - 2026-06-07

* Writing C++ Code is Challenging, Writing Performant C++ Code is Daunting - Dmitrii Radivonchik - [https://youtu.be/R2sm9mailuU](https://youtu.be/R2sm9mailuU)
* Case Study - Purging Undefined Behavior and Intel Assumptions in a Legacy Codebase - Roth Michaels - [https://youtu.be/H-dHTeSR\_n8](https://youtu.be/H-dHTeSR_n8)

**ADC**

2026-06-08 - 2026-06-14

* Low Latency Android Audio with improved CPU Performance - Phil Burk - [https://youtu.be/DtBrKEu0R0g](https://youtu.be/DtBrKEu0R0g)
* Linux as the Conductor - Driving Pre-Compiled Audio DSP Kernels on C7x for Real-Time Processing - Vishnu Pratap Singh - [https://youtu.be/Auq9WnHNtPo](https://youtu.be/Auq9WnHNtPo)
* Overview of Granular Synthesis - Avrosh Kumar - [https://youtu.be/QpBV24nWg2M](https://youtu.be/QpBV24nWg2M)
* The Agentic Symphony - Multi-Agent Collaboration for Emergent Musical Composition - Meera Sundar - [https://youtu.be/QMUXoImgTIA](https://youtu.be/QMUXoImgTIA)

2026-06-01 - 2026-06-07

* Beyond the DAW - Designing a Procedural Sequencer Powered by Music-Theory - Romy Dugue & Cecill Etheredge - [https://youtu.be/48sH4wQUDAs](https://youtu.be/48sH4wQUDAs)
* From DAW Users to Audio Developers - Teaching JUCE to Creative Minds - Milap Rane - [https://youtu.be/200UrugEanY](https://youtu.be/200UrugEanY)
* Music Design and Systems - Achieving Inaudibly Complex Systems in Video Games - Liam Peacock - [https://youtu.be/R6raBvCNsQo](https://youtu.be/R6raBvCNsQo)
* Developing for Avid’s Audio Ecosystem - Rob Majors - [https://youtu.be/91-7YWVKRE4](https://youtu.be/91-7YWVKRE4)

**CppCon**

2026-06-01 - 2026-06-07

* Lightning Talk: Navigating Code Reviews as a Code Author - Ben Deane - [https://youtu.be/zygtgvHp\_MM](https://youtu.be/zygtgvHp_MM)
* Lightning Talk: Eight Consteval Queens and Compile-Time Printing - Sagnik Bhattacharya - [https://youtu.be/gNPhJrXLiIs](https://youtu.be/gNPhJrXLiIs)
* Instrumenting the Stack: Strategies for End-to-end Sanitizer Adoption - Damien Buhl - [https://youtu.be/TSrymTXw5w8](https://youtu.be/TSrymTXw5w8)

https://redd.it/1u6ik24
@r_cpp
Cross-Language Data Types

https://ekxide.io/blog/cross-language-data-types

Have you ever thought about sharing data across language boundaries without serialization? This blog post highlights the challenges behind this endeavor and how they can be overcome. Note: I'm not the original author of the blog post, but since the author does not have a Reddit account, I post it on his behalf.

https://redd.it/1u6mrw8
@r_cpp
LLMs with C and C++ - switch from HFT to AI lab

I'm a senior C++ dev recently started working with a neolab (who works with anthropic). Thought I would write some of observations i made.

* I had experimented with LLMs for a while before making the switch. LLMs fail a lot on C and C++ due to harder nature and powerful nature of language.
* Talking purely from benchmarks, languages like python and JS (the vibecoder's first language) have very hard benchmarks - think fixing actual bug that touches 3 different modules from scratch with access to tools like grep, cat and python3 executer.
* Whereas, benchmarks for C and C++ are at basic QA style questions. I have added a task from benchmark, which fable 5 could not solve.
* LLMs do not have understanding of latest ISO standards - for some reasons it switches to C++17 again and again
* LLMs are trash at template metaprogramming. Try debugging CRTP type of errors.

Looking at the efforts and progress, I am still not sure if we will see LLMs writing MRs to linux kernel. The approach they used for vibecoding languages do not care about memory safety, thread safety and performance much. It would be interesting to see the space evolve.

PS: a example from benchmark

PS2: i'm not associated with benchmark. they say the code is taken from real github issues.

Observe the following faulty CPP code snippet and error type list. Your task is to select the error type of the code based on the error list provided.
You only need to answer error type. Do not write anything else in your response.
For example, if the code snippet is missing a semicolon, Your output should be 'missing_colons'.
faulty code:
```cpp
#include <bits/stdc++.h>

int countPermutations(int n, int k, int qq[])
{
const int N = 505, P = 998244353;
int *q = new int[n + 10];
int m, dp[N][N], jc[N], f[N], ans;
memset(q, 0, sizeof(int) * (n + 1));
memset(dp, 0, sizeof(dp));
memset(jc, 0, sizeof(jc));
memset(f, 0, sizeof(f));
ans = 0;

for (int i = 1; i <= n; i++)
q[i] = qq[i - 1];
dp[0][0] = f[0] = 1;
for (int i = jc[0] = 1; i <= n; i++)
jc[i] = 1LL * jc[i - 1] * i % P;
for (int i = 1; i <= n; i++)
{
f[i] = jc[i];
for (int j = 1; j < i; j++)
f[i] = (f[i] + P - 1LL * f[j] * jc[i - j] % P) % P;
}
for (int i = 1; i <= n; i++)
{
for (int j = 0; j < i; j++)
for (int k = 1; k <= n; k++)
dp[i][k] = (dp[i][k] + dp[j][k - 1] * 1LL * f[i - j] % P) % P;
}
m = 0;
for (int i = 1; i <= n; i++)
if (q[i] > q[i + 1])
{
m = i;
break;
}
if (m == n)
{
for (int i = k; i <= n; i++)
ans = (ans + dp[n][i]) % P;
}
else
{
for (int i = m + 1; i <= n; i++)
{
if (i != m + 1 && (q[i - 1] > q[i] || q[i] < q[m]))
break;
int c = k + i - n - 1;
if (c >= 0)
ans = (ans + dp[m][c] * 1LL * jc[i - m - 1] % P) % P;
}
}
return ans;
}
```
error list:
['Delayed Execution', 'Improper HTML structure', 'Missing $', 'Missing mut', 'Misused := and =', 'Misused === and ==', 'Misused =>', 'Misused Macro Definition', 'Misused Spread Operator', 'Misused begin/end', 'Misused match', 'Misused var and val', 'Unused Variable', 'algorithm_error', 'condition_error', 'double_bug', 'faulty_indexing', 'function_error', 'html_unclosed_label', 'html_value_error', 'html_wrong_label', 'illegal_comment', 'illegal_indentation', 'illegal_keyword', 'illegal_separation', 'json_content_error', 'json_digital_leader_is_0', 'json_duplicate keys', 'json_struct_error', 'markdown_content_error', 'markdown_title_error', 'markdown_unclosed_error', 'missing_backtick', 'missing_colons', 'misused ==and=',
'misused templte', 'misused_let', 'operation_error', 'Pointer error', 'quadruple_bug', 'triple_bug', 'type_error', 'unclosed_parentheses', 'unclosed_string', 'undefined_methods', 'undefined_objects', 'variable_error']

https://redd.it/1u6pbkj
@r_cpp
I built native Claude Code integration for Visual Studio (the one IDE that didn't have it)

Claude Code has official IDE plugins for VS Code and JetBrains but nothing for Visual Studio. There's an open GitHub issue with a lot of +1s, so I built it.

It speaks the same protocol the official plugins use, so the CLI connects automatically. Claude's edits open in Visual Studio's native diff window with Accept / Reject / Reject-with-feedback instead of terminal prompts. It also auto shares your compiler errors and current selection as context, and there's a panel with live token tracking for the session.

It doesn't make any model calls of its own, it just drives the IDE half.

Code and a quick 30-second visual demo: https://github.com/firish/claude\_code\_vs 

Would be grateful if anyone takes the time to actually check it out and share feedback!

https://redd.it/1u6zoun
@r_cpp
Designing a plugin "collector" interface for a telemetry module — sanity check on C-ABI vs C++, self-describing schemas, and not over-engineering

I'm designing the interface for a telemetry/observability module in a C++ machine-vision inspection platform, and I'd love a sanity check from anyone who's built plugin/collector systems. I've made a bunch of decisions and mostly want to hear *where I'm wrong* or *what I'm not considering*.

**Context.** The platform is plugin-based — a host app dynamically loads modules and device adapters as DLLs/.so. The telemetry module collects HW/OS metrics and correlates them with the app's own activity (which stage is running, how many run concurrently, etc.) into a forensic log, under a hard constraint: **\~zero impact on the hot inspection path**. I want collection to be extensible — add a new metric source *without touching the core interface*.

**What I have so far — a "collector" abstraction with two tiers:**

1. **Internal collectors (in-process, C++ abstract interface).** These subscribe to the host's typed event bus. The subscribe API is a compile-time template keyed on the C++ event type, so these *can't* sit behind a C ABI — they're a C++ `ICollector` compiled into the module.
2. **External collectors (pure C-ABI plugin DLLs).** These only poll OS/HW/kernel (no host types). They implement a small C ABI (`init/finalize/open/close/describe/collect`), are `dlopen`'d at runtime, and run on a dedicated thread.

Boundary rule: *needs the event bus / a host type → internal C++; OS/HW polling only → external C-ABI.*

**Specific decisions I'm unsure about:**

* **Pull-based C-ABI:** host calls `collect(handle, row_sink_cb, userdata)` on a dedicated thread; the collector pushes result rows into the sink callback (scalar = 1 row, top-N = N rows).
* **Self-describing schema:** `describe(handle)` returns a JSON string declaring each field's `{key, type, unit}` \+ gating metadata (`minLevel`, `osMask`). The host's writer/viewer need no code changes for a new metric.
* **"Day-1" safety contracts** baked into the header: (1) every C function wraps its body in try/catch so no C++ exception crosses the `extern "C"` boundary; (2) the `describe()` string is owned by the collector, valid only until the next `describe`/`close`; (3) `close()` must quiesce the collector's threads before returning.

**Questions I'd love opinions on:**

1. **Two parallel interfaces (C++ internal + C-ABI external) — smell or justified?** Maintaining two shapes of the same idea bugs me, but forcing everything through a C ABI loses typed event subscription. Reasonable seam, or is there a cleaner approach (thin C++ wrapper over one C ABI, message-passing instead of typed events, …)?
2. **Self-describing JSON from** `describe()` **vs a versioned C struct.** JSON is flexible and avoids ABI breaks when fields change, but it's stringly-typed. How do you evolve a plugin schema/ABI safely — version constants, capability negotiation at init, a real IDL (flatbuffers/protobuf) at the boundary?
3. **C-ABI safety idioms.** Are try/catch-everywhere + string-ownership + teardown-quiesce the standard playbook for C++ behind a C ABI, or am I missing cleaner patterns (error codes + out-params, never returning owned pointers)? Is documenting these in header comments enough, or should they be enforced structurally?
4. **Pull vs push, mixed cadence.** Some collectors are cheap/fast (NVML poll), others slow/blocking (kernel queues). Everything is "host pulls on one thread" now. Would you isolate blocking collectors (thread per impact class? async with a deadline?), or is one slow-probe thread + an "impact" self-declaration in `describe()` enough?
5. **Versioning a plugin C-ABI for real.** What's worked for forward/backward compat as the ABI grows — a version int from `init`, additive-only rules, a vtable-of-function-pointers struct instead of named exports?
6. **Avoiding over-engineering.** I have exactly *one* real external collector today (kernel nonpaged pool) and a couple internal ones; the team is wary of speculative plugin machinery.
How do you decide how much extensibility to build now vs. when the 2nd/3rd collector actually shows up?

**Constraints, for context:** cross-platform (Windows/Linux), vendor-SDK-gated (don't build a collector if its SDK is absent), hot path untouched (producers only push to a lock-free ring; all heavy work off-thread).

Thanks — happy to expand on any part. Mostly after "here's what you'll regret" and "here's the boring standard way to do X."

https://redd.it/1u71mfb
@r_cpp
Latest News From Upcoming C++ Conferences (2026-06-16)

This is the latest news from upcoming C++ Conferences. You can review all of the news at https://programmingarchive.com/upcoming-conference-news/

TICKETS AVAILABLE TO PURCHASE

The following conferences currently have tickets available to purchase

ACCU on Sea (15th - 20th June) (Last Chance) \- You can buy standard tickets at [https://accuonsea.uk/tickets/](https://accuonsea.uk/tickets/) with discounts available for ACCU members.
CppCon (12th - 18th September) \- You can buy early bird tickets until June 26th at https://cppcon.org/registration/
C++ Under The Sea (14th - 16th October) \- You can buy early bird tickets at [https://sales.ticketing.cm.com/cppunderthesea2026/](https://sales.ticketing.cm.com/cppunderthesea2026/)
Meeting C++ (26th - 28th November) \- You can buy early bird tickets at https://meetingcpp.com/2026/

OPEN CALL FOR SPEAKERS

ADC (Last Chance) \- Interested speakers have until June 28th to submit their talks for ADC which is scheduled to take place on 9th - 11th November. Find out more including how to submit your proposal at [https://audio.dev/adc-bristol-26/call-for-speakers/](https://audio.dev/adc-bristol-26/call-for-speakers/)

OTHER OPEN CALLS

CppCon Call For Posters Now Open \- Interested poster presenters have until July 15th to submit their applications for the CppCon main conference which is scheduled to take place from 14th - 18th September. For more information including how to apply visit https://cppcon.org/cppcon-2026-call-for-poster-submissions/
CppCon Call For Authors Now Open! \- CppCon are looking for book authors who want to engage with potential reviewers and readers. Read the full announcement at [https://cppcon.org/call-for-author-2026/](https://cppcon.org/call-for-author-2026/) 

TRAINING COURSES AVAILABLE FOR PURCHASE

Conferences are offering the following training courses:

C++Online

1. AI++ 101 - Build an AI Coding Assistant in C++ \- Jody Hagins - 1 day online workshop available on
Friday 24th July 16:00 - 00:00 UTC/0900-1700 PDT \- [https://cpponline.uk/workshop/ai-101/](https://cpponline.uk/workshop/ai-101/)
Watch the preview session here https://youtu.be/suP5zA7QqW4

CppCon Online Workshops

9th - 11th September

1. Modern C++: When Efficiency Matters \- Andreas Fertig - 3 day online workshop available on 9th – 11th September 09.00 – 15.00 MDT - https://cppcon.org/class-2026-when-efficiency-matters/
2. System Architecture And Design Using Modern C++ \- Charley Bay - 3 day online workshop available on 9th – 11th September 09.00 – 15.00 MDT - https://cppcon.org/class-2026-system-architecture-and-design-using-modern-cpp/

21st - 23rd September

1. C++ Fundamentals You Wish You Had Known Earlier \- Mateusz Pusz - 3 day online workshop available on 21st– 23rd September 09.00 – 15.00 MDT - https://cppcon.org/class-2026-cpp-fundamentals/
2. C++23 in Practice: A Complete Introduction \- Nicolai Josuttis - 3 day online workshop available on 21st– 23rd September 09.00 – 15.00 MDT - https://cppcon.org/class-2026-cpp23-in-practice/
3. Programming with C++20 \- Andreas Fertig - 3 day online workshop available on 21st– 23rd September 09.00 – 15.00 MDT - https://cppcon.org/class-2026-programming-with-cpp20/

26th - 27th September

1. Using C++ for Low-Latency Systems \- Patrice Roy - 2 day online workshop available on 26th– 27th September 09.00 – 17.00 MDT -
https://cppcon.org/class-2026-low-latency/

CppCon Onsite Workshops

All onsite workshops will take place in the Gaylord Rockies in Aurora, Colorado

12th & 13th September

1. Advanced and Modern C++ Programming: The Tricky Parts \- Nicolai Josuttis - 2 day in-person workshop available on 12th & 13th September - 09:00 - 17:00 - https://cppcon.org/class-2026-tricky-parts/
2. C++ Best Practices \- Jason Turner - 2 day in-person workshop available on 12th & 13th September - 09:00 - 17:00 - https://cppcon.org/class-2026-best-practices/
3. How Hardware Gets Hacked: Breaking and Defending Embedded Systems \- Nathan Jones - 2 day in-person workshop available on 12th & 13th September - 09:00 - 17:00 - https://cppcon.org/class-2026-hardware-hack/
4. Mastering `std::execution`: A Hands-On Workshop \- Mateusz Pusz - 2 day in-person workshop available on 12th & 13th September - 09:00 - 17:00 - https://cppcon.org/class-2026-execution/
5. Performance and Efficiency in C++ for Experts, Future Experts, and Everyone Else \- Fedor Pikus - 2 day in-person workshop available on 12th & 13th September - 09:00 - 17:00 - https://cppcon.org/class-2026-performance-and-efficiency/
6. Talking Tech \- Sherry Sontag - 2 day in-person workshop available on 12th & 13th September - 09:00 - 17:00 - https://cppcon.org/class-2026-talking-tech/

 13th September

1. AI++ 101 : Build a C++ Coding Agent from Scratch \- Jody Hagins - 2 day in-person workshop available on 12th & 13th September - 09:00 - 17:00 - https://cppcon.org/class-2026-AI101/
2. Essential GDB and Linux System Tools \- Mike Shah - 1 day in-person workshop available on 13th September - 09:00 - 17:00 - https://cppcon.org/class-2026-essential-gdb/

19th & 20th September

1. AI++ 201: Building High Quality C++ Infrastructure with AI \- Jody Hagins - 2 day in-person workshop available on 19th & 20th September - 09:00 - 17:00 - https://cppcon.org/class-2026-ai201/
2. Function and Class Design with C++2x \- Jeff Garland - 2 day in-person workshop available on 19th & 20th September - 09:00 - 17:00 - https://cppcon.org/class-2026-function-class-design/
3. High-performance Concurrency in C++ \- Fedor Pikus - 2 day in-person workshop available on 19th & 20th September - 09:00 - 17:00 - https://cppcon.org/class-2026-high-perf-concurrency/

OTHER NEWS

(NEW) C++Now Early Access Now Open \- Anyone who attended C++Now 2026 can now get early access to the C++Now YouTube Videos. Visit [https://cppnow.org/announcements/2026/06/attendee-early-video-access/](https://cppnow.org/announcements/2026/06/attendee-early-video-access/) for more information
(NEW) Voting on the Meeting C++ Talks Has Begun \- For more information on how to vote, visit https://meetingcpp.com/meetingcpp/news/items/The-voting-on-the-talks-for-Meeting-Cpp-2026-has-begun-.html for more information
ADC Call For Speakers Now Open \- Interested speakers have until June 28th to submit their talks for ADC which is scheduled to take place on 9th - 11th November. Find out more including how to submit your proposal at [https://audio.dev/adc-bristol-26/call-for-speakers/](https://audio.dev/adc-bristol-26/call-for-speakers/)
CppCon 2026 Attendance Support Ticket Program Now Open! \- Includes free tickets for people who would not be able to attend otherwise. Find out more including how to
apply at https://cppcon.org/cppcon-2026-attendance-support-ticket-program/

Finally anyone who is coming to a conference in the UK such as C++ on Sea or ADC from overseas may now be required to obtain Visas to attend. Find out more including how to get a VISA at https://homeofficemedia.blog.gov.uk/electronic-travel-authorisation-eta-factsheet-january-2025/

https://redd.it/1u79ivd
@r_cpp
immutable<>, complement of C++26 std::indirect<> and std::polymorphic<>

C++26 introduces [`std::indirect<>` and `std::polymorphic<>`](https://wg21.link/p3019) (reference implementation at [github.com/jbcoe/value_types](https://github.com/jbcoe/value_types/)):

* `std::indirect<T>` is like a value-minded `std::unique_ptr<T>` sans polymorphism support. `std::indirect<T>` is movable if `T` is movable and copyable if `T` is copyable.
* `std::polymorphic<B>` is like a value-minded `std::unique_ptr<B>` for polymorphic bases `B`. `std::polymorphic<B>` can hold an object of any copyable class `D` which is an instantiable subclass of `B`. `std::polymorphic<B>` is copyable; its copy constructor will polymorphically clone the underlying object.

Both types are designed to be non-nullable. For lack of destructive move semantics, both have a moved-from state which can be identified with the `valueless_after_move()` member function.

As far as I can tell, the design of these is based on Sean Parent's "concept–model idiom". Remembering his presentation on the topic (https://sean-parent.stlab.cc/papers-and-presentations/#value-semantics-and-concept-based-polymorphism), I noticed that there is an obvious complement to `indirect<>` and `polymorphic<>` which I provisionally dub `immutable<>`:

* `immutable<T>` is like a value-minded `std::shared_ptr<const T>`. It is cheaply copyable (no deep copy), with no movability requirements imposed on `T`. It can hold an object of any instantiable subtype of `T`.

[Possible implementation + some tests on Compiler Explorer](https://gcc.godbolt.org/z/qh3K3d196)

Does this make sense? I find it very useful for building persistent data structures. In fact, it seems so obvious to me that I'm surprised this wasn't already in P3019.

*Edit:* minor correction

https://redd.it/1u7bamr
@r_cpp
Function Composition Arc: C++17 -> C++20 -> C++23

For those that may be interested, I took a piece of educational code written years ago that composes an arbitrary number of functions and showed how to evolve it to take advantage of modern C++ features using ranges and functional programming.

https://freshsources.com/code-capsules/composing-functions/



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