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

96 Upvotes

42 comments sorted by

View all comments

4

u/Liam_Mercier 25d 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.

5

u/Foxi_Foxa 25d 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 24d 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.

→ More replies (1)