gcc/libstdc++-v3/testsuite/20_util/optional
Jonathan Wakely cdd2d448d8 libstdc++: Fix constraints on std::optional comparisons [PR 96269]
The relational operators for std::optional were using the wrong types
in the declval expressions used to constrain them. Instead of using
const lvalues they were using non-const rvalues, which meant that a type
might satisfy the constraints but then give an error when the function
body was instantiated.

libstdc++-v3/ChangeLog:

	PR libstdc++/96269
	* include/std/optional (operator==, operator!=, operator<)
	(operator>, operator<=, operator>=): Fix types used in
	SFINAE constraints.
	* testsuite/20_util/optional/relops/96269.cc: New test.
2020-11-05 19:09:22 +00:00
..
assignment libstdc++: Add noexcept to std::optional initialization (PR 96036) 2020-07-06 21:54:12 +01:00
cons libstdc++: Add noexcept to std::optional initialization (PR 96036) 2020-07-06 21:54:12 +01:00
constexpr libstdc++: Ensure c++NN effective target present in all C++17 tests 2020-07-31 19:58:02 +01:00
observers Update copyright years. 2020-01-01 12:51:42 +01:00
relops libstdc++: Fix constraints on std::optional comparisons [PR 96269] 2020-11-05 19:09:22 +00:00
swap Update copyright years. 2020-01-01 12:51:42 +01:00
77288.cc Update copyright years. 2020-01-01 12:51:42 +01:00
84601.cc Housekeeping for the effective targets of optional's tests. 2018-11-20 12:42:28 +02:00
bad_access.cc libstdc++: Define std::bad_optional_access constructor as defaulted 2020-06-09 22:14:43 +01:00
hash.cc libstdc++: Ensure c++NN effective target present in all C++17 tests 2020-07-31 19:58:02 +01:00
in_place.cc Update copyright years. 2020-01-01 12:51:42 +01:00
make_optional-2.cc libstdc++: Constrain std::make_optional 2020-07-06 21:54:59 +01:00
make_optional.cc Update copyright years. 2020-01-01 12:51:42 +01:00
nullopt.cc PR libstdc++/95915 2020-06-29 00:36:38 +03:00
requirements.cc libstdc++: Adjust tests that give different results in C++20 2020-07-31 17:51:00 +01:00
typedefs.cc Update copyright years. 2020-01-01 12:51:42 +01:00