Skip to content

maintenance: mark gcc-118291 pass-self sites; drop obsolete #define filter in grep check#231

Merged
cameroncuster merged 2 commits into
devfrom
maintenance-notes
Jul 7, 2026
Merged

maintenance: mark gcc-118291 pass-self sites; drop obsolete #define filter in grep check#231
cameroncuster merged 2 commits into
devfrom
maintenance-notes

Conversation

@cameroncuster

Copy link
Copy Markdown
Member

Two small maintenance items from the post-C++23 review.

1. Mark the gcc-bug sites so the reverts don't get lost

The C++23 migration (#229) converted recursive lambdas to deducing this, but 7 tree headers had to keep the pass-self idiom because their lambdas live inside member functions/constructors and hit gcc bug 118291 (wrong code with deducing-this lambdas in member context, present in gcc 14/15). That decision only existed in commit messages; nothing in the code said why these 7 files differ from the other 15.

Added a one-line marker at each site:

// pass-self, not deducing this: gcc bug 118291
auto dfs = [&](auto&& dfs, int u) -> void {

Files: hld.hpp, lca_rmq.hpp, linear_lca.hpp, tree_lift.hpp, hagerup_kth_par.hpp, ladder_decomposition.hpp, linear_kth_par.hpp. When a fixed gcc reaches CI/judge, grep for 118291 to find everything to re-convert.

2. Drop the obsolete #define filter in the grep check

grep_clangformat_cppcheck.sh carried:

# TODO: remove this define filter if/when we move to -std=c++20
grep --invert-match --fixed-strings "#define" ... | grep ... ".begin()" ...

We're on C++23 and no #define in the tree contains .begin()-style member calls anymore (verified: the filtered and unfiltered greps both come up empty). Removed the filter and the stale TODO; the check is now a single grep.

Validation

  • clang-format --dry-run --Werror passes on all 7 changed headers
  • The begin/end grep check passes without the filter (no matches in library/ or library_checker_aizu_tests/)
  • No functional changes — comments and a test-script simplification only

@cameroncuster cameroncuster merged commit ca5a407 into dev Jul 7, 2026
@cameroncuster cameroncuster deleted the maintenance-notes branch July 7, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants