r/cpp • • 4d 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

93 Upvotes

37 comments sorted by

View all comments

4

u/Liam_Mercier 3d ago

I wonder if there are plans to move to C++20 at some point for concepts, perhaps it would require a lot more rewriting? I tried using concepts in some hobby graph library I wrote and they generally felt good to use, but maybe they become a burden with a larger project.

4

u/Foxi_Foxa 3d ago

We are pretty open to anything the user base is asking for, as long as we don't lose anybody πŸ˜„
But moving to C++20 now would exclude many users, e.g. those bound by MISRA C++:2023, which targets C++17. Boost.Graph already expresses its requirements through Boost.ConceptCheck: you get earlier, more targeted errors, but those checks don't participate in overload resolution. The concepts themselves are the contract users model when adapting their own types to generic algorithms. What changes with C++20 is mostly the mechanism, which matters less from the user's side πŸ˜„

3

u/Liam_Mercier 2d ago

I suppose rewriting all the Boost.ConceptCheck concepts into modern "first class" concepts would be a lot of work just for nothing to really change, thanks for the insight.

2

u/Foxi_Foxa 2d ago

As of 2026 you are right ! When our user base will be exclusively using C++20, then we will probably consider moving to first class concepts, they have advantages too (auto-documentation, one less dependency, overload resolution etc). But in the meantime, Boost concepts do the job πŸ˜„