cplusplus / cplusplus/draft

\indexlibrary-global or -member?

Open
#6,705 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

We sometimes use \indexlibrarymember when indexing "global" library entities (in std namespace really). Elsewhere, we use \indexlibraryglobal. Why? What should the convention be?

For example, with the addition of P2819R2, Joel E. pointed out that tuple_size and tuple_element are actually "global", yet the convention used for similar entities (e.g. tanh) was to index them as if they were members of complex. See https://github.com/cplusplus/draft/pull/6693#discussion_r1396362936

Note that elsewhere we've also used indexes like the following:
\indexlibrary{\idxcode{formatter}!specializations!\idxcode{nullptr_t}}%

With \indexlibrarymember{x}{y}, we get y under x in the index which might be helpful, but we also get x under y which might not make sense, and we don't get x by itself. In the cases in question, neither x nor y is a member, so using ,\indexlibrarymember to index them is confusing. Note that we're also inconsistent as to whether we write \indexlibrarymember{x}{y} vs. \indexlibrarymember{y}{x}, so we need to be careful when fixing this issue.

Originally posted by @burblebee in https://github.com/cplusplus/draft/pull/6693#discussion_r1396711195

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

Search the draft source for \indexlibraryglobal, \indexlibrarymember, and direct \indexlibrary uses, including the tuple_size, tuple_element, tanh, formatter, and nullptr_t examples. Read the P2819R2 context and the discussion on pull request 6693 first. Done means the convention is decided and the affected index entries consistently use the appropriate form.

Written by the indexing model from the issue text.

Assessment

Tech stack
tex
Domain
documentation
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.