Skip to content

P2968R2 Make std::ignore A First-Class Object #4756

Description

WG21-P2968R2 Make std::ignore A First-Class Object

No feature-test macro is mentioned.

We're already conforming to the improved specification (except for the location of std::ignore).

STL/stl/inc/tuple

Lines 122 to 130 in 165fc94

struct _Ignore { // struct that ignores assignments
template <class _Ty>
constexpr const _Ignore& operator=(const _Ty&) const noexcept /* strengthened */ {
// do nothing
return *this;
}
};
_EXPORT_STD _INLINE_VAR constexpr _Ignore ignore{};

So the only things need to be done are

  • moving _Ignore and ignore to <utility>,
  • removing the /* strengthened */ comment from the operator=, and
  • adding the // P2968R2 Make std::ignore A First-Class Object comment to <yvals_core.h> immediately after this line
    // P2937R0 Freestanding Library: Remove strtok

This issue is intended for a new contributor (especially one new to GitHub) to get started with the simplest possible change.

Please feel free to submit a pull request if there isn't one already linked here - no need to ask for permission! 😸

You can (and should) link your pull request to this issue using GitHub's close/fix/resolve syntax. (in the PR description not the commit message)

Activity

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

    cxx26C++26 featurefixedSomething works now, yay!good first issueGood for newcomers

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions