cplusplus / cplusplus/draft

[std] Use \libmember and \libglobal everywhere

Open
#3,911 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

big
Dominant language
TeX
Stars
221
Forks
813
Avg merge
16h 4m
Merged PRs (30d)
36

Description

These macros were added by #3096 but are currently almost unused. That's a shame, because in principle their use enables more precise indexing and linking, which I would love to take advantage of in cxxdraft-htmlgen.

For example, a link such as http://eel.is/c++draft/string.iterators#lib:basic_string,cbegin currently points to begin rather than cbegin, because the index entry for cbegin is actually located just before the itemdecl that declares both begin and cbegin. Had \libmember been used here, I could link specifically to the declaration of cbegin.

Although.. that brings up the question of how these macros are intended to be used with overloaded names like begin. Is the intent to:

  1. use the macro on all overloads
  2. use the macro only on the first overload
  3. not use the macro at all for overloaded names
  4. something else? :)

I'd be happy to make a pull request to use these macros everywhere, but do need guidance on this issue of how to handle overloaded names. @jensmaurer do you remember whether you considered overloaded names when you made these macros?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the definitions and existing uses of \libmember and \libglobal, then inspect the string.iterators example and how cxxdraft-htmlgen consumes its anchors. Resolve the overloaded-name policy with maintainers before applying the macros throughout the draft; done means consistent usage and precise links without ambiguous targets.

Written by the indexing model from the issue text.

Assessment

Tech stack
tex
Domain
documentation
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.