Skip to content
Snippets Groups Projects
Commit 3d654f96 authored by Jonathan Wakely's avatar Jonathan Wakely
Browse files

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.
parent d803438e
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment