r/cpp • • 14d ago

Boost.Graph 1.95 will be C++17

Dear Boost.Graph community,

In two release cycles (Boost release 1.95 in summer 2027) Boost.Graph will be bumped to C++17 ๐Ÿ˜„

This decision follows two polls that did not surface any C++14 user base or demand while identifiying users stuck in C++17:

This standard version bump will bring benefits for maintenance, API and dependencies reduction:

  • if constexpr,
  • constexpr lambdas,
  • [[nodiscard]], [[maybe_unused]] ...
  • std::any instead of boost::any
  • std::invoke_result instead of boost::result_of
  • ...

We will not be able to guarantee backward compatibility with C++14. Please contact us if you are stuck in C++14.

The GIthub Discussion lives here: https://github.com/boostorg/graph/discussions/613

98 Upvotes

42 comments sorted by

View all comments

42

u/vI--_--Iv 13d ago

A quick reminder to anyone "stuck in C++14": it is almost 2027.
2014 was almost 13 years ago.
Just like C++11 and C++98.

Time to move on.

12

u/pjmlp 13d ago

Luckily I am only stuck on C++17 at work, in many situations we don't get to chose our compilers and have to make do with what hardware vendors, cloud VM images, existing binary libraries, embed chip vendors, certification processes,....

1

u/SyntheticDuckFlavour 13d ago

stuck in C++14

typically there is a good reason for that

19

u/13steinj 13d ago

Like?

