Skip to content

Inconsistent description of C++ extensions to header <cstddef> LWG3484 #4144

Description

@AlisdairM

In addition to importing the contents of <stddef.h> into namespace std, the header also adds the typedef nullptr_t, and type byte, and operations on type byte. This additions are partially described in two different locations:
[cstddef.syn]p1 notes the addition of byte and its operations, but makes no mention of nullptr_t.
[diff.mods.to.declarations]p3 (in the C compatibility annex) notes the addition of nullptr_t, but says nothing about byte and its operations.

For consistency, we should either consolidate this descriptive material to either one place, or duplicate it completely in both. Opening and issue, rather than filing an initial PR, as not sure which direction would be preferred.

Activity

  1. tkoeppe commented on Sep 6, 2020

    @tkoeppe
    Contributor

    As far as I can tell, [cstddef.syn] does contain nullptr_t,

    using nullptr_t = decltype(nullptr);
    .

    I agree that we should add mention of nullptr_t to [depr.c.header.others].

  2. tkoeppe commented on Sep 6, 2020

    @tkoeppe
    Contributor

    As @jwakely noted in my attempted PR, modifying [depr.c.header.others] is a normative change that I'd like to discuss in an issue. I will open one if you don't mind.

    PR #4145 contains a proposed change to [diff.mods.to.declarations], could you please take a look?

  3. jensmaurer commented on May 13, 2022

    @jensmaurer
    Member
  4. changed the title [-]Inconsistent description of C++ extensions to header <cstddef>[/-] [+]Inconsistent description of C++ extensions to header <cstddef> LWG3484[/+] on May 13, 2022
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

      Issue actions