gcc/libstdc++-v3/include
Jonathan Wakely 9360d6cd17 libstdc++: Simplify std::optional::value()
The structure of these functions likely dates from the time before G++
fully supported C++14 extended constexpr, so that the throw expression
had to be the operand of a conditional expression. That is not true now,
so we can use a more straightforward version of the code.

We can also simplify the declaration of __throw_bad_optional_access by
using the C++11-style [[noreturn]] attribute so that a separate
declaration isn't needed.

libstdc++-v3/ChangeLog:

	* include/experimental/optional (__throw_bad_optional_access):
	Replace GNU attribute with C++11 attribute.
	(optional::value, optional::value_or): Use if statements
	instead of conditional expressions.
	* include/std/optional (__throw_bad_optional_access)
	(optional::value, optional::value_or): Likewise.
2021-07-27 21:36:01 +01:00
..
backward
bits libstdc++: Adjust whitespace in <bits/cow_string.h> 2021-07-27 12:13:42 +01:00
c
c_compatibility
c_global libstdc++: Add nodiscard attribute to cast-like functions 2021-04-06 16:43:25 +01:00
c_std
debug libstdc++: Remove unnecessary uses of <utility> 2021-07-27 12:04:18 +01:00
decimal
experimental libstdc++: Simplify std::optional::value() 2021-07-27 21:36:01 +01:00
ext libstdc++: Use __builtin_operator_new when available [PR94295] 2021-07-22 14:38:34 +01:00
parallel
precompiled
pstl
std libstdc++: Simplify std::optional::value() 2021-07-27 21:36:01 +01:00
tr1 libstdc++: Fix even more doxygen markup for group close commands 2021-04-09 13:09:23 +01:00
tr2
Makefile.am libstdc++: Move COW string definitions to separate header 2021-07-27 12:04:18 +01:00
Makefile.in libstdc++: Move COW string definitions to separate header 2021-07-27 12:04:18 +01:00