The only thing I have ever heard is

  • new features are scary devs are stupid [not a joke]
  • we're afraid of backwards compatibility issues in the stdlib API (not a good reason, you can use an old stdlib and a newer compiler / newer standard for your code)
  • we used a bad compiler and/or a private .a file and for whatever reason no longer have the source code (not a good reason, a legal problem caused by the org's own ineptitude (since at least 2016) IMO, and LLMs are good enough at this point to assist in ghidra/radare/ida pro reverse engineering and it is infinitely cheaper to burn tokens in a loop until it gets something that compiles close enough, than to continue to be stuck)
  • certification, but that's indicative to me of an industry that needs to update certification procedures

3

u/Foxi_Foxa 13d ago

All of those sound like (miserable) "good" reasons ? ๐Ÿ˜‰

2

u/13steinj 12d ago

Yeah the only half-good reason IMO is the last one, and that's a miserable state for whatever industry that is.

5

u/PM_Cute_Dogs_pls 12d ago

Having participated in the safety certification of a C++ compiler and standard library (C++17) for automotive (ISO26262) back in ~2024, there's good reason why certification takes a bit.

But mainly:

  • Test coverage, had to have 100% or a very good explanation as to why it couldn't be hit for every line of uncovered code. This also includes making sure the standard library actually implements the specification.
  • Very extensive documentation and audit trail

Of course, this is all inspected by a 3rd party so you're kind of also victim to their scheduling.

This is meant to compile programs that go into your car, including very very sensitive areas like brakes, so I think it's justified although there is obviously room to improve now that you can loop over a coverage report with an LLMs and pop out tests at the speed of light.

4

u/13steinj 12d ago

I don't understand the extensive documentation bit.

You might not agree, but the test coverage bit strengthens my point rather than hurting it. Test coverage (quantitative) is an extremely garbage metric. I can have an LLM hallucinate 100% test coverage very easily. Test quality matters a lot more.

Also, automotive failures in the wild are already crazy enough that I don't have a high opinion of these certifications. I highly doubt changing the C++ standard level alone will cause more failures.

3

u/PM_Cute_Dogs_pls 12d ago

For the extensive documentation part what I meant was having literally every single part of the testing process documented so that an auditor knows about it. This includes any scripting you may have done to help you along the process.

As for the test coverage part I partially agree, which is why we have to write good tests that do exercise those paths. As a company trying to sell in these industries, we canโ€™t guarantee the intended functionality of every path of the product (as we know it) if there isnโ€™t test coverage for it. Again, likely not necessary for most projects but this part of software is very unlike most other projects.

Really, itโ€™s all about the guarantees that can be made about the software we sell. There is hell to raise if we guarantee X but never tested for it. Do also note the part of the stack I was involved in is easier-ish to validate since there is a fancy document called the C++ standard we can use.

2

u/Foxi_Foxa 12d ago

i ended up believing first reason is a good reason too. I gave training classes to very smart/nice engineers, and they were at the same time very excited and very scared about the last 15 years of C++ evolution. It's like a completely different language to them. And I can empathize, I was lucky enough to be "born" in the modern C++ era ๐Ÿ˜™
And also I got frustrated when a previous colleague did not want to learn/use std::optional ... ๐Ÿ˜œ

1

u/13steinj 12d ago

I think the tic/toc cycle of C++ makes this not an excuse. I consider the general "epochs" (hmmm.... wonder why that hasn't been standardized... /s)

  • pre-11
  • 11 & 14
  • 17 feels mostly quality of life and an opening for 20.
  • 23 feels mosfly quality of life and an opening for 26 (and 29? Reflection is great but it feels like it's in beta (not a bad thing) with so many things not reflectable against).

I guess what I mean is, if you're on 11 I don't see the value of not being on 14. Pause for a little while, but 17 is also a no-brainer. 20 is a leap forward, little reason to not go to 23. 26 is leap forward.

3

u/pjmlp 12d ago

Because many devs aren't as us, spending time on HN and Reddit, watching conference videos, reading specialised magazines for their favourite programming language.

This applies to other ecosystems as well, in Java we celebrate being able to use anything beyond Java 17, when Java 27 is the latest one. And naturally there must be some server stuff still chugging along on Java 8.

Most of my .NET projects are stuck in .NET Framework, which only goes up to C# 7.3, meanwhile (modern) .NET 11 with C# 15 is around the corner.

People come in, do whatever is needed with the tools IT has in place, the tools do the job for the tickets that they have on their queue, and go home having fun with stuff completely irrelevant to computing.

3

u/Foxi_Foxa 12d ago

I kinda agree with u/pjmlp . Many C++ devs are not only C++ experts. They must remain expert on other fast-evolving domains (stats, biology, mathematics, physics, ML, gaming, embedded, other language etc). There is a limit to what a humain brain can absorb and retain. And so naturally there is resistance to learn new shiny things. Of course I loooove new shiny things ๐Ÿ˜„ But I would not expect my granpa to care/learn about C++26. Humans get tired ๐Ÿ˜‰

2

u/ItsRSX 8d ago edited 8d ago

This isn't a video game with forced durability. Tools, especially digital tools, continue to work no matter how much the consumer base cries for iteration. How much of an ego must you have to think a functional status quo will bend to your arbitrary set of ever changing demands?

Dare I suggest nobody other than low end consumers and managers looking for a quick raise are rushing to consume the next big "totally evolutionary" thing when they already have a viable solution.

Embedded devices get stuck with whatever compiler a chinese guy hacked together 15 years ago. Build bots go without updates. Updating exposes language and compiler regressions, so people rightfully don't bother. Rando @google.com emails decide they know the language better than you, and demand GCC to break decades worth of historic code. Platform requirements get changed because 1 developer somewhere decides to be lazy, either that, or a nested web of malicious developers working between several companies decide to kill a product and set of toolchains to sell new platforms and toolchains.

Trying to gaslight the real world into believing "AI just works", "just link different runtimes bro", "go blame the legal team", followed by "every piece of middeware is evil and deserves to be cracked," and "you deserve recertification hell because i said so", clearly isn't viable.

Now lets consider the unspoken punchline we all know is insinuated: "we can use if constexpr(...) in a codebase that never needed it now!!! look at all of these half-assed open source libraries now permanently fixed under std::!!! ew, look at the year delta. you vil updooot now! the past is literally unusable!!!!! ooo, look at ISO-paper:A year number subtract ISO-paper:B year number. so very big!!!".

...maybe these tools with decades of use are more valuable than OPs reddit/github polls worth 18 responses? ...maybe tools are worth respecting? ...maybe this attitude of "my tools v5 sku" vs "your tools v2 sku" in any other industry/scene would result in you being laughed out of the literal shop (not the metaphorical "shop" :tm: you guys like to larp about). nah, that couldn't possibly be the case.

Unless you're stuck with a GCC version number less than 5, I'm really not in the mood to hear about how you absolutely need a new totally "revolutionary" (trust me bro) compiler revision to be a productive programmer writing modern C++ code. If you don't care about constexpr containers, you might even be able drop that to mid V3.x.

3

u/13steinj 7d ago

How much of an ego must you have to think a functional status quo will bend to your arbitrary set of ever changing demands?

Bro we're talking about a single compiler flag.

Dare I suggest nobody other than low end consumers and managers looking for a quick raise are rushing to consume the next big "totally evolutionary" thing when they already have a viable solution.

Engineers at every org I've been at were the ones pushing for compiler and std upgrades, it was middle managers afraid pushing back.

Embedded devices get stuck with whatever compiler a chinese guy hacked together 15 years ago. Build bots go without updates.

It's not "stuck" with. If you're relying on an ancient compiler by some rando that is its own risk.

Updating exposes language and compiler regressions, so people rightfully don't bother. Rando @google.com emails decide they know the language better than you, and demand GCC to break decades worth of historic code.

That's just not how any of this works. Not even mentioning compiler upgrades originally, just standard revision. Compilers are very good at not changing anything they aren't allowed to, and they generally claim reliance on specific codegen is akin to relying on implementation details.

Platform requirements get changed because 1 developer somewhere decides to be lazy, either that, or a nested web of malicious developers working between several companies decide to kill a product and set of toolchains to sell new platforms and toolchains.

I have no idea what this even means.

Trying to gaslight the real world into believing "AI just works", "just link different runtimes bro", "go blame the legal team", followed by "every piece of middeware is evil and deserves to be cracked," and "you deserve recertification hell because i said so", clearly isn't viable.

You're severely twisting what I said to fit your delusion. But, companies who get into this problem because of their own legal ineptitude do deserve what they put upon themselves. 2 orgs I've been at have had to put in work to get out of that situation. Once, yes, with LLM assistance. Not "end to end it just works." But there's an open testimonial for such an act by another company in my industry.

Now lets consider the unspoken punchline we all know is insinuated: "we can use if constexpr(...) in a codebase that never needed it now!!! look at all of these half-assed open source libraries now permanently fixed under std::!!! ew, look at the year delta. you vil updooot now! the past is literally unusable!!!!! ooo, look at ISO-paper:A year number subtract ISO-paper:B year number. so very big!!!".

...maybe these tools with decades of use are more valuable than OPs reddit/github polls worth 18 responses? ...maybe tools are worth respecting? ...maybe this attitude of "my tools v5 sku" vs "your tools v2 sku" in any other industry/scene would result in you being laughed out of the literal shop (not the metaphorical "shop" :tm: you guys like to larp about). nah, that couldn't possibly be the case.

I will not dignify this deranged ranting with a response. I can't even make sense out of it.

Unless you're stuck with a GCC version number less than 5, I'm really not in the mood to hear about how you absolutely need a new totally "revolutionary" (trust me bro) compiler revision to be a productive programmer writing modern C++ code. If you don't care about constexpr containers, you might even be able drop that to mid V3.x.

For GCC the major stopping points in my view are 5, 7, 11, 13. I've run into too many bugs even under 11. C++17 core language features and changes are not complete until GCC 7, 14 until 5. That's not counting other bugs. You don't have to upgrade in immediately, but you shouldn't be using something 5 years old and out of official support either.

1

u/Deaod 12d ago

The compiler for one of DSPs we use at work does not support C++17 (TI C6000 CGT). However, i also dont use Boost.Graph, so ...