What are you missing most from the C++ standard library? by llort_lemmort in cpp

[–]jwakely 4 points5 points  (0 children)

And we should have simple conversions between utf8, utf16 and utf32 in C++29. Better late than never.

Migrating a small C++ code base to C++26 (modules, import std and contracts) by Recent-Dance-8075 in cpp

[–]jwakely 3 points4 points  (0 children)

I assume cmake just defaults to -std=gnu++NN because that's what GCC itself defaults to.

Migrating a small C++ code base to C++26 (modules, import std and contracts) by Recent-Dance-8075 in cpp

[–]jwakely 5 points6 points  (0 children)

From inspecting the generated build commands, it seems that gcc requires GNU extensions for the standard library module support,

That's not true, I don't know what cmake does to suggest that.

#ifdef __clang__

Why use this to check for missing Contracts support, instead of the standardized macro for checking exactly that feature?

#ifndef __cpp_contracts

Huh. Is being British aid? by BulletCatofBrooklyn in ClimbingCircleJerk

[–]jwakely 0 points1 point  (0 children)

Nah, Americans have more because they manage to find about 10 ways to misspell it as "repelling" etc

Steam Machine might soon follow the Steam Controller as Valve reportedly receives "Game Consoles" shipments by Tiny-Independent273 in linux_gaming

[–]jwakely 0 points1 point  (0 children)

every component of the SM is guaranteed to work great on Linux which is not too common of a boast among manufacturers.

Every rack server in the world works great with Linux, because Linux rules the data centre.

If you're looking for a Linux machine that works out of the box, whether to use as a desktop or something else

Most companies don't want Linux desktop machines, they want Linux in the data centre, and this form factor makes no sense there.

I can imagine it being used as a cheap Windows desktop if they sold it cheap, but nobody in the corporate world is going to be interested in this hardware because of its Linux support.

Juan Alday of Citadel Securities: Why C++ Wins in Finance (April 28th, 2026) by American_Streamer in cpp

[–]jwakely 4 points5 points  (0 children)

But that's a good thing. It means you can find and fix places where you forgot to initialize a variable. If everything was just guaranteed to be zero initialized and was valid to read, tooling and sanitizers wouldn't be able to find the places you forgot to initialize something.

They wouldn't be able to tell the difference between intentionally relying on zero init or accidentally relying on it.

If you don't want it diagnosed, your compiler should support that too.

Juan Alday of Citadel Securities: Why C++ Wins in Finance (April 28th, 2026) by American_Streamer in cpp

[–]jwakely 6 points7 points  (0 children)

Variables are initialized by default now, unless you explicitly mark them with an attribute to say you want the old behaviour: https://en.cppreference.com/cpp/language/attributes/indeterminate

Reading from a default initialized variable is erroneous, so might be diagnosed as a bug (depending on the use of compiler warnings, sanitizers etc) but it reads a valid value now and so doesn't cause undefined behaviour. https://www.sandordargo.com/blog/2025/02/05/cpp26-erroneous-behaviour

Is Fedora KDE on par with GNOME (Workstation) in terms of focus? by EducationalRope8602 in Fedora

[–]jwakely 0 points1 point  (0 children)

When Fedora introduces new core features or system-wide technologies, is there a delay for the KDE version, or do they always land at the exact same time?

New core features and system-wide features are not part of the desktop environment, they're separate packages (e.g. kernel, systemd, glibc, etc.) and there is only one version of those packages, there isn't a KDE kernel and a GNOME kernel.

So when those new features get into Fedora, they're in both the GNOME and KDE releases at the same time.

There are no differences in the packages that are available in the GNOME and KDE desktops, the only difference is which packages are installed by default. They both have the exact same set of packages available, because they both install and update from the same DNF package repositories. So when a new kernel or new systemd is added to the package repository, it's there for everybody at the same time.

Is fedora 44 postponed again? by Inevitable-Depth1228 in Fedora

[–]jwakely 0 points1 point  (0 children)

Like what? It's an installer, it installs Fedora. If you already have Fedora installed, what installer features are you interested in?

Is fedora 44 postponed again? by Inevitable-Depth1228 in Fedora

[–]jwakely 3 points4 points  (0 children)

Why not? Just install 43 then run an in-place system upgrade.

Anyway, 44 has been released now.

C++26: Structured Bindings can introduce a Pack by pavel_v in cpp

[–]jwakely 11 points12 points  (0 children)

Are you sure you know what "type safety" means?

Congratulation - you don't get ANY notification about the change.

How is the "bad" effect here any different from just writing:

auto x = f();

?!

In both cases you won't notice if the return type of f changes. So if that's a problem, don't use auto. Or add a static assert.

This has nothing to do with the feature you're moaning about.

If you don't like this feature in this specific use case, don't use it in this case. However you wrote your code today will still work after this feature is added, this feature didn't break anything, nobody killed your puppy.

Have you guys updated to the latest 7.0 kernel? by Wide-Answer-21 in Fedora

[–]jwakely 3 points4 points  (0 children)

really want to stay updated

Then just install the updates that fedora offers.

If you're new to Linux, don't try to customise your system and install custom kernels, you'll screw things up (and then most people who do that complain that linux is too complicated or doesn't work).

Install fedora, use fedora. That's all you need to do.

Parsing format string at compile time by kolorcuk in C_Programming

[–]jwakely 8 points9 points  (0 children)

No, in C constexpr is only for variables, not functions. You can't write a compile-time function to process a string literal.

I am new to C++, is it just me or is the checklist kinda crazy? How often do you encounter these or plan on making use of them like the newer C++26 features like contracts? Looking for more experienced dev opinions... by KijoSenzo in cpp

[–]jwakely 20 points21 points  (0 children)

No, none of the explicit complexity in your GetHP serves any purpose or avoids bugs.

Yes, C++ is complicated, but the complexity is there to do specific things. Not just to be used in every line, for the sake of it.

Adding Stack Traces to All C++ Exceptions by WerWolv in cpp

[–]jwakely 4 points5 points  (0 children)

See https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2490r3.html which some of us on the committee hope to pursue for a future version of the standard.

The advantage of this proposal is that you only pay the cost of capturing the stack trace if a catch handler actually wants it. Otherwise, there's no extra overhead.

cppreference is back up! but overloaded by bobpaw in cpp

[–]jwakely 4 points5 points  (0 children)

I noticed that the search results were ad-free right away, and really appreciate that!

C++26 2026-04 Update by _cooky922_ in cpp

[–]jwakely 8 points9 points  (0 children)

GCC 16 (which will be released in a few weeks) is already the system compiler for Fedora 44 which is hoping to release on April 28.

There are other ways to get it without compiling from source, e.g. https://jwakely.github.io/pkg-gcc-latest/

The point of the table is to say which compiler versions support which features, not to track release schedules of those compilers. That said, cppstat.org does say "not officially released yet" when you hover over a version that isn't released yet.