Skip to content

remove BOOST_GRAPH_EVENT_STUB - #573

Open
Becheler wants to merge 1 commit into
boostorg:developfrom
Becheler:refactor/remove-event-stub
Open

remove BOOST_GRAPH_EVENT_STUB#573
Becheler wants to merge 1 commit into
boostorg:developfrom
Becheler:refactor/remove-event-stub

Conversation

@Becheler

@Becheler Becheler commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

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

Remove BOOST_GRAPH_EVENT_STUB utility.

Motivation

BOOST_GRAPH_EVENT_STUB generates fluent do_on_xxx() builder methods on bfs_visitor, dfs_visitor and mas_visitor. Douglas Gregor added it during his postdoc in 2003 (SVN r18853) as a pre-lambda way to attach a bare function object to an event point. The problem it solved no longer exists, the feature was never adopted, and it now stands in the way of the namespace migration:

  • Untested, undocumented, no usage example for 23 years.
  • No known users. None of the 22 generated names, nor the macro itself are surfaced by web searches or main github users (CGAL etc)
  • Obsolete by design: it was designed in a pre-lambda C++03 world.

This is also how the issue surfaced: while moving visitor classes from namespace boost to boost::graph in maximum_adjacency_search.hpp, the macro's unqualified detail::functor_to_visitor lookup started resolving into boost::graph::detail (declared in 20+ BGL headers since 2005) instead of boost::detail, failing with error: 'functor_to_visitor' is not a member of 'boost::graph::detail'. The macro could be fixed by fully qualifying the name, but that would mean patching and then maintaining an API that has had no documented user in 22 years. Deleting it is much cheaper/healthier.

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 Aug 27, 2026
@Becheler Becheler added the technical debt Code that works but needs refactoring, cleanup, or modernization. Not user-facing. label Aug 27, 2026
@Becheler Becheler added the visitor Type of issue related to visitors label Aug 27, 2026
@github-actions

Copy link
Copy Markdown

Boost dependency footprint vs develop (auto-generated).
PR run 33028175303 vs develop run 33005161720 (6170491b19).

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

No header-inclusion-weight changes.

Transitive Boost modules: 66 → 66 (0)

@Becheler Becheler changed the title remove event stubs remove BOOST_GRAPH_EVENT_STUB Aug 27, 2026
@github-actions

Copy link
Copy Markdown

Compiler-warning counts vs develop (auto-generated).
PR run 33028175333 vs develop run 33005161740 (6170491b19).

Job Baseline After Delta
macos (clang, 14) 647 647 0
macos (clang, 17) 610 610 0
macos (clang, 20) 610 610 0
ubuntu (clang-19, 14) 647 647 0
ubuntu (clang-19, 17) 610 610 0
ubuntu (clang-19, 20) 610 610 0
ubuntu (clang-19, 23) 610 610 0
ubuntu (gcc-14, 14) 795 795 0
ubuntu (gcc-14, 17) 931 931 0
ubuntu (gcc-14, 20) 931 931 0
ubuntu (gcc-14, 23) 931 931 0
windows_msvc_14_3 (msvc-14.3) 952 952 0

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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. visitor Type of issue related to visitors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant