C++ - Reddit
الذهاب إلى القناة على Telegram
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
إظهار المزيد228
المشتركون
لا توجد بيانات24 ساعات
لا توجد بيانات7 أيام
لا توجد بيانات30 أيام
أرشيف المشاركات
228
A virtual pointer pattern for dynamic resolution in C++ — years in production
I've been working on Olex2, a crystallography software package, for over 20 years. At some point I needed pointers whose target wasn't a fixed address but a runtime decision — "whatever is currently the active object of this type."
The result was
olx_vptr — a virtual pointer where resolution is delegated to a user-defined get_ptr():
https://github.com/pcxod/olex2/blob/master/sdl/olxvptr.h
The calling code uses natural pointer syntax and knows nothing about how resolution happens. A concrete use looks like this:
struct VPtr : public olx_virtual_ptr<TXFile> {
virtual IOlxObject *get_ptr() const;
};
olx_vptr<TXFile> thip(new VPtr());
lib->Register(
new TFunction<TXFile>(thip, &TXFile::LibGetFormula, "GetFormula", .....
(https://github.com/pcxod/olex2/blob/master/xlib/xfiles.cpp#L1427)
Single virtual dispatch, fully type-safe, open to any resolution strategy.
I'm surprised this pattern never made it into the standard or common literature. Has anyone seen something similar? Would there be interest in a more formal writeup?
https://redd.it/1spvxx6
@r_cpp228
Adding Stack Traces to All C++ Exceptions
https://werwolv.net/posts/cpp_exception_stacktraces/
https://redd.it/1spnzjn
@r_cpp
228
mini project
I built a small to-do List project in C++
I'd appreciate if you can take a quick look and give feedback on:
\>File structure
\>Code design
\>Any bad practices
\> the name must be one word like (ex_ex_ex) and i can't solve that
GitHub link: to-do\_list\_cpp/to\_do\_list.cpp at main · TheGreat-A7A/to-do\_list\_cpp
https://redd.it/1spmp6g
@r_cpp
228
Live Coding in C++ Is Difficult But Not Impossible
https://youtu.be/Tb8Ni1jdcGI?t=989
https://redd.it/1spjik3
@r_cpp
228
Using Internal Partitions
https://abuehl.github.io/2026/04/18/using-internal-partitions.html
https://redd.it/1spe1lu
@r_cpp
228
Opinions on Introducing C++: The Easy Way to Start Learning Modern C++ by Frances Buontempo
What do you guys think about the book Introducing C++: The Easy Way to Start Learning Modern C++ by Frances Buontempo i was considering to buy it because i want to learn c++ and i already have some experiences coding in other languages it seems like a sort of successor to accellerated c++
https://redd.it/1sp3epy
@r_cpp
228
Next week: Interview with Guy Davidson at Meeting C++ online
https://www.meetup.com/de-de/meeting-cpp-online/events/314162009
https://redd.it/1sozbmk
@r_cpp
228
A simplified model of Fil-C
https://www.corsix.org/content/simplified-model-of-fil-c
https://redd.it/1som5pr
@r_cpp
228
C++26 2026-04 Update
https://en.cppreference.com/cpp/compiler_support/26
https://redd.it/1sojtkm
@r_cpp
228
Built an AI overlay that disappears on screen share — one Win32 API call, C++, and a week of evenings
Built this after getting frustrated during technical interviews — an AI assistant that's literally invisible on screen share
I kept wondering why there wasn't a clean way to have a personal reference window open during video calls without it being visible on screen.
Then I found out about SetWindowDisplayAffinity — a Windows API that lets you exclude a window from all capture. OBS, Zoom, Teams, Google Meet — none of them pick it up. The window exists on your screen, nowhere else.
Spent a week building an overlay on top of it. Floating AI assistant. Only you can see it. That's the whole thing.
Shipped it at www.unviewable.online.
For anyone curious about the tech — it's C++ with CMake, the magic is literally one Win32 API call. Windows has had this since Windows 10 2004 and barely anyone talks about it. Wild.
https://redd.it/1sodzjg
@r_cpp
228
cppreference is back up! but overloaded
I just clicked a link that wasn’t cached and noticed very long loading time. Eventually the page loaded, and I noticed the font was different. After Herb’s post, I was excited and noticed the homepage notice declared the site newly operational again! However I am experiencing a significant number of 5xx errors.
https://redd.it/1so7kx8
@r_cpp
228
Built a Preemptive Task Scheduler in C++ from scratch: Performance comparison across Windows, Linux, and PREEMPT_RT kernel.
https://prejudice.tistory.com/45
https://redd.it/1so5213
@r_cpp
228
build2 0.18.1 released, adds package manager Fetch Cache, JSON Compilation Database, and official binary packages
https://build2.org/release/0.18.0.xhtml
https://redd.it/1so1igj
@r_cpp
228
Online talk on building a C++ based custom language and lexer internals
Developers from PVS-Studio are continuing their series of talks about creating a custom programming language. They will explain what the lexer is, what it consists of, and how to work with it.
The talk series as a whole is for devs who want to start understanding how compilers work under the hood. Throughout the series, their C++ architect demonstrates the practical application of each programming language component.
If you're interested, I leave the link here.
https://redd.it/1so08nx
@r_cpp
228
HPX Tutorials: Performance analysis with Traveller
https://www.youtube.com/watch?v=xN5BM7FzDsI
https://redd.it/1snyotu
@r_cpp
228
C++20 Modules: The Tooling Gap
https://ignition.github.io/posts/cpp20-modules-the-tooling-gap/
https://redd.it/1snx6r8
@r_cpp
228
Documenting my Chess Engine Journey So Far!
Just thought I'd pop this here. Am writing a Chess Engine in C++ and am blogging all the trials, tribulations and optimizations in what I'm hoping is a semi-humorous and entertaining way.
Would love any feedback you might have and also would love feedback on the code which is available towards the top!
https://olly-evans.github.io/chess/
https://redd.it/1snwal6
@r_cpp
228
Question to Module Users: How Do You Use Partitions?
Quick question for those who currently use modules with partitions.
That is, for a module like the one below (our file Core/\_Module.ixx):
export module Core;
export import :Attach;
export import :Base;
export import :Container;
export import :Diagram;
export import :Interfaces;
export import :Transaction;
export import :View;
How did you implement your code?
What we did:
We have done it as I've described in my blog posting "How a Module Should Look", which is for example for our file Core/Transaction/FinalizerDock.cpp:
module Core;
import :Transaction;
...
which contains function definitions for declarations in the partition Core/Transaction/Transaction.ixx:
export module Core:Transaction;
...
Please tell me what you did. I'm really curious.
Thanks in advance for the responses!
https://redd.it/1snrk4q
@r_cpp
228
I built a tool for C++ devs using Neovim that shows field offsets, padding, alignment, and total struct/class size from clang. It also handles STL types and templates.
https://github.com/J-Cowsert/classlayout.nvim
https://redd.it/1snn58i
@r_cpp
228
متاح الآن! بحث تيليغرام 2025 — أهم رؤى العام 
