Skip to content

\indexlibrary-global or -member?  #6705

Open
@burblebee

Description

@burblebee

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 #6693 (comment)

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 #6693 (comment)

Activity

changed the title [-]lib-global or -member? [/-] [+]\indexlibrary-global or -member? [/+] on Nov 17, 2023
JohelEGP

JohelEGP commented on Nov 17, 2023

@JohelEGP
Contributor

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.

The effect should be the same:

% class member library index
\newcommand{\indexlibraryboth}[2]{\indexlibrarymisc{#1}{#2}\indexlibrarymisc{#2}{#1}}
\newcommand{\indexlibrarymember}[2]{\indexlibraryboth{\idxcode{#1}}{\idxcode{#2}}}
\newcommand{\indexlibrarymemberexpos}[2]{\indexlibraryboth{\idxcode{#1}}{#2@\exposid{#2}}}
\newcommand{\indexlibrarymemberx}[2]{\indexlibrarymisc{\idxcode{#1}}{\idxcode{#2}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @burblebee@JohelEGP

        Issue actions

          \indexlibrary-global or -member? · Issue #6705 · cplusplus/draft