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

3903. span destructor is redundantly noexcept

Section: [span.overview] Status: WP Submitter: Ben Craig Opened: 2023-03-11 Last modified: 2023-11-22

Priority: Not Prioritized

View all other issues in [span.overview].

View all issues with WP status.


The span class template synopsis in [span.overview] has this declaration:

~span() noexcept = default;

The noexcept is redundant, as ~span is noexcept automatically. I think the entire declaration is unnecessary as well. There is no additional specification for ~span() at all, much less some that warrants inclusion in the class template synopsis.

Recommended fix:

~span() noexcept = default;

Alternative fix:

~span() noexcept = default;

[2023-03-22; Reflector poll]

Set status to Tentatively Ready after six votes in favour during reflector poll.

[2023-06-17 Approved at June 2023 meeting in Varna. Status changed: Voting → WP.]

Proposed resolution:

This wording is relative to N4928.

  1. Modify [span.overview], class template span synopsis, as indicated:

    ~span() noexcept = default;