This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Tentatively NAD status.

3936. Are implementations allowed to deprecate components not in [depr]?

Section: D [depr] Status: Tentatively NAD Submitter: Jiang An Opened: 2023-05-22 Last modified: 2023-06-01

Priority: Not Prioritized

View all issues with Tentatively NAD status.

Discussion:

D.1 [depr.general]/2 allows implementations to apply the deprecated attribute to deprecated components. However, there doesn't seem to be any wording disallowing applying the deprecated attribute to non-deprecated components.

Is it intended to allow implementations to deprecate every library component as they want? If so, should we turn the allowance into "Recommended practice" and move it to somewhere in 16.4 [requirements]?

There doesn't seem to be wording which formally recommends applying deprecated attribute to deprecated components either.

[2023-06-01; Reflector poll]

Set status to Tentatively NAD after nine votes in favour during reflector poll. Let implementations decide when to apply these attributes.

Proposed resolution:

This wording is relative to N4950.

[Drafting Note: There are two mutually exclusive proposed resolutions, depending on whether it is allowed to deprecate components not in D [depr].

Option A:

  1. Insert a paragraph at the end of 16.4.2.2 [contents]:

    -?- Recommended practice: Implementations should not apply the deprecated attribute (9.12.5 [dcl.attr.deprecated]) to library entities that are not specified in D [depr]. Implementations should apply the deprecated attribute to library entities specified in D [depr] whenever possible.

Option B:

  1. Insert two paragraphs at the end of 16.4.2.2 [contents]:

    -?- Implementations shall not apply the deprecated attribute (9.12.5 [dcl.attr.deprecated]) to library entities that are not specified in D [depr].

    -?- Recommended practice: Implementations should apply the deprecated attribute to library entities specified in D [depr] whenever possible.