Algorithms + Data Structures = Programs - Episode 280: C++26 Big Ticket Items, GCC vs Clang & More
Episode Date: April 3, 2026In this episode, Conor and Ben chat about major features shipping in C++26, GCC vs Clang and more!Link to Episode 280 on WebsiteDiscuss this episode, leave a comment, or ask a question (on GitHub)Soci...alsADSP: The Podcast: TwitterConor Hoekstra: LinkTree / BioBen Deane: Twitter | BlueSkyShow NotesDate Recorded: 2026-03-30Date Released: 2026-04-03ISO C++ Standards Committee Panel Discussion 2025 - Hosted by Herb Sutter - CppCon 2025Kate Gregory - It's Complicated - Meeting C++ 2017 Keynotemp-unitsSI - International System of UnitsIterators and Ranges: Comparing C++ to D to Rust - Barry Revzin - [CppNow 2021]Practical Reflection With C++26 - Barry Revzin - CppCon 2025Using the C++ Sender/Receiver Framework: Implement Control Flow for Async Processing - Steve DowneyC++Now 2024 - Embedded Asynchronous Abstraction C++ - Implementing Senders & Receivers Without an OS - Ben DeaneKeynote: Employing Senders & Receivers to Tame Concurrency in C++ Embedded Systems - Michael CaisseIntro Song InfoMiss You by Sarah Jansen https://soundcloud.com/sarahjansenmusicCreative Commons — Attribution 3.0 Unported — CC BY 3.0Free Download / Stream: http://bit.ly/l-miss-youMusic promoted by Audio Library https://youtu.be/iYYxnasvfx8
Transcript
Discussion (0)
contracts, stood execution, reflection, but from my point of view, those three things stand
out as the big ticket items.
Whichever features of C++ are supported by the compiler I'm currently using at work.
And if you're using Clang or one of the versions of Clang, Clang actually does a lot of backporting
of later C++ features to earlier C++ versions.
Welcome to ADSP, the podcast, episode 280, recorded on March 30th, 20206.
My name is Connor, and today with my co-host, Ben, we chat about the big features shipping in C++26, GCC versus Klang, and more.
All right, we're back.
And how's it going?
I mean, we were just chatting for 30 minutes, but we can pretend that we're doing this fresh.
Spring is here, although we never really had a proper winter here in Denver.
It's been very warm.
You didn't have a...
Everywhere else in, like,
northeastern America was blizzarding for months, no?
Well, not there in Denver.
We had a couple...
We had a few inches of snow a couple of times,
but no, I mean, it's 25 degrees out.
Wow.
Celsius.
Wow.
Are you kidding me?
That makes me very sad.
I mean...
Yeah, or even more.
Yeah.
All right.
Some days.
The running community in Denver must be thrilled
because there's a lot of professional runners
that live in the area there because of the altitude.
Yeah, there's a lot of trail running.
I don't know how it is up in the mountains.
I mean, the mountains have had snow.
It hasn't been super cold, though, so maybe it's been more wet.
I'm not sure.
Interesting.
All right, well, hopefully that weather will make its way up to Canada and Toronto in the future
because we had a brutal, just brutal winter.
The worst winner, maybe since I've been in Toronto.
Okay.
Yeah, yeah.
It was minus.
I think we talked about that last time.
Yeah, it was snowy out last time, I think.
And it was like minus, what are we going to say, minus 15, minus 20, something.
Yeah, I mean, there was a couple week period where the highest it got was minus 7 Celsius.
But most of the time it was, yeah, minus 15, minus 20.
But yeah, today, today there's no, I mean, I can see a tiny little bit of snow on my neighbor's lawn.
But I was out in the backyard raking leaves this morning because,
It's supposed to rain later and I'm hoping the rain will make the grass start to grow.
I don't really know how it works, but I think the grass needs water.
And so hopefully this is the end, no more snow.
And I guess spring, when does spring start?
A couple weeks ago.
The spring equinox was March 21st.
Okay, so that's what.
Whether you say that's when spring starts, I think depends.
Right.
We could say that.
Yeah, spring equinox is, well, the moment of equinox, I don't know,
It might have been, sometimes it's the 20th, but it's the 21st, more or less.
The Catholic Church defines it as 21st of March, no matter when, no matter where the sun is.
For the purposes of calculating Easter, that's the definition of Easter.
Yes, which is around the corner now.
Good Friday coming up.
Which I had forgot was a holiday.
Is it a holiday in the States?
In general, no.
Although, if you work in finance, the New York Stock Exchange is closed, that.
day, so it generally is.
Interesting.
But for most people, I think, no.
Interesting.
So it depends.
Depends on the country.
Which I guess makes sense.
Anyways, what are we chatting about today?
I mean, I sent a couple topics, but I also said, if you've got stuff you want to chat about.
Yeah, I don't know.
I don't know why I have.
I don't really have much.
Since we last talk, I've just been working, doing the normal grind.
I don't know that I've been geeking out on algorithms, data structures, and programs
very much.
Yeah.
Have you,
I don't really follow it
too closely anymore.
Do you,
because I know that
the one of the C++ ISO meetings,
I think it was being held
Oh yeah.
Outside of London.
It was in Croydon.
Croydon, yeah.
This last week.
Have you,
do you pay attention to the papers
or anything like that?
I always skim over the papers
when they,
when they go out in the monthly mailings.
It's been fairly quiet lately
because all the push has been Zipluplus 26,
and everything for C++ plus 26 has been,
has been pretty much designed for a year or more now.
And so the last few mailings haven't been much new and exciting
as much as just little bits here and there.
But now that I think C++ plus 26 is done,
just awaiting final approval from the national bodies, I think.
And I think C++ plus 29 will start to see new and exciting things destined for C++ plus 29 there.
Okay.
I mean, I knew that C++ plus 26 had kind of, I was one of the two, one or two previous meetings.
That was the one where they were like finalizing.
It was the last moment to kind of ship things in.
And so now they're in the ironing out the bugs and whatnot.
Yeah.
Yeah.
So it has, it has contracts.
It has stood execution.
So contracts actually ended.
So contracts actually ended up making, I heard there was a bunch of kerfuffle.
Contracts are officially in the draft.
At this point, I think we're past the point where they can be taken out, at least.
If C++ plus 26 were to have sustained national body voting against it or enough national bodies voting against it,
that it basically C++ plus 26 wouldn't ship.
it's not the case that votes can now take contracts out of C++26.
It's just the case that votes can, in theory, prevent C++26 from shipping.
I see.
But I don't think that's probably going to happen.
Firstly, because there are a lot more national bodies these days than they used to be.
Like back in the day, the number of national bodies in the C++ plus I-side process was less than 10.
and now it's, I don't know, it's 20 something, right?
So in order to block C-Clubs off 26, I think you'd have to have more than a third no votes, right?
And that seems unlikely at this point.
Okay, yeah, that makes sense.
And I guess the reason I thought that there was kerfuffle, I mean, there was, but it was actually kerfuffle from the quote-unquote past because I watched in the last couple weeks, or maybe it was a month ago, the panel, the eye,
ISO committee panel from CPPON, which happened back in September, but only got released
in the last, whatever, whenever I watched it, within the last month, we'll say.
And there was quite a bit of back and forth between panel members of, you know, contracts
this and contracts that.
Yeah, there are definitely folks who have had sustained opposition to contracts for
various reasons.
There have been papers that argued for and against.
procedurally, I think, you know, what happened was what was meant to happen, which is that
the national body comments got addressed.
That doesn't necessarily mean that everything got, quote, fixed to make everyone happy and
everything sunshine and roses, but it means what it means.
There is a procedure for addressing these things.
Not that I'm any expert, by the way.
You should not be listening to me for an expert on these things.
But from what I've heard, you know, the procedure played out as the ISO procedure does.
And now, now here we are.
Yeah.
And C++26, I would expect to receive enough national body approvals to become the next ISO standard.
Yeah, as it always does.
I mean, it would be very surprising if it didn't.
But yes, I interrupted you.
So you started enumerating C++26 thing.
And then I said, wait, contracts.
That got in?
And then I think you had mentioned stood execution.
And then that's when I interrupted you.
Reflection.
Reflection.
Yeah, I was trying to think through the big ticket items.
And I think contracts stood execution, reflection.
There's a bunch of other things, of course.
But from my point of view, those three things stand out as the big ticket items.
Are you in the Jason Turner camp of waiting until these things show up actually to be used before you start taking them for a spin?
or are you on the compiler, explorer, forks of clang
where it's got some pre-implemented version
and you've played with reflection already?
Generally, I haven't really played with reflection.
So I'm more forward-looking than Jason.
Well, Jason, you know, is a trainer.
He has to deal with.
He has to be very precise about knowing the differences
between all the versions of C++.
Because, you know, he'll go to a place and train them
and they're able only to use C++ plus 20 and not yet C++ plus 23, for instance.
So he has situations like that.
So I guess I'm a little more fast and loose.
I tend to use not, my usages tend to be not driven by a standard version,
but by what the compiler I use supports.
Right.
So it's not the case that I'm on C++ plus 20 or I'm on C++ plus 23.
No, I'm on whichever features of C++ plus are supported by,
the compiler I'm currently using at work.
And if you're using Clang, or one of the versions of Clang,
Clang actually does a lot of backporting of later C++ features to earlier C++ versions,
because they take the view that if the compiler supports it, we'll put it under a feature
macro, and it'll be available.
even if you say you want C++ plus 20,
if the compiler supports the feature of, let's say,
destructuring a pack.
What was it?
Destructuring, yeah, structure blindings can introduce a pack,
is the one I'm thinking of, right?
That feature exists in the latest versions of Clang.
They will quite happily compile code that uses that feature,
even if you ask for C++20.
So, you know, as a library author, I sort of find myself,
always in this sort of halfway
house between standard
versions, particularly
supporting Clang, I am anyway. With GCC
I think they take a different
view, which is like, if you ask for C++
20, that's what you get.
That feature, although it exists, although the
compiler can support it, if you ask for a later version,
if you ask for 20, you're not getting it.
Whereas Clang does
the more granular feature
backporting. Yeah, it's really interesting.
And so the
newer features, are they all
behind a feature macro or sometimes are they just there?
Since C++20, the newer features have tended to be put behind feature macros.
Which is, you know, I, again, as a library writer, I tend to try to,
I use those where they are useful sometimes, but I don't like to litter the code with if-defs.
You know, you don't really want that either.
They're an eyesore, if you can avoid them.
It makes it difficult.
It can make it difficult.
But sometimes the features are useful enough that in a particular situation you want to say,
oh, actually, if this feature is available, it's going to be easier.
It's going to make this code easy to understand and probably faster to compile.
Yeah, it's been a while since I was in a heavy C++ code base,
but one of the first companies I worked for, or the first company I worked for out of school,
arguably abused the feature and they had a ton of different what they called modules without
giving away too much whatever insider info and so you would you would have constantly these
you know if ding ding ding and it would be or or or and i remember i'm trying to design a bunch
of stuff where you would kind of hide the module specific stuff and some function below and so i could
just write generic code at a level without because you'd hit some pieces of the code
where it would be brutal.
You'd have like interleaved macros, like future macros and and like if statements.
And so like you'd have if, but then inside the block of the if, you'd have the different
macros because you'd have different settings.
Oh, wow.
And it was, it could very quickly get unwieldly, if that's the correct word.
Anyways, yeah.
But I mean, used in judiciously, they can be very useful.
Yeah.
Yeah.
I guess you could say that about a lot of language features, though.
you know, if you use it prudently and it's great, but you can always abuse some language feature.
Yes, maybe especially when it comes to C++.
Yeah.
And, you know, C++ is famous for being a large language and having dark corners
and everyone using a sort of slightly different subset of that language according to policy.
Yeah.
But, you know, like Kate said, it's complicated.
Did you see that talk of hers?
It's from now it's from pre-pandemic.
So it's old now, I guess.
But she said in that talk, yeah, it's complicated.
You do have to know how your language works.
And in the sense, there is no royal road to knowing C++.
You just, you'd have to know the language.
Yeah.
And the libraries.
Yeah, I can't remember who said it, but I mean, I'm sure several people have.
But there's essentially like seven different languages within
C++.
Oh, yeah, in terms of like, cheering
completeness.
I'm like, maybe we're up to seven now.
Yeah.
But yes.
Plus or minus.
And I can't remember what podcast I was listening to recently.
It might have been the Haskell podcast or the Haskell something.
And they were talking about touring complete languages and like the type system and how
that's just like a terrible idea.
And yes, they're like, they didn't refer to C++ by name, but they said like the fact
that it exists and you can do powerful things with it does not make it like a good thing. And there
are better alternatives where you aren't, you know, computing factorials at compile time in this
kind of...
Sure.
Anyways. And they didn't mention C++ and I was like, I know what language you're talking about.
I kind of agree, but also, you know, as a professional C++ library writer, that stuff is really
useful, but I sort of agree
in a platonic sense, you know,
if you have, if your language
is cheering complete, you know, and I
gave a lightly talk about this, what you're saying
is, it's fine for my
language to have footguns, right?
Infinite recursion. Chearing completeness means
effectively infinite recursion
is okay.
You know, you get, one of the ways you get
your incompleteness is through
self-reference, right?
And so that opens the door to
infinite loops, infinite recurrence,
infinite recursion, et cetera.
Whereas if you have a type system which cannot express that kind of self-reference,
you still have a nice structural type system.
You still can do iteration, recursion.
You just can't make it unbounded.
So you get some kind of guarantees.
Right.
I'm of two minds about it.
I won't remember his name, but when I was in California,
I was at a meetup and there was a guy working at Facebook or meta,
I guess now. At the time, I think it was Facebook.
And he said when he codes on his own, he codes in C++, because he doesn't have to worry about other people because he knows what he's doing.
But he's like, as a manager of a team, I prefer Rust because I can sleep better at night.
And there's less for me to worry about.
He's like, I still prefer personally C++ because I have more freedom and I trust myself.
But when I'm managing a team, I would prefer the language that comes with more guardrails.
It doesn't mean I'm going to sleep perfectly at night.
I still have stuff to worry about.
But out of the box, it's, I think, for a team that consists of newer programmers and some, I'm sure, more experienced.
But that's always stuck with me of him saying that he actually prefers C++, but not as a manager.
Right.
C++ 26 and 29, I haven't heard anything about 29.
Have you heard any?
The only thing I've heard was recently, Theus, hosting about the possibility.
of targeting the Units Library for Zepla plus 29.
Okay.
That's the amalgamation.
I know they put together like they united all the different factions of unit libraries
and tried to bring them together to have one.
It is a surprisingly complex space.
There are many, many use cases.
And most people have some idea about what they think a Units Library needs
support, but I think for most people, certainly for me, you know, actually finding out about
metrology, I think it is. I've never heard of that. It's the science of measurement, right?
So there's all kinds of use cases that, you know, aren't obvious unless you start looking
into these things. And yeah, the MP Units Library supports a lot of things, a lot of things.
Yeah, I remember
I remember when I went to committee meetings
Seeing him present a few times
And yeah, it's surprisingly deep space
That is like an iceberg that
Yes
You see a couple examples
And you're like, oh yeah, I get what that's for
And then you see the iceberg that's underneath
And there's a whole
I can't remember if it's SIs
Or there's like there's some like ISO community
Or some body of that is deemed seven different things
As like standard whatever
Oh yeah
the standard
the S-I-units system
and down the
it's the
yeah and
so you
you learned this in high school physics
right I don't know
I only took physics
this is like the kilogram
the meter
the second
the amp
I think is in there
those those are
the base
yeah the base units
which are
the amp is the strange
one you think
it's strange
because it's
two lumps per second
right
you think
you might think
that charge
is the basic quantity, and so Qon would be the basic unit.
But in the SI, it's actually the M.
You've retained more from physics than I did, that's for sure.
Okay, so that's C++.
I mean, I feel like at some point we should bring someone who's still attending meetings.
I know Barry is the most prolific author of papers and doing things that's been interviewed in the past.
and Barry's certainly given good talks about reflection.
Has he?
I actually don't, the last Barry Revzen talk I've seen, I want to say was the like
Ranges comparison one because he doesn't speak often.
I think that actually was like the first talk that I've seen him give.
He's been speaking more these last few years.
I think he certainly gave a reflection talk which was very good at CPPCon.
I think he recently repeated that talk or updated that talk for the Chicago meetup,
and he's giving the opening keynote of C++ now, which is also about reflection, I believe.
Okay, well, so yeah, I've Googled, I've YouTube, Barry Revzen, and the top two talks are the one that I mentioned, iterators and ranges, which compare C++ to D to Rust.
And inside of it, he also mentions Java and Python.
Right.
He gave that a couple times, but the top one got posted one month ago.
So there you go, YouTube.
Sometimes you do well.
Sometimes you do poorly.
You did not recommend Barry's talk to me.
And it's called Practical Reflection with C++-26.
So we will link it in the show notes.
And I will put it on my list of talks to watch.
That's the problem.
I always whine about how they've now trying to pander to the algorithm.
So they bleed these things out for so long.
And I used to just like, they used to just drop them all at once.
and I would go and pick,
create my own little playlist
and then I'd watch them all like back to back to back.
But now whenever we mention these,
half the time I go and add it to the show notes
and then it has to be unlinked.
It's not,
it's not out yet.
But I will go and update that.
All right.
So that's like a mini C++ plus 26, 29.
I mean,
are there other things?
Like, those are the three that you've mentioned,
but.
Well,
reflection is the big ticket item that most people are waiting for.
I heard that one of the,
the compilers had implemented already.
That's right.
Sorry, the GCC has the first implementation already emerged.
Yeah, yeah.
For about a month or so now, I think.
So I guess it sounded like you were using Klang because...
The Klang reflection fork has been on Compiler Explorer for a while now.
And so when you see, oftentimes when you see examples, there'll be links using that.
Okay.
And so you're, I guess, just waiting for that.
to be? Well, I won't be using reflection for a while yet in my day job. It is exciting.
But what I'm far more excited about in the sense of being able to use it now and having been
using it for the last couple of years is senders and receivers, which is not admittedly the
standard version, but, you know, my implementation. And are you going to, are there is there going to be
some big change that's going to switch when that's available to you? Because I know,
that you have your implementation, are you going to be able to, like, merge the two somehow, or?
Well, so I don't think that is, so that's not beyond the realm of possibility, but I don't think
it's maybe going to be worth it for a while because, you know, my implementation targets
their metal microcontrollers, targets zero exception, zero allocation environments.
Now, the standard version is fairly zero, pretty much zero allocation, if you want.
want that. But zero exception is the standard version obviously plays nicely with exceptions.
And whether or not you think exceptions are, you know, well performing or whatever, the fact is,
they just, a lot of bare metal, particularly bare metal things, just do not use exceptions right now.
But you said, so it's not, wouldn't be worth it now? Would there be something that occurs in the
future that would make it worth it? Or you're just saying for now and the future is untold?
The future is untold, but I'm thinking as far as like abandoning my implementation and switching entirely to the standard, probably that's a long way in the future.
Just because the way standardization works, it tends to be fairly conservative.
Like what's coming into the standard with C++ plus 26 is not the full set of algorithms, for example.
It's a good basis set, but there are some algorithms that aren't there.
and also there are ways in which my implementation has diverse from some of the standard ideas.
What's important to me is more that the ideas behind stood execution are sound.
And I've used those as inspiration.
And I've used, you know, some of the standard naming I've copied.
But in many ways, I'm living in a much simpler world than the standard needs to deal.
with. So that makes it
correspondingly easier. Well, I mean,
it's exciting nonetheless, and it's
always, there's always new talks
that are coming out. I mean, the reflection ones have
already been being given. And I guess actually the
senders and receivers one, there's a ton of
talks like that out there. There's quite a few
now from, I did,
I did one, Eric did some, Steve Downey.
He's done some, I think. So actually, I
guess maybe it's going to be the C++ plus 29.
Everyone's giving talks that are
targeting the
Michael Case, gave a
good talk at CPP con about asynchronous handling of special function registers, I think, was the title.
I'll go collect them.
I mean, half of those or more have already been linked in past episodes, but I will go collect them
and put them in the ones or in this episode.
And hopefully, they're all out by now.
I know the C++ now ones are all for sure and the ones that you've given.
CPP con.
And the CPP-con ones are starting to, or at least I think more than starting to.
Most of them are now public.
Although I haven't gone back and it'll be a today, later today exercise.
I'll go and check to see which links that aren't linked that can be linked and update that.
Be sure to check these show notes, either in your podcast app or at ADSP thepodcast.com
for links to anything we mentioned in today's episode, as well as a link to a GitHub discussion
where you can leave thoughts, comments, and questions.
Thanks for listening.
We hope you enjoyed and have a great day.
I am the anti-brace.
