]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Improve static assert messages for monadic operations
authorJonathan Wakely <jwakely@redhat.com>
Wed, 1 Nov 2023 14:28:55 +0000 (14:28 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 6 Nov 2023 10:15:20 +0000 (10:15 +0000)
commit3d654f96d4c583c35e4f73aa8f11371730671534
tree9a57446a2ce8d3a3eac743ee12b8af860474dde2
parentd803438e0c4016aff720fad418377c5b13567063
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.
libstdc++-v3/include/std/expected
libstdc++-v3/include/std/optional
This page took 0.054622 seconds and 5 git commands to generate.