Skip to content

[headers] Unclear status for floating-point classification/comparison functions LWG4488 #8579

Description

@frederick-vs-ja

[headers]/5 especially mentions "names which are defined as macros in C", which include floating-point classification/comparison functions (fpclassify, isless, etc.).

So, is <cmath> disallowed to declare them in the global namespace as they seem to be excluded from "these names"?

Also, [headers]/6 states

Names which are defined as macros in C shall be defined as macros in the C++ standard library, even if C grants license for implementation as functions.

Does this mean that despite being functions, these names also need to be defined as macros in C++?

I think both answers are "no". Not sure whether this needs an LWG issue.

Activity

  1. jwakely commented on Dec 3, 2025

    @jwakely
    Member

    This needs a library issue. We need to separate the C++ spec from the limitations of C that requires using macros for overloading.

  2. added
    lwgIssue must be reviewed by LWG.
    not-editorialIssue is not deemed editorial; the editorial issue is kept open for tracking.
    on Dec 3, 2025
  3. frederick-vs-ja commented on Dec 20, 2025

    @frederick-vs-ja
    ContributorAuthor
  4. changed the title [-][headers] Unclear status for floating-point classification/comparison functions[/-] [+][headers] Unclear status for floating-point classification/comparison functions LWG4488[/+] on Dec 20, 2025
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

    lwgIssue must be reviewed by LWG.not-editorialIssue is not deemed editorial; the editorial issue is kept open for tracking.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions