microsoft / STL

MSVC's implementation of the C++ Standard Library.
Other
9.89k stars 1.45k forks source link

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

Open frederick-vs-ja opened 2 days ago

frederick-vs-ja commented 2 days ago

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). https://github.com/microsoft/STL/blob/165fc9459c85faa65cd3dec313eb10f55bab154c/stl/inc/tuple#L122-L130

So the only things need to be done are

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)

cpplearner commented 2 days ago

WG21-P2968R2 requires std::ignore to be available when <utility> is included, which isn't currently the case with MSVC STL.

To implement this, we should move the definition of std::ignore to <utility>.

(Aside: this movement is safe because <tuple> unconditionally includes <__msvc_iter_core.hpp>, which unconditionally includes <utility>.)