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

libstdc++: Implement LWG 3886 for std::optional and std::expected

This uses remove_cv_t<T> for the default template argument used for
deducing a type for a braced-init-list used with std::optional and
std::expected.

libstdc++-v3/ChangeLog:

	* include/std/expected (expected(U&&), operator=(U&&))
	(value_or): Use remove_cv_t on default template argument, as per
	LWG 3886.
	* include/std/optional (optional(U&&), operator=(U&&))
	(value_or): Likewise.
	* testsuite/20_util/expected/lwg3886.cc: New test.
	* testsuite/20_util/optional/cons/lwg3886.cc: New test.
parent acc70606
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