diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2023-11-01 14:28:55 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2023-11-06 10:15:20 +0000 |
commit | 3d654f96d4c583c35e4f73aa8f11371730671534 (patch) | |
tree | 9a57446a2ce8d3a3eac743ee12b8af860474dde2 /gcc/function.cc | |
parent | d803438e0c4016aff720fad418377c5b13567063 (diff) | |
download | gcc-3d654f96d4c583c35e4f73aa8f11371730671534.zip gcc-3d654f96d4c583c35e4f73aa8f11371730671534.tar.gz gcc-3d654f96d4c583c35e4f73aa8f11371730671534.tar.bz2 |
libstdc++: Improve static assert messages for monadic operations
The monadic operations for std::optional and std::expected make use of
internal helper traits __is_optional nad __is_expected, which are not
very user-friendly when shown in diagnostics. Add messages to the
assertions explaining the problem more clearly.
libstdc++-v3/ChangeLog:
* include/std/expected (expected::and_then, expected::or_else):
Add string literals to static assertions.
* include/std/optional (optional::and_then, optional::or_else):
Likewise.
Diffstat (limited to 'gcc/function.cc')
0 files changed, 0 insertions, 0 deletions