C++ - Reddit
222 subscribers
48 photos
8 videos
24.7K 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
option, as per https://aka.ms/msvc/preview

To install an older in-support release, you need to run the Visual Studio installer, switch to the 'Individual Components' tab, and find the 14.5* toolset to install. If you are on the Insiders channel, only had the default MSVC toolset chosen, and recently upgraded, you'll see that your 14.50 toolset was replaced with 14.51... add it back in the 'Individual Components' tab.

# Why are we doing this?

The biggest benefit of the new model is to vastly shorten the distance between MSVC features and folks using them in a Preview. Folks on the MSVC development team can make a change which ships in the next week or so. This timeframe used to be months, but has now shortened to just a week. Not all C++ users want this, so MSVC Previews are an optional installation component.

Most of the other reasons are called out in https://aka.ms/msvc/lifecycle:

The MSVC team is leaning into the Visual Studio release cadence
We are aligning our long-term-servicing releases with those of .NET
Servicing 10+ year old compilers has become increasingly complex.

# tl;dr, and what should folks do?

If you want the bleeding edge tools, stay on the Visual Studio Insiders channel and install the 'MSVC Build Tools for <arch> (Preview)' option. Please give us feedback by reporting bugs on https://developercommunity.visualstudio.com/ or through the Visual Studio IDE itself.
If you want stable tools that only update every 6 months, stick with the Visual Studio Stable channel, and use the default C++ tools.
Want to get a head start on the every-6-months update? Look for our release candidate blog posts (https://devblogs.microsoft.com/cppblog/msvc-build-tools-version-14-51-release-candidate-now-available/), and use Visual Studio Insiders with the default C++ options.

Thanks for reading.

https://redd.it/1smfgdu
@r_cpp
boost::container::hub review starts today (April 16 - April 26)

Announced officially [in the Boost developer mailing list](https://lists.boost.org/archives/list/[email protected]/thread/6ER3ZA4VMVKB57DDEXKO26UVYBP7I3QP/):

**Introduction**

The formal review of Joaquín M López Muñoz's boost::container::hub container, for inclusion in the Boost.Container library, starts today.

"hub" is a sequence container with O(1) insertion and erasure and element stability [with great performance (see these benchmarks)](https://github.com/joaquintides/hub/blob/develop/README.md#performance): pointers/iterators to an element remain valid as long as the element is not erased. hub is very similar but not entirely equivalent to C++26 std::hive (hence the different naming, [consult the section "Comparison with std::hive" for details)](https://github.com/joaquintides/hub/blob/develop/README.md#comparison-with-stdhive).

It may be downloaded from:

[https://github.com/joaquintides/hub](https://github.com/joaquintides/hub)

the documentation may be found here:

[https://github.com/joaquintides/hub/blob/develop/README.md](https://github.com/joaquintides/hub/blob/develop/README.md)

Anyone is welcome to post a review and/or take part in subsequent discussions in the mailing list.

**Review guidelines**

Please provide feedback on the following general topics:

* What is your evaluation of the design?
* What is your evaluation of the implementation?
* What is your evaluation of the documentation?
* What is your evaluation of the potential usefulness of the library? Do you already use it in industry?
* Did you try to use the library? With which compiler(s)? Did you have any problems?
* How much effort did you put into your evaluation? A glance? A quick reading? In-depth study?
* Are you knowledgeable about the problem domain?

Ensure to explicitly include with your review: ACCEPT, REJECT, or CONDITIONAL ACCEPT (with acceptance conditions).

Ion Gaztañaga (Review Manager)

https://redd.it/1smx361
@r_cpp
Special meetup with Bjarne Stroustrup in Florence

Hi everyone!

I am organizing a special meetup with Bjarne Stroustrup in Florence on Saturday, May 9!

Schedule:

09:30 – Doors open
10:00 – Welcome message
10:15 – Technical session: “Concept-based Generic Programming”
11:45 – Short break
12:00 – Live AMA with Bjarne Stroustrup
13:00 – Closing

The event will take place at the University of Florence (Novoli Campus) and is organized by the Italian C++ Community, the University of Florence, and the University of Pisa.

For developers traveling from abroad, this is also a great excuse to visit Florence, while connecting with the Italian C++ community.

Free registration and details:
https://italiancpp-fi26.eventbrite.it/

Looking forward to seeing you there!



https://redd.it/1sn2g4d
@r_cpp
Achieving 56.5 ns cross-language IPC latency: Defeating false sharing and bypassing the kernel.

Hi,

I recently open-sourced Tachyon, a low-latency shared-memory IPC library I’ve been working on. The goal was to reach RAM-speed communication between processes (C++, Rust, Python, etc.) without any serialization overhead or kernel involvement on the hot path.

I managed to hit a p50 round-trip time of 56.5 ns (for 32-byte payloads) and a throughput of \~13M RTT/sec on an i7-12650H, which is about 150x faster than ZeroMQ inproc.

Here are a few architectural choices I made to achieve this, which I thought might interest this sub:

Strict SPSC & No CAS: I went with a strict Single-Producer Single-Consumer topology. There are no compare-and-swap loops on the hot path. acquire_tx and acquire_rx are just a load, a mask, and a branch using memory_order_acquire/release.

Hardware Sympathy: Every control structure (message headers, atomic indices) is padded to 64-byte or 128-byte boundaries. False sharing between the producer and consumer cache lines is structurally impossible.

Hybrid Wait Strategy: The consumer spins for a bounded threshold (cpu_relax()), then sleeps via SYS_futex (Linux) or __ulock_wait (macOS).

Zero-Copy: The hot path is entirely in the memfd shared memory segment after an initial Unix Domain Socket handshake.

The core is C++23 (compiled with GCC 14+/Clang 17+), and it currently has bindings for 6 other languages.

Repository: https://github.com/riyaneel/Tachyon

I’d love to get some feedback from the C++ community on the architecture, especially regarding the memory model implementation and the hybrid futex spin-wait strategy.

Thanks!

https://redd.it/1sn8a1y
@r_cpp
GUI toolkit Slint 1.16 released with keyboard shortcuts, Markdown rendering, and multi-touch pinch and rotate
https://slint.dev/blog/slint-1.16-released

https://redd.it/1snc6ow
@r_cpp
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
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
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
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
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
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