Skip to content
Snippets Groups Projects
Unverified Commit 1489e281 authored by Jonathan Wakely's avatar Jonathan Wakely Committed by Jonathan Wakely
Browse files

libstdc++: Implement P2968R2 "Making std::ignore a first-class object"

This was recently approved for C++26, but we can apply the changes for
all modes back to C++11. There's no reason not to make the assignment
usable in constant expressions for C++11 mode, and noexcept for all
modes.

Move the definitions to <bits/utility.h> so they're available in
<utility> as well as <tuple>.

libstdc++-v3/ChangeLog:

	* include/bits/utility.h (_Swallow_assign): Make assignment
	constexpr for C++11 as well, and add noexcept.
	* include/std/tuple (_Swallow_assign, ignore): Move to
	bits/utility.h.
	* testsuite/20_util/headers/utility/ignore.cc: New test.
parent a0b7d8e0
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment