Commit edae0e0
committed
🚸 Guard all call options in
Problem:
- Although the final `if constexpr` branch in `call_with_message` may not be
taken, it can still cause a substitution failure in some cases.
Solution:
- Guard the last call option in `call_with_message`, and provide a hard error if
none of the options succeeds.
Note:
- An example of such a substitution failure may occur in a predicate matcher
whose predicate fails to have a `-> bool` trailing return type, and in forming
the substitution the compiler tries to look at `decltype(pred(msg))` which
instantiates the ill-formed function body.msg::call_with_message
1 parent 56ed298 commit edae0e0
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
700 | 700 | | |
701 | 701 | | |
702 | 702 | | |
703 | | - | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
704 | 708 | | |
705 | 709 | | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
706 | 713 | | |
707 | 714 | | |
708 | 715 | | |
| |||
0 commit comments