Skip to content

refactor: remove dependency on boost.tti using detector idiom#531

Open
Becheler wants to merge 1 commit into
boostorg:developfrom
Becheler:refactor/drop-tti-dependency
Open

refactor: remove dependency on boost.tti using detector idiom#531
Becheler wants to merge 1 commit into
boostorg:developfrom
Becheler:refactor/drop-tti-dependency

Conversation

@Becheler

Copy link
Copy Markdown
Collaborator

Remove dependency to Boost.TTI. Use void_t detector idiom instead.

Before submitting

  • This PR targets the develop branch.
  • I searched for an existing PR or issue covering the same change.
  • My contribution is licensed under the Boost Software License 1.0.

Type of change

  • Bug fix
  • New feature or API addition
  • Refactor (no behavior change)
  • Documentation
  • Build, CI, or tooling
  • Other (specify below)

Does this PR introduce a breaking change?

  • Yes (describe migration impact below)
  • No

What this PR does

Removes Boost.Graph's dependency on Boost.TTI (and the last MPL use in DFS).

  • depth_first_search.hpp: replaced the BOOST_TTI_HAS_MEMBER_FUNCTION(finish_edge) detector and its __GNUC__/clang/intel #if fork with a void_t expression-SFINAE detector, has_finish_edge<Vis, E, G>, that checks whether vis.finish_edge(e, g) is a valid call. D
  • dropped #include <boost/tti/has_member_function.hpp>
  • added <boost/type_traits/make_void.hpp> and <type_traits>.
  • This also removes the mpl::vector<E, const G&> that only existed to feed TTI's signature, so the file is now MPL-free as well.
  • build.jam: dropped /boost/tti//boost_tti.
  • CMakeLists.txt: dropped Boost::tti.

All changes in boost::detail, detection is identical for void finish_edge(Edge, const Graph&) visitors, and the check now works uniformly on C++14 compilers.

Motivation

It's not worth pulling a Boost dependency anymore now that the sfinae + detector idiom are available in C++14.

Testing

Checklist

  • Existing tests pass (b2 in the test/ directory).
  • New behavior is covered by a test, or this is a docs / build / refactor change.
  • Documentation was updated if user-facing behavior changed.
  • No new compiler warnings on the platforms I built against.

@Becheler Becheler self-assigned this Jul 17, 2026
@Becheler Becheler added the technical debt Code that works but needs refactoring, cleanup, or modernization. Not user-facing. label Jul 17, 2026
@github-actions

Copy link
Copy Markdown

Compiler-warning counts vs develop (auto-generated).
PR run 29568558245 vs develop run 29503421610 (b3cb64738b).

Job Baseline After Delta
macos (clang, 14) 4 4 0
macos (clang, 17) 4 4 0
macos (clang, 20) 4 4 0
ubuntu (clang-19, 14) 4 4 0
ubuntu (clang-19, 17) 4 4 0
ubuntu (clang-19, 20) 4 4 0
ubuntu (clang-19, 23) 4 4 0
ubuntu (gcc-14, 14) 10 10 0
ubuntu (gcc-14, 17) 10 10 0
ubuntu (gcc-14, 20) 10 10 0
ubuntu (gcc-14, 23) 10 10 0
windows_msvc_14_3 (msvc-14.3) 971 971 0

@github-actions

Copy link
Copy Markdown

Boost dependency footprint vs develop (auto-generated).
PR run 29568558172 vs develop run 29503421582 (b3cb64738b).

Header-inclusion weights (graph files pulling each direct dependency in):

Dependency develop PR Δ
tti 1 0 -1
type_traits 40 41 +1

Transitive Boost modules: 69 → 68 (-1)

  • removed: tti

@Becheler
Becheler marked this pull request as ready for review July 17, 2026 11:05
@Becheler
Becheler requested a review from jeremy-murphy as a code owner July 17, 2026 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

technical debt Code that works but needs refactoring, cleanup, or modernization. Not user-facing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant