aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-07-27 14:50:28 +0100
committerJonathan Wakely <jwakely@redhat.com>2021-07-27 21:36:01 +0100
commit9360d6cd1706882dfffd3c7a08b5956c37207a11 (patch)
treee03975117aa828b80f557d0d4f7695f8696c00f8 /gcc/fortran/resolve.c
parentb7195fb01fe62a313ae5f7faede698101bdb3025 (diff)
downloadgcc-9360d6cd1706882dfffd3c7a08b5956c37207a11.zip
gcc-9360d6cd1706882dfffd3c7a08b5956c37207a11.tar.gz
gcc-9360d6cd1706882dfffd3c7a08b5956c37207a11.tar.bz2
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.
Diffstat (limited to 'gcc/fortran/resolve.c')
0 files changed, 0 insertions, 0 deletions