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
make sense of this results :)
https://redd.it/1lgg7lc
@r_cpp
Clang-Format Optimizer
https://github.com/ammen99/clang-format-auto-infer
https://redd.it/1lgbgjd
@r_cpp
Companies that offer c++ remote jobs
I am looking for c++ remote jobs as an Indian. I am open to full time or internship opportunities and would love to contact the company by myself regarding this.
https://redd.it/1lg9io3
@r_cpp
when will cppref return to normal?
It's been about a month since cppreference went into read-only mode. And so far, there haven't been any new updates or announcements about it coming out of maintenance.
https://redd.it/1lfsm28
@r_cpp
Revisiting Knuth’s “Premature Optimization” Paper
https://probablydance.com/2025/06/19/revisiting-knuths-premature-optimization-paper/
https://redd.it/1lfyjyu
@r_cpp
tabular - a lightweight, header-only C++ library for creating well-formatted, fully-customizable CLI tables.
Recently, I had some project ideas that required a table formatting library. I searched for existing solutions and found tabulate, the most popular option, but encountered several issues like locale-dependent handling of multi-byte characters, weak support for dynamic/irregular tables, and some Windows-specific bugs (though I'm now on Linux).
I decided to write my own implementation that addresses these problems. tabular is a locale-independent, lightweight, header-only C++ library for table formatting. Based on my testing, it works properly on Windows (though my testing there was limited since I'm primarily on Linux). I'd love to share it here and get your feedback.
https://redd.it/1lfnbh1
@r_cpp
Alex Loiko: Fractals on the GPU
https://youtu.be/PMDIDcBu3V0
https://redd.it/1lfba0o
@r_cpp
Why can't Contracts be removed without blocking C++26?
In recent video Audience Bjarne says he is considering voting against C++26 because of contacts, but he is torn because C++26 has some a lot of nice things.
transcript(typed by me, feel free to correct if I misheard anything)
Bjarne Stroustrup:
>So go back about one year, and we could vote about it before it got into the standard, and some of us voted no. Now we have a much harder problem. This is part of the standard proposal. Do we vote against the standard because there is a feature we think is bad? Because I think this one is bad. And that is a much harder problem. People vote yes because they think: "Oh we are getting a lot of good things out of this.", and they are right. We are also getting a lot of complexity and a lot of bad things. And this proposal, in my opinion is bloated committee design and also incomplete.
Can somebody explain to me why contracts can not just be taken out without the drama of blocking C++26?
I am mostly asking about WG21 procedures. I'm not primarily looking for political speculation, though if someone has insight on that side of things, feel free to share.
https://redd.it/1lf9qov
@r_cpp
Odd conversion rule: The case of creating new instances when you wanted to use the same one
https://devblogs.microsoft.com/oldnewthing/20250529-00/?p=111228
https://redd.it/1kzdxfx
@r_cpp
JIT Code Generation with AsmJit and AsmTk (Wednesday, June 11th)
Next month's Utah C++ Programmers meetup will be talking about JIT code generation using the AsmJit/AsmTk libraries:
https://www.meetup.com/utah-cpp-programmers/events/307994613/
https://redd.it/1kz9bwr
@r_cpp
CppCast: From Refactoring to (physical) Relocation
https://cppcast.com/from_refactoring_to_physical_relocation/
https://redd.it/1kz2qz6
@r_cpp
Creating Method-Coverage reports based on Line-Coverage reports
So, assuming that I have a Cobertura XML report (or an lcov, or equivalent) that contains metadata about line coverage but nothing regarding method/function coverage, is there any tool that allows me to use the source code files and interpolate them with the line coverage report to generate the method-coverage?
I know that this would likely be language-dependent, so that's why I'm posting on the C++ forum.
I'm looking for a way to avoid compiler-based solutions and only use source-code and live coverage.
Of course I can do this manually, but my project is big and that's why I'm looking to automate it. I have also tried some AI but it does not make a good job at matching lines of coverage. Any ideas?
https://redd.it/1kyrs2s
@r_cpp
IPC-Call C++ framework for IPC call
The IPC-Call framework allows calling a C++ server function from a C++ client in the same way as it is called locally https://github.com/amarmer/IPC-Call/tree/main
Comments and suggestions are welcome!
https://redd.it/1kykryw
@r_cpp
FLOX - C++ framework for building trading systems
Hi, dear subredditors.
On past weekend finished my trading infrastructure project that I started a few months ago. I named it FLOX. It is written in pure C++ (features from 20 standard used) and consists of building blocks that, in theory, allow users to build trading-related applications: hft systems, trading systems, market data feeds or even TradingView analog.
Project is fully open-source and available at github: https://github.com/eeiaao/flox
There are tests and benchmarks to keep it stable. I tried to document every component and shared high-level overview of this framework in documentation: https://eeiaao.github.io/flox/
Main goal of this project is to provide a clean, robust way to build trading systems. I believe my contribution may help people that passioned about low latency trading systems to build some great stuff in a systematic way.
I already tried to use it to build hft tick-based strategy and I was impressed how easy it scaling for multiple tickers / exchanges.
C++ knowledge is required. I have some thoughts on embedding JS engine to allow write strategies in JavaScript, but that's for the future.
Project is open to constructive criticism. Any contributions and ideas are welcome!
https://redd.it/1kya8ab
@r_cpp
Three types of name lookups in C++
https://www.sandordargo.com/blog/2025/05/28/three-ways-of-name-lookups
https://redd.it/1ky2vdu
@r_cpp
Why is copying n character string faster by many magnitude than creating sub-string of n characters?
Hi everyone,
I was solving a [Palindrome partition](https://leetcode.com/problems/palindrome-partitioning/description/) problem on leetcode where I came up with two very similar solutions but first on takes longer time and consumes more memory but I am not able to pinpoint why it is happening.
I want to understand what change in second one made it so faster.
In code below, I am maintaining list of starting index from where I need to create a sub-string in path variable. Then when I reach end and I know I have a result, I create vector of substrings and move them to res vector. Here, each string is created only once and std::move makes sure that unnecessary copy don't happen. But still this solution performs badly as can be seen in [submission](https://leetcode.com/problems/palindrome-partitioning/submissions/1670941013/) for both memory and runtime.
class Solution {
void partition(string& s, int idx, vector<vector<string>>& res, vector<int>& path)
{
path.push_back(idx);
if (idx == s.size())
{
auto r = vector<string>();
int limit = path.size() - 1;
for (int i = 0; i < limit; i++)
{
r.push_back(s.substr(path[i], path[i + 1] - path[i]));
}
res.push_back(std::move(r));
}
else
{
for (int i = idx; i < s.size(); i++)
{
int t1 = i , t2 = idx;
bool ret = true;
while (t2 < t1)
{
if (s[t2] != s[t1])
{
ret = false;
break;
}
t2 ++;
t1 --;
}
if (ret) partition(s, i + 1, res, path);
}
}
path.pop_back();
}
public:
vector<vector<string>> partition(string s) {
auto res = vector<vector<string>>();
auto path = vector<int>();
partition(s, 0, res, path);
return res;
}
};
Now with a small change that instead of using index to track the sub-string and creating them at the end, I create them and pass them as part of path vector. This time I am creating sub-strings and then copying them to res vector which should be costlier than previous case but still this solution outperforms previous one.
class Solution {
void partition(string& s, int idx, vector<vector<string>>& res, vector<string>& path)
{
if (idx == s.size())
{
res.push_back(path);
}
else
{
for (int i = idx; i < s.size(); i++)
{
int t1 = i , t2 = idx;
bool ret = true;
while (t2 < t1)
{
if (s[t2] != s[t1])
{
ret = false;
break;
}
t2 ++;
t1 --;
}
if (ret)
{
path.push_back(s.substr(idx, i - idx + 1));
partition(s, i + 1, res, path);
path.pop_back();
}
}
}
}
public:
vector<vector<string>> partition(string s) {
auto res = vector<vector<string>>();
auto path = vector<string>();
partition(s, 0, res, path);
return res;
}
};
I am trying to understand what is consuming more memory and using up extra time. My expectated result is opposite of what I see here. It will be great if I can get some help to
I just built my own shell in cpp and want to know if it's a good project for my resume !
Help would be appreciated
https://redd.it/1lgb19h
@r_cpp
How to Install Crow C++ on Windows
🐦 Create beautiful, fast, and easy web applications.
https://terminalroot.com/how-to-install-crow-cpp-on-windows/
https://redd.it/1lg3x4g
@r_cpp
vcpkg and versioning (esp. with multiple commits)
Hi, I'm trying to understand how versioning works in vcpkg running in a CI.
I know about the vcpkg's classic mode of checking out a specific vcpkg commit and having a central repository of installed packages in the vcpkg folder.
I'd like to understand manifest mode since it's the reccomended one nowadays and in fact, I'd like to be able to update the dependencies depending which commit of my code gets built in the CI.
Other dependencies manager, like NuGet, Rust's Cargo and Conan for C++, have the tool version that can be always kept up to date and a local file that specify the dependencies your project need. When invoking the tool, the deps gets fetched and prepared accordingly. So, you can have the latest nuget / cargo / conan (2) and fetch / build newer or older deps.
How does this work with vcpkg in manifest mode? I've read about the builtin-baseline
option but I don't understand what happens if the vcpkg folder is newer or older than that.
I'm also interested in understanding what happens when there's the need to create an hotfix to an older version (possibly using a different package versions and a different baseline). Because it's impossible to ask for the CI to switch the vcpkg folder's commit before any build...
Thanks.
https://redd.it/1lfywfk
@r_cpp
how to move value from unique_ptr<T> to another T t and transfer ownership?
T is movable. Don't copy the T data.
https://redd.it/1lfrjdh
@r_cpp
Learning modern DirectX 11
While learning d3d11, it has come to my notice that microsoft constantly updated directx all the way to version 11.4. Where can I learn "modern" d3d11? All the examples and tutorials I see are targeted towards "old" d3d11. I understand that d3d12 is a thing but I am not ready for it yet. Thanks in advance!
https://redd.it/1lfiebd
@r_cpp
Kourier vs Lithium: The Fully-Compliant Server is Also the Fastest
https://blog.kourier.io/posts/kourier-vs-lithium-the-fully-compliant-server-is-also-the-fastest
https://redd.it/1lf8ziv
@r_cpp
Sourcetrail (Fork) 2025.6.19 released
Hi everybody,
[Sourcetrail 2025.6.19](https://github.com/petermost/Sourcetrail/releases/tag/2025.6.19), my **fork** of the C++/Java source explorer, has been released with these changes:
* GUI: Allow removing projects from the `Recent Projects` list
* GUI: Fix highlighting of `Text` and `On-Screen` search results for UTF-16/UTF-32 text
* GUI: Show configured text encoding in the status bar
* Internal: Switch to ['UTF-8 Everywhere'](https://utf8everywhere.org/)
* Internal: Switch to Qt resource system for most GUI resources
https://redd.it/1lf8y81
@r_cpp
Crowcpp mustache templates NOT FOUND
I have the code:
crow::SimpleApp app;
auto template_text = crow::mustache::load("rates.html");
CROW_ROUTE(app, "/")([&](){
//some stuff
});
CROW_ROUTE(app, "/").methods("POST"_method)([&](const crow::request& req){
auto res = crow::response(303);
res.set_header("Location", "/");
return res;
});
app.port(18080)
.multithreaded()
.run();
After running it shows me the next line
`(2025-05-30 19:01:10) [WARNING ] Template "rates.html" not found.`
File "rates.html" placed in same directory with exe. I tried to set fullpath and ./rates.html path, but warning still same and I get blank page. How can I fix it? What am I doing wrong?
https://redd.it/1kzcsjt
@r_cpp
How to know what methods use popular in every topic like stl, list, .... ?
https://redd.it/1kz4olo
@r_cpp
Suggestion on (re)learning C++ development in 2025?
A bit of context: I've being programming for more than a decade, but my only professional experience is with C#/Javascript/Python. Last time I touched C++, unique_ptr was still a very new thing. I know what reference counting and RAII are, but that practically where my understanding of C++ ends.
If I'd like to hone my C++ skill and get myself familiar with modern C++ eco system, where should I start? I'm not talking about the syntax, but the state of modern toolchain: which version should I use? Do I need to learn from C++11 -> C++17 -> C++23 or I can just jump in C++23 directly? Which building system and package manager should I use, if any? Is there a more or less 'managed' development environment where I can set breakpoint and inspect objects like C#/Java? Stuff like that.
(My current goal is to learn SDL3 development, but for the sake of generality I don't want to limit this question to SDL3.)
https://redd.it/1kz1seu
@r_cpp
If you had 3 weeks to refresh C++ for an interview what would you approach that with ?
How would you brush up asap ? Curiousity only
https://redd.it/1kypfms
@r_cpp
Boost.Bloom by Joaquín M López Muñoz has been accepted!
Classical, block and multiblock Bloom filters, and more. Thanks to Review Manager Arnaud Becheler.
Announcement: https://lists.boost.org/Archives/boost/2025/05/259631.php
Repo: https://github.com/joaquintides/bloom
Docs: https://master.bloom.cpp.al
https://redd.it/1kyfjda
@r_cpp
easiest than iostream
I am a beginner program of c++ please, PLEASE ANY ONE HAVE A LIBRARY EASIEST THAN IOSTREAM
https://redd.it/1ky6mg4
@r_cpp
Boost.OpenMethod by Jean-Louis Leroy has been accepted!
Virtual and multiple dispatch of functions defined out of the target classes. Thanks to Review Manager Dmitry Arkhipov.
Repo: https://github.com/jll63/Boost.OpenMethod/tree/master
Docs: https://jll63.github.io/Boost.OpenMethod/
https://redd.it/1kxq689
@r_cpp