TGViewer
Channel Public Channel
C++ - Reddit

C++ - Reddit

@r_cpp

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
Subscribers
230
Photos
48
Videos
8
Links
25.4K

Showing posts older than #25302 · Back to latest

Older Posts 20 shown
Post #25298 19
YCETL: a compile time STL like template library to generate data structures that can be used at runtimes

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.

https://redd.it/1tpxgqm
@r_cpp
GitHub GitHub - zokrezyl/ycetl: C++ STL like template library for constexpr C++ STL like template library for constexpr. Contribute to zokrezyl/ycetl development by creating an account on GitHub.
Post #25297 15
Is the C++ ecosystem ready to fully move away from C++17?

We’re starting a new backend project, and there’s a strong push to go straight to clean C++20 without caring about legacy stuff. But I’m still a bit worried that the open-source ecosystem (frameworks, popular libraries, etc.) isn’t fully ready to drop C++17 yet.

I’m also concerned that if we completely move away from something like Boost in favor of C++20 standard features, we might just end up running into all sorts of tooling and compatibility issues instead of real benefits.

Are there any examples of large-scale server-side projects already running C++20 in production without relying on C++17?

https://redd.it/1tpwh0n
@r_cpp
Reddit From the cpp community on Reddit Explore this post and more from the cpp community
Post #25291 21
3,000 TUs and our build times are an embarrassment

Hey. Im working on a monorepo that's grown to around 3k translation units and build times are hurting iteration speed. Currently on Make, been hearing good things about Ninja and haven't touched MSBuild outside of Visual Studio. Curious what people with large codebases are running.

Did some rough testing, single file changed, 16-core machine:

\# incremental build, 1 file changed, 3k TU project
make -j16 \~4.2s
ninja \~0.9s
msbuild /m:16 \~7.8s

Wondering if anyone's tried clang-cl with Ninja on Windows to sidestep the MSBuild overhead entirely. Also regularly maxing out local core count, which makes me wonder if we've hit a hardware ceiling?

https://redd.it/1tp3s5s
@r_cpp
Reddit From the cpp community on Reddit Explore this post and more from the cpp community
Post #25290 21
Post #25287 10
undercurrent: A proof-of-concept library to fix range adaptor inefficiencies

Hi, I'm a hobbyist programmer and I recently came across Barry Revzin's blog post about inefficiencies in the C++ ranges library when filter or reverse is mixed into an adaptor chain. I wanted to see if I could do something about it, and after some experimentation I ended up with this library: undercurrent.

The core idea is a customization point object uc::advance_while, which descends the iterator hierarchy recursively rather than operating at the top level. This allows algorithms to do their work at the lowest iterator level, avoiding redundant predicate evaluations.

I observed a significant speed improvement with an adapter chain like take_while | transform | filter | reverse. On Clang 22 + libc++, I'm seeing roughly 16x speedup over std::ranges. Though MSVC shows a smaller improvement (\~2x). Currently supports a minimal set of adaptors and algorithms. GCC is not yet working, likely due to module-related issues.

I'd love to hear your feedback, thoughts, or any edge cases I should consider!

GitHub: https://github.com/atstana/undercurrent

Barry Revzin's blog: https://brevzin.github.io/c++/2025/04/03/token-sequence-for/

https://redd.it/1tn8jqi
@r_cpp
GitHub GitHub - atstana/undercurrent Contribute to atstana/undercurrent development by creating an account on GitHub.
Post #25286 13
How an MS-DOS picklist problem in 1991 became std::bitset -- by the author who proposed it

I served on the original ISO C++ Standards Committee (J16) and proposed std::bitset. I recently wrote up the story of how it came to be -- starting from a memory-constrained MS-DOS application, through the early days of templates, and into C++98.

I also touch on the parallel story of bitstring, which became vector<bool> and eventually boost::dynamic_bitset.

https://freshsources.com/blog/

https://redd.it/1to6qww
@r_cpp
Post #25284 17
C++23 : Articulated-Rigid-Body dynamics library for graphics v1.0 (ABA/RNEA+GJK/EPA+AD)

I have been working on a small C++23 library for articulated rigid-body dynamics for computer graphics, and I have prepared a v1.0 release.

The project uses spatial algebra and currently includes articulated-body algorithms (ABA/RNEA), URDF support, collision detection and resolution functionality (GJK/EPA, including openGJK), automatic differentiation (AD) support, and example/test programs.

I have focused on is keeping everything simple, including the setup: a single line, standard CMake build is enough to download/build all dependencies and run the examples/tests.

The project is still evolving, but v1.0 is intended to mark a stable API and a largely complete core feature set.

I’m interested in feedback from C++ developers, particularly around API design, library structure, performance, and general usability.

Available here: ARB Library

https://redd.it/1to37ao
@r_cpp
GitHub GitHub - wbyates777/Articulated-Rigid-Body: Compact implementation of spatial algebra, and Featherstone's articulated-body algorithm… Compact implementation of spatial algebra, and Featherstone's articulated-body algorithm (ABA), composite rigid body algorithm (CRBA), and the recursive Newton-Euler algorithm (RNEA) with e...
Older posts →
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →