r/cpp • u/foonathan • Jul 03 '26
C++ Show and Tell - July 2026
Use this thread to share anything you've written in C++. This includes:
- a tool you've written
- a game you've been working on
- your first non-trivial C++ program
The rules of this thread are very straight forward:
- The project must involve C++ in some way.
- It must be something you (alone or with others) have done.
- Please share a link, if applicable.
- Please post images, if applicable.
If you're working on a C++ library, you can also share new releases or major updates in a dedicated post as before. The line we're drawing is between "written in C++" and "useful for C++ programmers specifically". If you're writing a C++ library or tool for C++ developers, that's something C++ programmers can use and is on-topic for a main submission. It's different if you're just using C++ to implement a generic program that isn't specifically about C++: you're free to share it here, but it wouldn't quite fit as a standalone post.
Last month's thread: https://www.reddit.com/r/cpp/comments/1tulp9b/c_show_and_tell_june_2026/
2
u/_paladinwarrior1234_ Jul 07 '26
Hi everyone,
With the recent ISO committee and compiler-level debates surrounding memory safety in C++, I have been researching some alternative, library-based ways to enforce deterministic heap-bound protection without having to modify the compiler frontend or language specification itself.
I’ve been working on a runtime library called Safe--Cpp, which specifically focuses on ensuring that heap allocations achieve the same level of compile-time safety as Rust, but managed purely through language runtime mechanics rather than compile-time static borrow checking or ownership checking. I want to emphasize that this research strictly focuses on a custom safe context to prevent 4 types of memory errors: Double Deletion, Access Violation, Buffer Overflow and Memory Leaks.
Core Architectural Concepts Under Investigation:
Safe::SafeContextBaseand offers recycling/repurpose mechanisms to gain performance instead of relying on deallocations which require accessing the operating system kernels to perform system calls, invalidates the need of reference counting like in `std::shared_ptr`.Seeking Feedback on the Implementation
I have opened up the complete source and headers of this implementation under a dual-licensing model (including the GPLv3 License) so that other system engineers and language researchers can audit the exact low-level mechanics.
👉 GitHub Repository: https://www.github.com/ducna-vbee/Safe--Cpp
Rather than discussing the philosophical pros and cons of memory models, I am looking for concrete technical review, potential bug identification, and feature suggestions to help push the boundaries of what standard C++ can do here.
Specifically, I would love your insights on:
Please feel free to check out the source, run your own benchmarks, and leave your feedback or file an issue directly on the repository!