Closed steveire closed 4 years ago
The match<> api is currently overloaded but I have already changed that in my working branch. Now there will be several separate predicates: match<>
, match_value<>
(which matches on .value
), match_member<>
(which can match any data member, but requires C++17).
It is possible to specialize
match
in order to match on properties of error types other than.value
.Consider that this makes it possible to match on the category of a
std::error_code
, but this should be possible for any user-defined error type:https://godbolt.org/z/YRXTtZ
It should be documented whether this kind of specialization of matching is allowed.