Skip to content

docs: spell out kactl macros in doc comments#233

Merged
cameroncuster merged 3 commits into
devfrom
docstrings-no-macros
Jul 7, 2026
Merged

docs: spell out kactl macros in doc comments#233
cameroncuster merged 3 commits into
devfrom
docstrings-no-macros

Conversation

@cameroncuster

Copy link
Copy Markdown
Member

The main branch publishes headers with kactl macros expanded (update_main.sh runs them through cpp with kactl_macros.hpp), but doc comments pass through the preprocessor untouched — so on main, docstrings referenced vi, pii, ll, sz(...), and rep(...) while the surrounding code showed the expanded forms.

This spells out the macros in all doc comments so the published docstrings match the published code:

  • vivector<int>
  • piipair<int, int>
  • llint64_t
  • sz(x)ssize(x)
  • rep(i, a, b)for (int i = a; i < b; i++)

Deliberately untouched:

  • Lambda parameter names vl/vr in seg_tree.hpp / merge_sort_tree.hpp (variables, not macros)
  • vl in wildcard_pattern_matching.hpp docs (that file defines using vl = vector<ll>; in code, which survives to main)
  • The English word "all" in prose

Comment-only change: 41 files, all 64 changed diff lines are comments; zero code lines touched. Lines that exceeded the 59-column limit after expansion were re-wrapped. clang-format (dev.clang-format) passes on all changed files, and a repo-wide scan confirms no macro tokens remain in any library comment.

@cameroncuster cameroncuster force-pushed the docstrings-no-macros branch from 2c5d0d2 to 4a45aae Compare July 7, 2026 18:30
@cameroncuster cameroncuster merged commit 34b46ea into dev Jul 7, 2026
7 of 8 checks passed
@cameroncuster cameroncuster deleted the docstrings-no-macros branch July 7, 2026 19:06
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.

1 participant